#include #include #include #include #include #include #include "TROOT.h" #include "TFile.h" #include "JDB/JDatalog.hh" #include "JDB/JSupport.hh" #include "JSupport/JMultipleFileScanner.hh" #include "JROOT/JRootToolkit.hh" #include "JLang/JFileStream.hh" #include "Jeep/JPrint.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to print slow control parameters. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; JMultipleFileScanner inputFile; JLimit_t& numberOfEvents = inputFile.getLimit(); int id; int debug; try { JParser<> zap("Auxiliary program to print slow control parameters."); zap['f'] = make_field(inputFile, "ROOT input file (output file of JTuna)."); zap['n'] = make_field(numberOfEvents) = JLimit::max(); zap['S'] = make_field(id, "string identifier (-1 => all)") = -1; zap['d'] = make_field(debug) = 2; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } map > buffer; long long int counter = 0; for (inputFile.rewind(); inputFile.hasNext(); ++counter) { STATUS(setw(10) << counter << '\r'); DEBUG(endl); JDatalog* p = inputFile.next(); if (id == -1 || id == p->string) { buffer[p->floor].insert(p->parameter); } } STATUS(endl); for (map >::const_iterator i = buffer.begin(); i != buffer.end(); ++i) { cout << "floor: " << setw(2) << i->first << ' '; copy(i->second.begin(), i->second.end(), ostream_iterator(cout, " ")); cout << endl; } }