22 int main(
int argc,
char **argv)
31 JParser<> zap(
"Auxiliary program to print ROOT TTree information.");
38 catch(
const exception &error) {
39 FATAL(error.what() << endl);
44 gErrorIgnoreLevel = kFatal;
46 int number_of_errors = 0;
50 TFile* file = TFile::Open(file_name->c_str());
52 cout << *file_name << flush;
58 TIter iter(file->GetListOfKeys(), kIterBackward);
60 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
62 TKey* p =
dynamic_cast<TKey*
>(file->GetListOfKeys()->Before(key));
64 if (p == NULL || strcmp(key->GetName(), p->GetName()) != 0) {
66 TTree* tree =
dynamic_cast<TTree*
>(key->ReadObj());
70 TBranch* branch =
dynamic_cast<TBranch*
>(tree->GetListOfBranches()->At(0));
73 cout << setw(24) << left << key->GetName() <<
' '
74 << setw(32) << left << branch->GetClassName() <<
' '
75 << setw(10) << right << tree->GetEntries() <<
' '
76 << setw( 6) << right << (tree->GetTotBytes() >> 20) <<
" [MB]" << endl;
86 cout <<
" not opened." << endl;
90 return (number_of_errors == 0 ? 0 : 1);
Utility class to parse command line options.
int main(int argc, char *argv[])
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.