Jpp  17.3.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JPrintChain.cc File Reference

Auxiliary program to print ROOT TChain information. More...

#include <string>
#include <iostream>
#include <iomanip>
#include "TError.h"
#include "TROOT.h"
#include "TFile.h"
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "JDAQ/JDAQEventIO.hh"
#include "JDAQ/JDAQTimesliceIO.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "antares-dataformat/TimeSlice.hh"
#include "antares-dataformat/PhysicsEvent.hh"
#include "JROOT/JTreeParameters.hh"
#include "JROOT/JChainReader.hh"
#include "JSupport/JSupport.hh"
#include "JLang/JBool.hh"
#include "JLang/JType.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Auxiliary program to print ROOT TChain information.

Author
mdejong

Definition in file JPrintChain.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 95 of file JPrintChain.cc.

96 {
97  using namespace std;
98  using namespace JPP;
99 
101 
102  vector<string> inputFile;
103  int debug;
104 
105  try {
106 
107  JParser<> zap("Auxiliary program to print ROOT TChain information.");
108 
109  zap['f'] = make_field(inputFile);
110  zap['d'] = make_field(debug) = 1;
111 
112  zap(argc, argv);
113  }
114  catch(const exception &error) {
115  FATAL(error.what() << endl);
116  }
117 
118 
119  JType<typelist> type;
120 
121  JChainList inspector(type);
122 
123  for (JChainList::iterator i = inspector.begin(); i != inspector.end(); ++i) {
124  for (vector<string>::const_iterator file = inputFile.begin(); file != inputFile.end(); ++file) {
125  (*i)->Add(file->c_str());
126  }
127  }
128 
129  DEBUG("Number of files " << inputFile.size() << endl);
130 
131  gErrorIgnoreLevel = kFatal;
132 
133  for (JChainList::iterator i = inspector.begin(); i != inspector.end(); ++i) {
134  cout << setw(24) << left << (*i)->GetName() << ' '
135  << setw(10) << right << (*i)->GetEntries() << endl;
136  }
137 }
Utility class to parse command line options.
Definition: JParser.hh:1517
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
Auxiliary class for a type holder.
Definition: JType.hh:19
Type list.
Definition: JTypeList.hh:22
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1993
#define FATAL(A)
Definition: JMessage.hh:67
int debug
debug level
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62