120 JMultipleFileScanner<JDatalog> inputFile;
128 JParser<> zap(
"Auxiliary program to convert ROOT TTree with slow control data to ROOT TGraph's.");
130 zap[
'f'] =
make_field(inputFile,
"ROOT input file (output file of JTuna).");
131 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
138 catch(
const exception &error) {
139 FATAL(error.what() << endl);
145 void put(
const Double_t x,
const Double_t y)
161 long long int counter = 0;
163 for (inputFile.rewind(); inputFile.hasNext(); ++counter) {
167 JDatalog* p = inputFile.next();
169 if (filter.count(p->parameter) == 0) {
171 JGraph_t&
g1 = data[JKey_t(p->string, p->floor, p->parameter)];
173 g1.put(p->getTime(), p->value);
175 strings.insert(p->string);
176 floors .insert(p->floor);
186 TGraph
g1(i->second.X.size(), i->second.X.data(), i->second.Y.data());
188 g1.SetName(i->first.toString().c_str());
190 const JRange<double> range(i->second.Y.begin(), i->second.Y.end());
192 g1.SetMinimum(range.getLowerLimit());
193 g1.SetMaximum(range.getUpperLimit());
200 os <<
"set_variable NUMBER_OF_STRINGS " << setw(4) << strings.size() <<
";" << endl;
201 os <<
"set_variable NUMBER_OF_FLOORS " << setw(4) << floors. size() <<
";" << endl;
202 if (!strings.empty()) {
203 os <<
"set_variable FIRST_STRING " << setw(4) << *strings. begin() <<
";" << endl;
204 os <<
"set_variable LAST_STRING " << setw(4) << *strings.rbegin() <<
";" << endl;
206 if (!floors.empty()) {
207 os <<
"set_variable FIRST_FLOOR " << setw(4) << *floors. begin() <<
";" << endl;
208 os <<
"set_variable LAST_FLOOR " << setw(4) << *floors. rbegin() <<
";" << endl;
210 os <<
"set_array STRINGS ";
211 copy(strings.begin(), strings.end(), ostream_iterator<int>(os,
" "));
214 TNamed meta(
"TUNA", os.str().c_str());