23int main(
int argc,
char **argv)
39 zap[
'n'] =
make_field(numberOfEvents,
"number of events, if applicable") = 1;
44 catch(
const exception &error) {
45 FATAL(error.what() << endl);
48 gErrorIgnoreLevel = kError;
51 TFile* in = TFile::Open(inputFile.c_str());
53 if (in == NULL || !in->IsOpen()) {
54 FATAL(
"Error opening file " << inputFile << endl);
57 if (
debug >= debug_t) {
58 for (TIter i(in->GetListOfKeys()); TKey* key =
dynamic_cast<TKey*
>(i.Next()); ) {
59 cout <<
"key: " << key->GetName() <<
' ' << key->GetClassName() << endl;
63 TKey* key = in->GetKey(
target.c_str());
71 TClass* cs = TClass::GetClass(key->GetClassName());
75 void* ps = key->ReadObjectAny(cs);
77 if (cs == TTree::Class()) {
79 TTree* ts = (TTree*) ps;
83 for (TIter next(ts->GetListOfBranches()); TBranch*
p1 =
dynamic_cast<TBranch*
>(next()); ) {
90 ts->GetBranch(tp.getName())->SetAddress(tp.getAddress());
95 cout << ts->GetName() <<
"[" << i <<
"]:" << endl;
106 printer(cout, cs->GetStreamerInfo(), (
const char*) ps);