diff --git a/Tools/ML/MlResponse.h b/Tools/ML/MlResponse.h index 508d39123f5..cdc5a130714 100644 --- a/Tools/ML/MlResponse.h +++ b/Tools/ML/MlResponse.h @@ -163,7 +163,7 @@ class MlResponse { setAvailableInputFeatures(); for (const auto& inputFeature : cfgInputFeatures) { - if (mAvailableInputFeatures.count(inputFeature)) { + if (mAvailableInputFeatures.contains(inputFeature)) { mCachedIndices.emplace_back(mAvailableInputFeatures[inputFeature]); } else { LOG(fatal) << "Input feature " << inputFeature << " not available! Please check your configurables."; @@ -279,18 +279,18 @@ class MlResponse std::vector mModels; // OnnxModel objects, one for each bin uint8_t mNModels = 1; // number of bins uint8_t mNClasses = 3; // number of model classes - std::vector mBinsLimits = {}; // bin limits of the variable (e.g. pT) used to select which model to use - std::vector mBinsLimitsVar2 = {}; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class) - std::vector mPaths = {""}; // paths to the models, one for each bin - std::vector mCutDir = {}; // direction of the cuts on the model scores (no cut is also supported) - o2::framework::LabeledArray mCuts = {}; // array of cut values to apply on the model scores + std::vector mBinsLimits; // bin limits of the variable (e.g. pT) used to select which model to use + std::vector mBinsLimitsVar2; // bin limits of a second variable (e.g. multiplicity) used to select which model to use (not used in this base class) + std::vector mPaths; // paths to the models, one for each bin + std::vector mCutDir; // direction of the cuts on the model scores (no cut is also supported) + o2::framework::LabeledArray mCuts; // array of cut values to apply on the model scores std::map mAvailableInputFeatures; // map of available input features std::vector mCachedIndices; // vector of index correspondance between configurables and available input features uint8_t mNVar1Bins = 1; // number of bins of the first variable (e.g. pT) used to select which model to use uint8_t mNVar2Bins = 1; // number of bins of the second variable (e.g. multiplicity) used to select which model to use bool mUse2DBinning = false; // switch to enable/disable 2D binning - virtual void setAvailableInputFeatures() { return; } // method to fill the map of available input features + virtual void setAvailableInputFeatures() {} // method to fill the map of available input features private: /// Finds matching bin in mBinsLimits