50 hasXaxis ? &xaxis :
nullptr,
51 hasYaxis ? &yaxis :
nullptr,
52 hasZaxis ? &zaxis :
nullptr);
56 set =
new MESetChannel(path, otype, btype, kind);
61 new MESetProjection(path, otype, btype, kind, hasYaxis ? &yaxis :
nullptr);
63 unsigned logicalDimensions(-1);
66 logicalDimensions = 0;
70 logicalDimensions = 1;
74 logicalDimensions = 2;
83 logicalDimensions = 1;
85 if (logicalDimensions > 2 || (btype ==
binning::kReport && logicalDimensions != 0))
94 hasXaxis ? &xaxis :
nullptr,
95 hasYaxis ? &yaxis :
nullptr,
96 hasZaxis ? &zaxis :
nullptr);
97 else if (logicalDimensions == 0)
98 set =
new MESetDet0D(path, otype, btype, kind);
99 else if (logicalDimensions == 1)
100 set =
new MESetDet1D(path, otype, btype, kind, hasYaxis ? &yaxis :
nullptr);
101 else if (logicalDimensions == 2)
102 set =
new MESetDet2D(path, otype, btype, kind, hasZaxis ? &zaxis :
nullptr);
106 typedef std::vector<std::string> VString;
109 VString replacementNames(multiParams.getParameterNames());
110 if (replacementNames.empty())
111 throw cms::Exception(
"InvalidConfiguration") <<
"0 multiplicity for MESet at " <<
path;
114 for (
unsigned iD(0); iD != replacementNames.size(); ++iD) {
116 if (multiParams.existsAs<VString>(replacementNames[iD],
false))
117 reps = multiParams.getUntrackedParameter<VString>(replacementNames[iD]);
118 else if (multiParams.existsAs<std::vector<int>>(replacementNames[iD],
false)) {
119 std::vector<int> repInts(multiParams.getUntrackedParameter<std::vector<int>>(replacementNames[iD]));
120 for (
unsigned iR(0); iR != repInts.size(); ++iR)
121 reps.push_back(std::to_string(repInts[iR]));
125 throw cms::Exception(
"InvalidConfiguration") <<
"0 multiplicity for MESet at " <<
path;
127 candidates[replacementNames[iD]] = reps;
135 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 &)