117{
120
122 JLimit_t& numberOfEvents = inputFile.getLimit();
126
127 try {
128
129 JParser<> zap(
"Auxiliary program to convert ROOT TTree with slow control data to ROOT TGraph's.");
130
131 zap[
'f'] =
make_field(inputFile,
"ROOT input file (output file of JTuna).");
136
137 zap(argc, argv);
138 }
139 catch(const exception &error) {
140 FATAL(error.what() << endl);
141 }
142
143
145
148
149 long long int counter = 0;
150
152
154
156
158
160
162
163 strings.insert(p->
string);
164 floors .insert(p->
floor);
165 }
166 }
168
169
171
173
174 JGraph g1(i->second, i->first.toString().c_str());
175
176 const JRange<double> range(i->second.Y.begin(), i->second.Y.end());
177
178 g1.SetMinimum(range.getLowerLimit());
179 g1.SetMaximum(range.getUpperLimit());
180
182 }
183
184 ostringstream os;
185
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;
191 }
192 if (!floors.empty()) {
193 os << "set_variable FIRST_FLOOR " << setw(4) << *floors. begin() << ";" << endl;
194 os << "set_variable LAST_FLOOR " << setw(4) << *floors. rbegin() << ";" << endl;
195 }
196 os << "set_array STRINGS ";
197 copy(strings.begin(), strings.end(), ostream_iterator<int>(os,
" "));
198 os << endl;
199
200 TNamed meta("TUNA", os.str().c_str());
201
202 out << meta;
203
204 out.Write();
205 out.Close();
206}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Double_t g1(const Double_t x)
Function.
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual void rewind() override
Rewind.
virtual bool hasNext() override
Check availability of next element.
virtual const pointer_type & next() override
Get next element.
void copy(const Head &from, JHead &to)
Copy header from from to to.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool filter(const JDAQEvent &tev, const JEvt &evt, const Evt *const pE)
Event selection.
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.