1 #ifndef DataFormats_BTauReco_DeepBoostedJetFeatures_h 2 #define DataFormats_BTauReco_DeepBoostedJetFeatures_h 6 #include <unordered_map> 30 item->second.push_back(value);
33 throw cms::Exception(
"InvalidArgument") <<
"[DeepBoostedJetFeatures::fill()] Feature " << name <<
" has not been registered";
42 if (names.empty())
return;
43 const auto ref_len =
get(names.front()).
size();
44 for (
unsigned i=1;
i<names.size(); ++
i){
45 if (
get(names[
i]).size() != ref_len){
46 throw cms::Exception(
"InvalidArgument") <<
"[DeepBoostedJetFeatures::check_consistency()] Inconsistent variable length " 47 <<
get(names[
i]).
size() <<
" for " << names[
i] <<
", should be " << ref_len;
57 throw cms::Exception(
"InvalidArgument") <<
"[DeepBoostedJetFeatures::get()] Feature " << name <<
" does not exist!";
69 #endif // DataFormats_BTauReco_DeepBoostedJetFeatures_h
const std::string names[nVars_]
void reserve(const std::string &name, unsigned capacity)
void check_consistency(const std::vector< std::string > &names) const
std::unordered_map< std::string, std::vector< float > > feature_map_
void add(const std::string &name)
void fill(const std::string &name, float value)