12#include "TTimeStamp.h"
40 JKey_t(
const int string,
42 const std::string& parameter) :
56 friend inline bool operator<(
const JKey_t& first,
const JKey_t& second)
58 if (first.string == second.string) {
60 if (first.floor == second.floor)
61 return first.parameter < second.parameter;
63 return first.floor < second.floor;
67 return first.string < second.string;
77 std::string toString()
const
79 std::ostringstream os;
94 friend inline std::ostream&
operator<<(std::ostream& out,
const JKey_t&
object)
98 return out <<
setw(3) <<
setfill(
'0') <<
object.string <<
'.'
100 <<
setfill(
' ') <<
object.parameter;
105 std::string parameter;
122 JLimit_t& numberOfEvents = inputFile.getLimit();
129 JParser<> zap(
"Auxiliary program to convert ROOT TTree with slow control data to ROOT TGraph's.");
131 zap[
'f'] =
make_field(inputFile,
"ROOT input file (output file of JTuna).");
139 catch(
const exception &error) {
149 long long int counter = 0;
151 for (inputFile.rewind(); inputFile.hasNext(); ++counter) {
174 JGraph g1(i->second, i->first.toString().c_str());
176 const JRange<double> range(i->second.Y.begin(), i->second.Y.end());
178 g1.SetMinimum(range.getLowerLimit());
179 g1.SetMaximum(range.getUpperLimit());
186 os <<
"set_variable NUMBER_OF_STRINGS " <<
setw(4) << strings.size() <<
";" <<
endl;
187 os <<
"set_variable NUMBER_OF_FLOORS " <<
setw(4) <<
floors. size() <<
";" <<
endl;
188 if (!strings.empty()) {
189 os <<
"set_variable FIRST_STRING " <<
setw(4) << *strings. begin() <<
";" <<
endl;
190 os <<
"set_variable LAST_STRING " <<
setw(4) << *strings.rbegin() <<
";" <<
endl;
193 os <<
"set_variable FIRST_FLOOR " <<
setw(4) << *
floors. begin() <<
";" <<
endl;
194 os <<
"set_variable LAST_FLOOR " <<
setw(4) << *
floors. rbegin() <<
";" <<
endl;
196 os <<
"set_array STRINGS ";
200 TNamed meta(
"TUNA", os.str().c_str());
ROOT TTree parameter settings.
General purpose messaging.
#define DEBUG(A)
Message macros.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Double_t g1(const Double_t x)
Function.
Auxiliary class to define a range between two values.
int main(int argc, char **argv)
Template definition of a multi-dimensional oscillation probability interpolation table.
void copy(const Head &from, JHead &to)
Copy header from from to to.
bool operator<(const Head &first, const Head &second)
Less than operator.
std::ostream & operator<<(std::ostream &out, const morphology_type &object)
Write morphology to output stream.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getTime() const
Get time.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary data structure to build TGraph.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.