5 #include "TTimeStamp.h"
29 int main(
int argc,
char **argv)
47 JParser<> zap(
"Example program to print run related data from data base.");
57 zap[
'O'] =
make_field(option,
"print UNIX time as TTimeStamp::AsString(<option>)") =
"";
62 catch(
const exception &error) {
63 FATAL(error.what() << endl);
68 format = getColumns<JRuns>();
75 const int id = getDetector<int>(detid);
77 selection += getSelector<JRuns>(id);
79 ResultSet& rs =
getResultSet(getTable<JRuns>(), selection);
83 if (TString(parameters.RUNSETUPNAME.c_str()).Contains(regexp)) {
87 if (option !=
"" && *
i ==
"UNIXJOBSTART")
88 cout <<
' ' << TTimeStamp((time_t) (parameters.UNIXJOBSTART /1000)).AsString(option.c_str());
89 else if (option !=
"" && *
i ==
"UNIXJOBEND")
90 cout <<
' ' << TTimeStamp((time_t) (parameters.UNIXJOBEND /1000)).AsString(option.c_str());
99 catch(
const exception& error) {
100 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
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
Auxiliary data structure for streaming of STL containers.
General purpose messaging.
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.