47 set =
new MESetNonObject(path, otype, btype, kind, hasXaxis ? &xaxis : 0, hasYaxis ? &yaxis : 0, hasZaxis ? &zaxis : 0);
51 set =
new MESetChannel(path, otype, btype, kind);
56 set =
new MESetProjection(path, otype, btype, kind, hasYaxis ? &yaxis : 0);
58 unsigned logicalDimensions(-1);
61 logicalDimensions = 0;
65 logicalDimensions = 1;
69 logicalDimensions = 2;
76 if(logicalDimensions == 2 && hasYaxis && btype !=
binning::kUser) logicalDimensions = 1;
78 if(logicalDimensions > 2 || (btype ==
binning::kReport && logicalDimensions != 0))
82 set =
new MESetEcal(path, otype, btype, kind, logicalDimensions, hasXaxis ? &xaxis : 0, hasYaxis ? &yaxis : 0, hasZaxis ? &zaxis : 0);
83 else if(logicalDimensions == 0)
84 set =
new MESetDet0D(path, otype, btype, kind);
85 else if(logicalDimensions == 1)
86 set =
new MESetDet1D(path, otype, btype, kind, hasYaxis ? &yaxis : 0);
87 else if(logicalDimensions == 2)
88 set =
new MESetDet2D(path, otype, btype, kind, hasZaxis ? &zaxis : 0);
92 typedef std::vector<std::string> VString;
95 VString replacementNames(multiParams.getParameterNames());
96 if(replacementNames.size() == 0)
97 throw cms::Exception(
"InvalidConfiguration") <<
"0 multiplicity for MESet at " <<
path;
100 for(
unsigned iD(0); iD != replacementNames.size(); ++iD){
102 if(multiParams.existsAs<VString>(replacementNames[iD],
false))
103 reps = multiParams.getUntrackedParameter<VString>(replacementNames[iD]);
104 else if(multiParams.existsAs<std::vector<int> >(replacementNames[iD],
false)){
105 std::vector<int> repInts(multiParams.getUntrackedParameter<std::vector<int> >(replacementNames[iD]));
106 for(
unsigned iR(0); iR != repInts.size(); ++iR)
107 reps.push_back(std::to_string(repInts[iR]));
111 throw cms::Exception(
"InvalidConfiguration") <<
"0 multiplicity for MESet at " <<
path;
113 candidates[replacementNames[iD]] = reps;
120 if(!set)
throw cms::Exception(
"InvalidConfiguration") <<
"MESet " << path <<
" could not be initialized";
T getUntrackedParameter(std::string const &, T const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
ParameterWildcardBase * addWildcardUntracked(U const &pattern)
ObjectType translateObjectType(std::string const &)
std::map< std::string, std::vector< std::string > > ReplCandidates
void fillAxisDescriptions(edm::ParameterSetDescription &)
MonitorElement::Kind translateKind(std::string const &)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
BinningType translateBinningType(std::string const &)
AxisSpecs formAxis(edm::ParameterSet const &)
MESet * createMESet(edm::ParameterSet const &)
void fillMESetDescriptions(edm::ParameterSetDescription &)