34 int main(
int argc, 
char **argv)
 
   45     JParser<> zap(
"Auxiliary program to print the axis label of a ROOT histogram.");
 
   47     zap[
'f'] = 
make_field(inputFile,  
"<input file>:<object name>");
 
   48     zap[
'A'] = 
make_field(axis,       
"axis") = 
'x', 
'X', 
'y', 
'Y', 
'z', 
'Z';
 
   53   catch(
const exception &error) {
 
   54     FATAL(error.what() << endl);
 
   59     DEBUG(
"Input: " << *input << endl);
 
   64       ERROR(
"File: " << input->getFullFilename() << 
" not opened." << endl);
 
   68     const TRegexp regexp(input->getObjectName());
 
   70     TIter iter(dir->GetListOfKeys());
 
   72     for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
 
   74       const TString tag(key->GetName());
 
   76       DEBUG(
"Key: " << tag << 
" match = " << tag.Contains(regexp) << endl);
 
   80       if (tag.Contains(regexp) && 
isTObject(key)) {
 
   82         TH1* h = (TH1*) key->ReadObj();
 
   88           cout << h->GetXaxis()->GetTitle() << endl;
 
   94           cout << h->GetYaxis()->GetTitle() << endl;
 
  101           TAxis* Zaxis = h->GetZaxis();
 
  104             cout << h->GetZaxis()->GetTitle() << endl;
 
  106             ERROR(
"Histogram " << h->GetName() << 
" does not have a Z-axis.");
 
General purpose messaging.
 
#define DEBUG(A)
Message macros.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
int main(int argc, char **argv)
 
I/O formatting auxiliaries.
 
Utility class to parse command line options.
 
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer.
 
bool isTObject(const TKey *key)
Check if given key corresponds to a TObject.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).