36 typedef std::vector<edm::ParameterSet>
VPSet;
37 typedef std::vector<std::string>
vstring;
38 typedef boost::escaped_list_separator<char> elsc;
40 elsc commonEscapes(
"\\",
" \t",
"\'");
45 vstring effCmds = pset.
getParameter<vstring>(
"efficiency");
46 for ( vstring::const_iterator effCmd = effCmds.begin();
47 effCmd != effCmds.end(); ++effCmd )
49 if ( effCmd->empty() )
continue;
51 boost::tokenizer<elsc> tokens(*effCmd, commonEscapes);
54 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
55 iToken != tokens.end(); ++iToken) {
56 if ( iToken->empty() )
continue;
57 args.push_back(*iToken);
60 if ( args.size() < 4 ) {
61 LogInfo(
"DQMGenericClient") <<
"Wrong input to effCmds\n";
68 opt.numerator = args[2];
69 opt.denominator = args[3];
70 opt.isProfile =
false;
72 const string typeName = args.size() == 4 ?
"eff" : args[4];
73 if ( typeName ==
"eff" ) opt.type = 1;
74 else if ( typeName ==
"fake" ) opt.type = 2;
81 for ( VPSet::const_iterator
efficSet = efficSets.begin();
85 opt.name =
efficSet->getUntrackedParameter<
string>(
"name");
86 opt.title =
efficSet->getUntrackedParameter<
string>(
"title");
87 opt.numerator =
efficSet->getUntrackedParameter<
string>(
"numerator");
88 opt.denominator =
efficSet->getUntrackedParameter<
string>(
"denominator");
89 opt.isProfile =
false;
91 const string typeName =
efficSet->getUntrackedParameter<
string>(
"typeName",
"eff");
92 if ( typeName ==
"eff" ) opt.type = 1;
93 else if ( typeName ==
"fake" ) opt.type = 2;
101 for ( vstring::const_iterator effProfileCmd = effProfileCmds.begin();
102 effProfileCmd != effProfileCmds.end(); ++effProfileCmd )
104 if ( effProfileCmd->empty() )
continue;
106 boost::tokenizer<elsc> tokens(*effProfileCmd, commonEscapes);
109 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
110 iToken != tokens.end(); ++iToken) {
111 if ( iToken->empty() )
continue;
112 args.push_back(*iToken);
115 if ( args.size() < 4 ) {
116 LogInfo(
"DQMGenericClient") <<
"Wrong input to effProfileCmds\n";
123 opt.numerator = args[2];
124 opt.denominator = args[3];
125 opt.isProfile =
true;
127 const string typeName = args.size() == 4 ?
"eff" : args[4];
128 if ( typeName ==
"eff" ) opt.type = 1;
129 else if ( typeName ==
"fake" ) opt.type = 2;
136 for ( VPSet::const_iterator effProfileSet = effProfileSets.begin();
137 effProfileSet != effProfileSets.end(); ++effProfileSet )
140 opt.name = effProfileSet->getUntrackedParameter<
string>(
"name");
141 opt.title = effProfileSet->getUntrackedParameter<
string>(
"title");
142 opt.numerator = effProfileSet->getUntrackedParameter<
string>(
"numerator");
143 opt.denominator = effProfileSet->getUntrackedParameter<
string>(
"denominator");
144 opt.isProfile =
true;
146 const string typeName = effProfileSet->getUntrackedParameter<
string>(
"typeName",
"eff");
147 if ( typeName ==
"eff" ) opt.type = 1;
148 else if ( typeName ==
"fake" ) opt.type = 2;
155 vstring resCmds = pset.
getParameter<vstring>(
"resolution");
156 for ( vstring::const_iterator resCmd = resCmds.begin();
157 resCmd != resCmds.end(); ++resCmd )
159 if ( resCmd->empty() )
continue;
160 boost::tokenizer<elsc> tokens(*resCmd, commonEscapes);
163 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
164 iToken != tokens.end(); ++iToken) {
165 if ( iToken->empty() )
continue;
166 args.push_back(*iToken);
169 if ( args.size() != 3 ) {
170 LogInfo(
"DQMGenericClient") <<
"Wrong input to resCmds\n";
175 opt.namePrefix = args[0];
176 opt.titlePrefix = args[1];
177 opt.srcName = args[2];
183 for ( VPSet::const_iterator resolSet = resolSets.begin();
184 resolSet != resolSets.end(); ++resolSet )
187 opt.namePrefix = resolSet->getUntrackedParameter<
string>(
"namePrefix");
188 opt.titlePrefix = resolSet->getUntrackedParameter<
string>(
"titlePrefix");
189 opt.srcName = resolSet->getUntrackedParameter<
string>(
"srcName");
196 for(
const auto& profileCmd: profileCmds) {
197 boost::tokenizer<elsc> tokens(profileCmd, commonEscapes);
200 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
201 iToken != tokens.end(); ++iToken) {
202 if ( iToken->empty() )
continue;
203 args.push_back(*iToken);
206 if ( args.size() != 3 ) {
207 LogInfo(
"DQMGenericClient") <<
"Wrong input to profileCmds\n";
214 opt.srcName = args[2];
220 for(
const auto& profileSet: profileSets) {
222 opt.name = profileSet.getUntrackedParameter<
string>(
"name");
223 opt.title = profileSet.getUntrackedParameter<
string>(
"title");
224 opt.srcName = profileSet.getUntrackedParameter<
string>(
"srcName");
231 for ( vstring::const_iterator normCmd = normCmds.begin();
232 normCmd != normCmds.end(); ++normCmd )
234 if ( normCmd->empty() )
continue;
235 boost::tokenizer<elsc> tokens(*normCmd, commonEscapes);
238 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
239 iToken != tokens.end(); ++iToken) {
240 if ( iToken->empty() )
continue;
241 args.push_back(*iToken);
244 if ( args.empty()
or args.size() > 2 ) {
245 LogInfo(
"DQMGenericClient") <<
"Wrong input to normCmds\n";
251 opt.normHistName = args.size() == 2 ? args[1] : args[0];
257 for ( VPSet::const_iterator normSet = normSets.begin();
258 normSet != normSets.end(); ++normSet )
261 opt.name = normSet->getUntrackedParameter<
string>(
"name");
262 opt.normHistName = normSet->getUntrackedParameter<
string>(
"normalizedTo", opt.name);
269 for ( vstring::const_iterator cdCmd = cdCmds.begin();
270 cdCmd != cdCmds.end(); ++cdCmd )
272 if ( cdCmd->empty() )
continue;
273 boost::tokenizer<elsc> tokens(*cdCmd, commonEscapes);
276 for(boost::tokenizer<elsc>::const_iterator iToken = tokens.begin();
277 iToken != tokens.end(); ++iToken) {
278 if ( iToken->empty() )
continue;
279 args.push_back(*iToken);
282 if ( args.size() == 0 || args.size() > 2) {
283 LogInfo(
"DQMGenericClient") <<
"Wrong input to cdCmds\n";
289 opt.ascending = args.size() == 2 ? (args[1] !=
"descending") :
true;
295 for ( VPSet::const_iterator cdSet = cdSets.begin();
296 cdSet != cdSets.end(); ++cdSet )
299 opt.name = cdSet->getUntrackedParameter<
string>(
"name");
300 opt.ascending = cdSet->getUntrackedParameter<
bool>(
"ascending",
true);
std::vector< EfficOption > efficOptions_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< ProfileOption > profileOptions_
std::vector< ResolOption > resolOptions_
std::vector< std::string > subDirs_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::string outputFileName_
std::vector< CDOption > cdOptions_
def efficSet(nameIn, titleIn, numeratorIn, denominatorIn, typeIn="eff")
std::vector< NormOption > normOptions_