Go to the documentation of this file.
41 int main(
const int argc,
const char *
const argv[])
56 JParser<> zap(
"Auxiliary program to check trigger parameters in a given ROOT files against the values from the database.");
67 catch(
const exception& error) {
68 FATAL(error.what() << endl);
72 const double Dmax_m = 9999.0;
78 DEBUG(
"Get trigger parameters from input file." << endl);
84 FATAL(
"No trigger parameters from input." << endl);
87 parametersA.
set(Dmax_m);
99 detector_id = in.
next()->getDetectorID();
100 run_number = in.
next()->getRunNumber();
104 FATAL(
"File does not contain a valid run number. Aborting" << endl);
111 catch(
const exception& error) {
112 FATAL(error.what() << endl);
130 DEBUG(
"Detector " << detector_id <<
" -> " << detid << endl);
132 catch(
const exception& error) {
133 FATAL(error.what() << endl);
151 DEBUG(
"Run setup " << rs_oid << endl);
153 catch(
const exception& error) {
154 FATAL(error.what() << endl);
167 while (rs >> buffer) {
169 umap[buffer.
OID] = buffer.
NAME;
173 if (pos != string::npos) {
177 while (pos + len != buffer.
NAME.length() && buffer.
NAME[pos + len] !=
'=') {
181 zmap[buffer.
OID] = buffer.
NAME.erase(pos, len + 1);
187 DEBUG(
"Parameters map " << zmap.size() << endl);
189 catch(
const exception& error) {
190 FATAL(error.what() << endl);
202 while (rs >> buffer) {
208 if (i != zmap.end()) {
209 data << i->second <<
"=" << buffer.
VALUE <<
";\n";
213 catch(
const exception& error) {
214 FATAL(error.what() << endl);
217 DEBUG(
"Raw data" << endl <<
"<<" << endl << data.str() <<
">>" << endl);
222 parametersB.
set(Dmax_m);
223 parametersB.actionAtFileRead();
246 const bool is_equal = (parametersA == parametersB);
249 NOTICE(
GREEN <<
"The parameters for run " << run_number <<
" are equivalent." <<
RESET << endl);
251 ERROR (
RED <<
"The parameters for run " << run_number <<
" are NOT equivalent." <<
RESET << endl);
253 return (is_equal ? 0 : 1);
int main(const int argc, const char *const argv[])
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
void set(const double DMax_m=0.0)
Set dependent trigger parameters.
Data structure for all trigger parameters.
virtual bool hasNext()
Check availability of next element.
Utility class to parse command line options.
virtual const pointer_type & next()
Get next element.
ResultSet & getResultSet(const std::string &query)
Get result set.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for multiplexing object iterators.
Template definition for getting table specific selector.
void reset(JCLBInput &data, size_t size)
Reset CLB buffers.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define DEBUG(A)
Message macros.
KM3NeT DAQ data structures and auxiliaries.
static const std::string PREFIX_DATAFILTER
This string is prepended to every parameter in the database output for the corresponding process.
Object reading from a list of files.