Skip to content

Commit d1ba90c

Browse files
committed
Fixed Error message about wrong vector size
1 parent 91adb14 commit d1ba90c

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Modules/ITS/include/ITS/ITSHelpers.h

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ std::vector<T> convertToArray(std::string input)
2424

2525
if constexpr (std::is_same_v<T, int>) {
2626
result.push_back(std::stoi(token));
27+
} else if constexpr (std::is_same_v<T, float>) {
28+
result.push_back(std::strtof(token.c_str(), NULL));
2729
} else if constexpr (std::is_same_v<T, std::string>) {
2830
result.push_back(token);
2931
}

Modules/ITS/itsDecoding.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"policy": "OnEachSeparately",
4949
"detectorName": "ITS",
5050
"checkParameters": {
51-
"DecLinkErrorLimits": "1, 1, 1, 1, 1, 1000, 1000, 1000, 1000, 1000, 1000, 1, 1, 1000, 1000, 1, 1, 1, 1, 1000, 1000, 50, 50",
52-
"DecLinkErrorLimitsRatio": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0",
53-
"DecLinkErrorType": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0",
51+
"DecLinkErrorLimits": "5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, -1",
52+
"DecLinkErrorLimitsRatio": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1",
53+
"DecLinkErrorType": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0",
5454
"plotWithTextMessage": "",
5555
"textMessage": ""
5656
},

Modules/ITS/src/ITSDecodingErrorCheck.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Quality ITSDecodingErrorCheck::check(std::map<std::string, std::shared_ptr<Monit
3838
}
3939
std::vector<int> vDecErrorLimits = convertToArray<int>(o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters, "DecLinkErrorLimits", ""));
4040
if (vDecErrorLimits.size() != o2::itsmft::GBTLinkDecodingStat::NErrorsDefined) {
41-
ILOG(Error, Support) << "Incorrect vector with DecodingError limits, check .json" << ENDM;
41+
ILOG(Error, Support) << "Incorrect vector with DecodingError limits, check .json"<< ENDM;
4242
doFlatCheck = true;
4343
}
4444
std::vector<float> vDecErrorLimitsRatio = convertToArray<float>(o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters, "DecLinkErrorLimitsRatio", ""));

0 commit comments

Comments
 (0)