Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 214 of file TriggerMenuRW.cxx.
223 if(
cfg.error.size()!=0) {
224 for(
const string &
e:
cfg.error)
230 if(
cfg.inputFiles.size()>0 ) {
233 for (
const std::string &
fn :
cfg.inputFiles) {
236 if(filetype ==
"l1menu") {
239 cout <<
"Loaded L1 menu " <<
l1menu.name() <<
" with " <<
l1menu.size() <<
" items from " <<
fn << endl;
242 }
else if(filetype ==
"hltmenu" ) {
245 cout <<
"Loaded HLT menu " << hltmenu.
name() <<
" with " << hltmenu.
size() <<
" chains from " <<
fn << endl;
247 writeJsonFile(hltmenu,
"HLTMenu",
cfg);
248 }
else if(filetype ==
"l1prescale" ) {
251 cout <<
"Loaded L1 prescales set file " <<
fn <<
" with " << l1pss.
size() <<
" prescales from " <<
fn << endl;
252 writeJsonFile(l1pss,
"L1PrescalesSet",
cfg);
253 }
else if(filetype ==
"hltprescale" ) {
256 cout <<
"Loaded HLT prescales set file " <<
fn <<
" with " << hltpss.
size() <<
" prescales from " <<
fn << endl;
258 writeJsonFile(hltpss,
"HLTPrescalesSet",
cfg);
259 }
else if(filetype ==
"bunchgroupset" ) {
262 cout <<
"Loaded L1 BunchGroup set file " <<
fn <<
" with " << bgs.
sizeNonEmpty() <<
" non-empty bunchgroups from " <<
fn << endl;
264 writeJsonFile(bgs,
"BunchGroupSet",
cfg);
265 }
else if(filetype ==
"joboptions" ) {
268 cout <<
"Loaded job options with " << jo.
getObject(
"properties").
getKeys().size() <<
" properties from " <<
fn << endl;
271 for(
const auto&
alg :
ds.data()) {
272 std::cout <<
alg.first << std::endl;
273 for(
const auto& prop :
alg.second ) {
274 std::cout <<
" " << prop.first <<
" -> " << prop.second.data() << std::endl;
278 writeJsonFile(jo,
"HLTJobOptions",
cfg);
279 }
else if(filetype ==
"hltmonitoringsummary" ) {
282 cout <<
"Loaded HLT monnitoring with " <<
mon.size() <<
" signatures from " <<
fn << endl;
283 mon.printMonConfig(
cfg.detail);
284 writeJsonFile(
mon,
"HLTMonitoring",
cfg);
286 cerr <<
"File " <<
fn <<
" not recognized as being an L1 or HLT menu or prescale set or bunchgroup set" << endl;
291 if(
cfg.smk != 0 && !
cfg.doCtp ) {
304 cout <<
"Could not load L1 menu. An exception occurred: " << ex.
what() << endl;
307 cout <<
"Loaded L1 menu " <<
l1menu.name() <<
" with " <<
l1menu.size() <<
" items from " <<
cfg.dbalias <<
" with SMK " <<
cfg.smk << endl;
322 cout <<
"Could not load HLT menu. An exception occurred: " << ex.
what() << endl;
325 cout <<
"Loaded HLT menu " << hltmenu.
name() <<
" with " << hltmenu.
size() <<
" chains from " <<
cfg.dbalias <<
" with SMK " <<
cfg.smk << endl;
341 cout <<
"Could not load HLT job options. An exception occurred: " << ex.
what() << endl;
344 cout <<
"Loaded job options with " << jo.
getObject(
"properties").
getKeys().size() <<
" entries from " <<
cfg.dbalias <<
" with SMK " <<
cfg.smk << endl;
347 for(
const auto&
alg :
ds.data()) {
348 std::cout <<
alg.first << std::endl;
349 for(
const auto& prop :
alg.second ) {
350 std::cout <<
" " << prop.first <<
" -> " << prop.second.data() << std::endl;
366 cout <<
"Could not load HLT monitoring. An exception occurred: " << ex.
what() << endl;
369 cout <<
"Loaded HLT monitoring with " << hltmon.
size() <<
" signatures rom " <<
cfg.dbalias <<
" with SMK " <<
cfg.smk << endl;
379 if(
cfg.smk != 0 &&
cfg.doCtp ) {
386 if(
cfg.l1psk != 0 ) {
394 cout <<
"Could not load L1 prescales. An exception occurred: " << ex.
what() << endl;
397 cout <<
"Loaded L1 prescales set " << l1pss.
name() <<
" with " << l1pss.
size() <<
" prescales from " <<
cfg.dbalias <<
" with L1 PSK " <<
cfg.l1psk << endl;
401 if(
cfg.hltpsk != 0 ) {
409 cout <<
"Could not load HLT prescales. An exception occurred: " << ex.
what() << endl;
412 cout <<
"Loaded HLT prescales set " << hltpss.
name() <<
" with " << hltpss.
size() <<
" prescales from " <<
cfg.dbalias <<
" with HLT PSK " <<
cfg.hltpsk << endl;
416 if(
cfg.bgsk != 0 ) {
424 cout <<
"Could not load bunchgroup set. An exception occurred: " << ex.
what() << endl;
427 cout <<
"Loaded L1 bunchgroup set " << bgs.
name() <<
" with " << bgs.
size() <<
" bunchgroups from " <<
cfg.dbalias <<
" with BGSK " <<
cfg.bgsk << endl;