30 int main(
int argc,
char **argv)
41 JParser<> zap(
"Auxiliary program to print quantiles from ROOT histograms.");
43 zap[
'f'] =
make_field(inputFile,
"<input file>:<object name>");
49 catch(
const exception &error) {
50 FATAL(error.what() << endl);
56 DEBUG(
"Input: " << *input << endl);
61 ERROR(
"File: " << input->getFullFilename() <<
" not opened." << endl);
65 const TRegexp regexp(input->getObjectName());
67 TIter iter(dir->GetListOfKeys());
69 for (TKey* key; (key = (TKey*) iter.Next()) != NULL; ) {
71 const TString tag(key->GetName());
73 DEBUG(
"Key: " << tag <<
" match = " << tag.Contains(regexp) << endl);
77 if (tag.Contains(regexp) &&
isTObject(key)) {
79 TObject*
object = key->ReadObj();
81 TH1*
h1 =
dynamic_cast<TH1*
>(object);
87 h1->GetQuantiles(
Q.size(), X.data(),
Q.data());
Utility class to parse command line options.
Q(UTCMax_s-UTCMin_s)-livetime_s
int main(int argc, char *argv[])
then for HISTOGRAM in h0 h1
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
then break fi done getCenter read X Y Z let X
General purpose messaging.
Utility class to parse command line options.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
bool isTObject(const TKey *key)
Check if given key corresponds to a TObject.
TDirectory * getDirectory(const JRootObjectID &id)
Get TDirectory pointer.