28 static const char* plain_t =
"plain";
29 static const char* json_t =
"JSON";
37 int main(
int argc,
char **argv)
51 JParser<> zap(
"Auxiliary program to print Jpp meta data.");
54 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
56 zap[
'O'] =
make_field(option) = plain_t, json_t;
68 catch(
const exception &error) {
69 FATAL(error.what() << endl);
74 if (application !=
"") {
76 TFile*
in = TFile::Open(inputFile.c_str(),
"exists");
78 if (in != NULL && in->IsOpen()) {
80 const TRegexp regexp(application.c_str());
82 TIter iter(in->GetListOfKeys());
84 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
86 const TString tag(key->GetName());
88 if (tag.Contains(regexp)) {
90 TNamed* named =
dynamic_cast<TNamed*
>(key->ReadObj());
93 cout << named->GetName() <<
"[" << key->GetCycle() <<
"] " << named->GetTitle() << endl;
102 ERROR(
"Error opening file: " << inputFile << endl);
116 if (option == plain_t) {
120 cout << (*meta) << endl;
124 for (
const auto& i : key) {
125 cout <<
' ' << (*meta)[i];
130 }
else if (option == json_t) {
136 if (option == json_t) {
137 cout << setw(4) << js << endl;
Utility class to parse command line options.
static const char *const GITrelease_t
GIT release.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for multiplexing object iterators.
static const char *const ROOTrelease_t
ROOT release.
static const char *const SVNrelease_t
SVN release.
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.
static const char *const system_t
system information
Scanning of objects from multiple files according a format that follows from the extension of each fi...
static const char *const namespace_t
name space
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
static const char *const command_t
Linux command.
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 CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in