Jpp  15.0.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  cout.tie(&cerr);
119 
120  JType<typelist> type;
121 
122  JChainList inspector(type);
123 
124  for (JChainList::iterator i = inspector.begin(); i != inspector.end(); ++i) {
125  for (vector<string>::const_iterator file = inputFile.begin(); file != inputFile.end(); ++file) {
126  (*i)->Add(file->c_str());
127  }
128  }
129 
130  DEBUG("Number of files " << inputFile.size() << endl);
131 
132  gErrorIgnoreLevel = kFatal;
133 
134  for (JChainList::iterator i = inspector.begin(); i != inspector.end(); ++i) {
135  cout << setw(24) << left << (*i)->GetName() << ' '
136  << setw(10) << right << (*i)->GetEntries() << endl;
137  }
138 }
Utility class to parse command line options.
Definition: JParser.hh:1500
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:1961
int debug
debug level
Definition: JSirene.cc:63
#define FATAL(A)
Definition: JMessage.hh:67
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then usage $script< string identifier >< detectorfile > event file(toashort file)+" "\nNote that the event files and toashort files should be one-to-one related." fi if (( $