28 static const char* plain_t =
"plain";
29 static const char* json_t =
"JSON";
37 int main(
int argc,
char **argv)
50 JParser<> zap(
"Auxiliary program to print Jpp meta data.");
53 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
55 zap[
'O'] =
make_field(option) = plain_t, json_t;
60 catch(
const exception &error) {
61 FATAL(error.what() << endl);
66 if (application !=
"") {
68 TFile*
in = TFile::Open(inputFile.c_str(),
"exists");
70 if (in != NULL && in->IsOpen()) {
72 const TRegexp regexp(application.c_str());
74 TIter iter(in->GetListOfKeys());
76 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
78 const TString tag(key->GetName());
80 if (tag.Contains(regexp)) {
82 TNamed* named =
dynamic_cast<TNamed*
>(key->ReadObj());
85 cout << named->GetName() <<
"[" << key->GetCycle() <<
"] " << named->GetTitle() << endl;
94 ERROR(
"Error opening file: " << inputFile << endl);
108 if (option == plain_t) {
109 cout << *meta << endl;
110 }
else if (option == json_t) {
115 if (option == json_t) {
116 cout << setw(4) << js << endl;
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Auxiliary class for multiplexing object iterators.
Auxiliary class for defining the range of iterations of objects.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
virtual const pointer_type & next() override
Get next element.
virtual bool hasNext() override
Check availability of next element.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in