Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPrintTriggerParameters.cc
Go to the documentation of this file.
1 
2 #include <string>
3 #include <iostream>
4 #include <iomanip>
5 
7 #include "JTrigger/JTriggerDictionary.hh"
10 #include "JSupport/JSupport.hh"
11 #include "JROOT/JRootPrinter.hh"
12 #include "Jeep/JParser.hh"
13 #include "Jeep/JMessage.hh"
14 
15 
16 /**
17  * \file
18  * Auxiliary program to print trigger parameters.
19  *
20  * \author mdejong
21  */
22 int main(int argc, char **argv)
23 {
24  using namespace std;
25  using namespace JPP;
26 
28  string key;
29  int debug;
30 
31  try {
32 
33  JParser<> zap("Auxiliary program to print trigger parameters.");
34 
35  zap['f'] = make_field(inputFile);
36  zap['k'] = make_field(key) = "";
37  zap['d'] = make_field(debug) = 1;
38 
39  zap(argc, argv);
40  }
41  catch(const exception& error) {
42  FATAL(error.what() << endl);
43  }
44 
45  while (inputFile.hasNext()) {
46 
47  if (key == "")
48  cout << *inputFile.next();
49  else
50  JRootPrinter::print(cout, *inputFile.next(), key, JTriggerDictionary::getInstance());
51 
52  cout << endl;
53  }
54 
55  return 0;
56 }
Template specialisation of JMultipleFileScanner for trigger parameters.
Utility class to parse command line options.
Definition: JParser.hh:1500
int main(int argc, char *argv[])
Definition: Main.cc:15
ROOT TTree parameter settings of various packages.
Print objects in ASCII format using ROOT dictionary.
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:75
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1961
int debug
debug level
Definition: JSirene.cc:63
print
Definition: JConvertDusj.sh:44
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:67
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.