Skip to content

Commit ce26147

Browse files
committed
[Tools/ML] Fix code-check issues in MLResponse
1 parent a7bddd7 commit ce26147

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Tools/ML/MlResponse.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class MlResponse
163163
{
164164
setAvailableInputFeatures();
165165
for (const auto& inputFeature : cfgInputFeatures) {
166-
if (mAvailableInputFeatures.count(inputFeature)) {
166+
if (mAvailableInputFeatures.contains(inputFeature)) {
167167
mCachedIndices.emplace_back(mAvailableInputFeatures[inputFeature]);
168168
} else {
169169
LOG(fatal) << "Input feature " << inputFeature << " not available! Please check your configurables.";
@@ -279,18 +279,18 @@ class MlResponse
279279
std::vector<o2::ml::OnnxModel> mModels; // OnnxModel objects, one for each bin
280280
uint8_t mNModels = 1; // number of bins
281281
uint8_t mNClasses = 3; // number of model classes
282-
std::vector<double> mBinsLimits = {}; // bin limits of the variable (e.g. pT) used to select which model to use
283-
std::vector<double> mBinsLimitsVar2 = {}; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class)
284-
std::vector<std::string> mPaths = {""}; // paths to the models, one for each bin
285-
std::vector<int> mCutDir = {}; // direction of the cuts on the model scores (no cut is also supported)
286-
o2::framework::LabeledArray<double> mCuts = {}; // array of cut values to apply on the model scores
282+
std::vector<double> mBinsLimits; // bin limits of the variable (e.g. pT) used to select which model to use
283+
std::vector<double> mBinsLimitsVar2; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class)
284+
std::vector<std::string> mPaths; // paths to the models, one for each bin
285+
std::vector<int> mCutDir; // direction of the cuts on the model scores (no cut is also supported)
286+
o2::framework::LabeledArray<double> mCuts; // array of cut values to apply on the model scores
287287
std::map<std::string, uint8_t> mAvailableInputFeatures; // map of available input features
288288
std::vector<uint8_t> mCachedIndices; // vector of index correspondance between configurables and available input features
289289
uint8_t mNVar1Bins = 1; // number of bins of the first variable (e.g. pT) used to select which model to use
290290
uint8_t mNVar2Bins = 1; // number of bins of the second variable (e.g. multiplicity) used to select which model to use
291291
bool mUse2DBinning = false; // switch to enable/disable 2D binning
292292

293-
virtual void setAvailableInputFeatures() { return; } // method to fill the map of available input features
293+
virtual void setAvailableInputFeatures() {} // method to fill the map of available input features
294294

295295
private:
296296
/// Finds matching bin in mBinsLimits

0 commit comments

Comments
 (0)