Jpp
 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 
10 #include "JSupport/JSupport.hh"
11 #include "Jeep/JParser.hh"
12 #include "Jeep/JMessage.hh"
13 
14 
15 /**
16  * \file
17  * Auxiliary program to print trigger parameters.
18  *
19  * \author mdejong
20  */
21 int main(int argc, char **argv)
22 {
23  using namespace std;
24  using namespace JPP;
25 
26  JMultipleFileScanner<JTriggerParameters> inputFile;
27  string key;
28  int debug;
29 
30  try {
31 
32  JParser<> zap("Auxiliary program to print trigger parameters.");
33 
34  zap['f'] = make_field(inputFile);
35  zap['k'] = make_field(key) = "";
36  zap['d'] = make_field(debug) = 1;
37 
38  zap(argc, argv);
39  }
40  catch(const exception& error) {
41  FATAL(error.what() << endl);
42  }
43 
44  while (inputFile.hasNext()) {
45  print(cout, *inputFile.next(), key, JRootDictionary::getInstance());
46  }
47 }
Utility class to parse command line options.
Definition: JParser.hh:1410
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
T & getInstance(const T &object)
Get static instance from temporary object.
Definition: JObject.hh:73
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
int debug
debug level
Definition: JSirene.cc:59
General purpose messaging.
#define FATAL(A)
Definition: JMessage.hh:65
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
ROOT TTree parameter settings.
int main(int argc, char *argv[])
Definition: Main.cpp:15