Jpp
 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 "evt/Head.hh"
#include "evt/Evt.hh"
#include "JDAQ/JDAQEvent.hh"
#include "JDAQ/JDAQTimeslice.hh"
#include "JDAQ/JDAQSummaryslice.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  NOTICE(""
136  << setw(24) << left << (*i)->GetName() << ' '
137  << setw(10) << right << (*i)->GetEntries() << endl);
138  }
139 }
Utility class to parse command line options.
Definition: JParser.hh:1410
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:1836
#define NOTICE(A)
Definition: JMessage.hh:62
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:60