|
9 | 9 | // granted to it by virtue of its status as an Intergovernmental Organization |
10 | 10 | // or submit itself to any jurisdiction. |
11 | 11 |
|
12 | | -#ifndef QC_HASH_DATA_DESCRIPTION_H |
13 | | -#define QC_HASH_DATA_DESCRIPTION_H |
| 12 | +#ifndef QC_DATA_HEADER_HELPERS_H |
| 13 | +#define QC_DATA_HEADER_HELPERS_H |
14 | 14 |
|
15 | 15 | #include <cstddef> |
16 | 16 | #include <string> |
17 | 17 |
|
18 | 18 | #include <Headers/DataHeader.h> |
19 | 19 |
|
| 20 | +#include "QualityControl/DataSourceType.h" |
| 21 | + |
20 | 22 | namespace o2::quality_control::core |
21 | 23 | { |
22 | 24 |
|
23 | | -/// \brief Creates DataDescription from given name. |
| 25 | +/// \brief Creates DataOrigin for a QC Actor. |
| 26 | +/// |
| 27 | +/// Creates DataOrigin for a data source and detector code |
| 28 | +header::DataOrigin createDataOrigin(DataSourceType, const std::string& detectorCode); |
| 29 | + |
| 30 | +/// \brief Creates DataDescription from given name for any QC actor |
24 | 31 | /// |
25 | 32 | /// If the length of the name is <= 16 (hardcoded in DataDescription) it creates DataDescription from the original name. |
26 | 33 | /// However, if the length of the name is > 16, it will create hash of the whole name and replace ending hashLength of bytes |
27 | 34 | /// of the name with hexa representation of computed hash. |
28 | | -/// eg.: name == "veryLongNameThatIsLongerThan16B" with hashLengh == 4 will result in "veryLongNameABCD", where ABCD |
| 35 | +/// eg.: name == "veryLongNameThatIsLongerThan16B" with hashLength == 4 will result in "veryLongNameABCD", where ABCD |
29 | 36 | /// is the hash create inside the function |
30 | 37 | /// |
31 | 38 | /// \param name - name which should cut and hashed |
32 | | -/// \param hashLenght - number of bytes which will overwrite the end of the name |
| 39 | +/// \param hashLength - number of bytes which will overwrite the end of the name |
33 | 40 | o2::header::DataDescription createDataDescription(const std::string& name, size_t hashLength); |
34 | 41 |
|
35 | 42 | } // namespace o2::quality_control::core |
|
0 commit comments