34 int main(
int argc,
char **argv)
39 typedef JRange<int> JRange_t;
57 JParser<> zap(
"Main program to print quality data from data base.");
64 zap[
'R'] =
make_field(runs,
"Run range") = JRange_t(1, JRange_t::getMaximum());
65 zap[
'S'] =
make_field(source,
"GIT versions") =
getGITTags(TRegexp(
"v[0-9]*\\.[0-9]*\\.[0-9]*$"), JGITTags_t::key_type(
"2019-04-12"));
73 catch(
const exception &error) {
74 FATAL(error.what() << endl);
85 const int ID = getDetector<int> (detid);
86 detid = getDetector<string>(detid);
90 selection += getSelector<JRuns>(
ID, runs.getLowerLimit(), runs.getUpperLimit());
92 ResultSet& rs =
getResultSet(getTable<JRuns>(), selection);
95 if (TString(parameters.RUNSETUPNAME.c_str()).Contains(regexp)) {
96 setups.put(parameters);
111 JSelector selector = getSelector<JRunSummaryNumbers>(detid, runs.getLowerLimit(), runs.getUpperLimit());
113 selector.add(&JRunSummaryNumbers::SOURCE_NAME, *git);
117 ResultSet& rs =
getResultSet(getTable<JRunSummaryNumbers>(), selector);
119 for (JRunSummaryNumbers parameters; rs >>
parameters; ) {
120 if (setups.count(parameters.RUN) != 0) {
121 zmap[parameters.RUN].insert(make_pair(parameters.PARAMETER_NAME, parameters.DATA_VALUE));
127 catch(
const exception& error) {}
129 for (map_type::const_iterator run = zmap.begin(); run != zmap.end(); ++run) {
134 quality.detector =
ID;
135 quality.run = run->first;
136 quality.name = setups[run->first].name;
137 quality.value = setups[run->first].value;
139 for (data_type::const_iterator
i = run->second.begin();
i != run->second.end(); ++
i) {
140 quality.put(
i->first,
i->second);
143 buffer.insert(quality);
147 catch(
const exception& error) {
148 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
std::vector< event_type > data_type
std::map< int, buffer_type > map_type
string -> hits
std::vector< std::string > getGITTags(const TRegexp ®exp, const JGITTags_t::key_type &date)
Get selection of GIT tags.
Print objects in ASCII format using ROOT dictionary.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR $JPP_DATA km3net_reference detx set_variable NUMBER_OF_STRINGS set_variable ID if do_usage *then usage $script[detector file[identifier]] fi case set_variable ID
Auxiliary data structure for streaming of STL containers.
General purpose messaging.
Auxiliary class to define a range between two values.
Utility class to parse command line options.
ResultSet & getResultSet(const std::string &query)
Get result set.
std::vector< JServer > getServernames()
Get list of names of available database servers.