24 int main(
int argc,
char **argv)
34 JParser<> zap(
"Auxiliary program to print ROOT TTree information.");
41 catch(
const exception &error) {
42 FATAL(error.what() << endl);
45 gErrorIgnoreLevel = kFatal;
49 int number_of_errors = 0;
53 TFile*
file = TFile::Open(file_name->c_str());
55 cout << *file_name << flush;
61 TIter iter(file->GetListOfKeys(), kIterBackward);
63 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
65 TKey* p =
dynamic_cast<TKey*
>(file->GetListOfKeys()->Before(key));
67 if (p == NULL || strcmp(key->GetName(), p->GetName()) != 0) {
69 TTree* tree =
dynamic_cast<TTree*
>(key->ReadObj());
73 TBranch* branch =
dynamic_cast<TBranch*
>(tree->GetListOfBranches()->At(0));
76 cout << setw(24) << left << key->GetName() <<
' '
77 << setw(32) << left << branch->GetClassName() <<
' '
78 << setw(10) << right << tree->GetEntries() <<
' '
79 << setw( 6) << right << (tree->GetTotBytes() >> 20) <<
" [MB]" << endl;
93 cout <<
" not opened." << endl;
97 return (number_of_errors == 0 ? 0 : 1);
Utility class to parse command line options.
int main(int argc, char *argv[])
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
static JGlob getFilenames
Function object to get list of files for given pattern.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.