GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TScaler.cxx
Go to the documentation of this file.
1#include "TScaler.h"
2
3#include <iomanip>
4
5#include "TROOT.h"
6
8{
9 Clear();
10 fScaler.resize(4); // we expect to have four scaler values
11}
12
13TScalerData::TScalerData(const TScalerData& rhs) : TObject(rhs)
14{
15 rhs.Copy(*this);
16}
17
18void TScalerData::Copy(TObject& rhs) const
19{
20 static_cast<TScalerData&>(rhs).fAddress = fAddress;
21 static_cast<TScalerData&>(rhs).fScaler = fScaler;
23 static_cast<TScalerData&>(rhs).fLowTimeStamp = fLowTimeStamp;
24 static_cast<TScalerData&>(rhs).fHighTimeStamp = fHighTimeStamp;
25}
26
27void TScalerData::Clear(Option_t*)
28{
29 /// Clears the TScalerData.
31 fAddress = 0;
32 fScaler.clear();
33 fLowTimeStamp = 0;
35}
36
37void TScalerData::Print(Option_t*) const
38{
39 std::cout << "time: " << std::setw(16) << GetTimeStamp() << ", address: " << hex(fAddress, 4);
40 for(size_t i = 0; i < fScaler.size(); ++i) {
41 std::cout << "\t Scaler[" << i << "]: " << hex(fScaler[i], 8);
42 }
43 std::cout << std::endl;
44}
45
46TScaler::TScaler(bool loadIntoMap)
47 : fTree(static_cast<TTree*>(gROOT->FindObject("ScalerTree")))
48{
49 /// This constructor tries to find the "ScalerTree" and uses it (if requested) to load the scaler data into the map.
50 ///\param[in] loadIntoMap Flag telling TScaler to load all scaler data into fScalerMap.
51 ReadTree(loadIntoMap);
52}
53
54TScaler::TScaler(TTree* tree, bool loadIntoMap)
55 : fTree(tree)
56{
57 ReadTree(loadIntoMap);
58}
59
60void TScaler::ReadTree(bool loadIntoMap)
61{
62 if(fTree != nullptr) {
63 fEntries = fTree->GetEntries();
64 fTree->SetBranchAddress("ScalerData", &fScalerData);
65 if(loadIntoMap) {
66 for(Long64_t entry = 0; entry < fEntries; ++entry) {
67 fTree->GetEntry(entry);
69 }
70 }
71 }
72}
73
74TScaler::TScaler(const TScaler& rhs) : TObject(rhs)
75{
76 rhs.Copy(*this);
77}
78
80{
81 // Clear() deletes histograms which can cause problems with root assuming ownership of all histograms
82 fTree = nullptr;
83 fScalerData = nullptr;
84 fEntries = 0;
85 fTimePeriod.clear();
89 fPPG = nullptr;
90 fHist.clear();
91 fHistRange.clear();
92 fScalerMap.clear();
93}
94
95void TScaler::Copy(TObject& obj) const
96{
97 static_cast<TScaler&>(obj).Clear();
98 static_cast<TScaler&>(obj).fTree = fTree;
99 static_cast<TScaler&>(obj).fScalerData = fScalerData;
100 static_cast<TScaler&>(obj).fEntries = fEntries;
101 static_cast<TScaler&>(obj).fTimePeriod = fTimePeriod;
103 static_cast<TScaler&>(obj).fTotalTimePeriod = fTotalTimePeriod;
105 static_cast<TScaler&>(obj).fScalerMap = fScalerMap;
106}
107
108std::vector<UInt_t> TScaler::GetScaler(UInt_t address, ULong64_t time) const
109{
110 /// Returns the vector of scaler values for address "address" at the time "time".
111 /// If the time is after the last entry, we return the last entry, otherwise we return the following entry (or the
112 /// current entry if the time is an exact match).
113 if(fTree == nullptr || fEntries == 0) {
114 std::cout << "Empty" << std::endl;
115 return std::vector<UInt_t>(0);
116 }
117 if(!fScalerMap.empty()) {
118 // Check that this address exists
119 if(fScalerMap.find(address) == fScalerMap.end()) {
120 return {};
121 }
122 auto currIt = fScalerMap.find(address)->second.lower_bound(time);
123 // if the time is after our last entry, we return the last entry
124 if(currIt == fScalerMap.find(address)->second.end()) {
125 return std::prev(fScalerMap.find(address)->second.end())->second;
126 }
127 // The lower_bound function returns an iterator to the NEXT map element or the current map element if the time is
128 // a perfect match.
129 return currIt->second;
130 }
131 // loop through the tree and find the right entry
132 for(Long64_t entry = 0; entry < fEntries; ++entry) {
133 fTree->GetEntry(entry);
134 // got the exact time match, so we return the current value
135 if(fScalerData->GetAddress() == address && fScalerData->GetTimeStamp() == time) {
136 return fScalerData->GetScaler();
137 }
138 // got a scaler that is later than our requested time, so we need to find the previous time and return that one
139 if(fScalerData->GetAddress() == address && fScalerData->GetTimeStamp() > time) {
140 for(--entry; entry >= 0; --entry) {
141 if(fScalerData->GetAddress() == address) {
142 return fScalerData->GetScaler();
143 }
144 }
145 // if we failed to find any previous data we return a vector of zeros
146 return {0, 0, 0, 0};
147 }
148 }
149 // failed to find any matching time so we just return the very last value (or should we search for the last value of
150 // this address?)
151 return fScalerData->GetScaler();
152}
153
154UInt_t TScaler::GetScaler(UInt_t address, ULong64_t time, size_t index) const
155{
156 std::vector<UInt_t> values = GetScaler(address, time);
157 if(index < values.size()) {
158 return values[index];
159 }
160 return 0;
161}
162
163UInt_t TScaler::GetScalerDifference(UInt_t address, ULong64_t time, size_t index) const
164{
165 /// Returns the difference between "index"th scaler value for address "address" at the time "time" and the previous
166 /// scaler value.
167 /// If the time is after our last entry, we return the last entry divided by the number of entries,
168 /// if this is before the first scaler, we just return the first scaler, otherwise we return the scaler minus the
169 /// previous scaler.
170 if(fTree == nullptr || fEntries == 0) {
171 std::cout << "Empty" << std::endl;
172 return 0;
173 }
174 if(!fScalerMap.empty()) {
175 // Check that this address exists
176 if(fScalerMap.find(address) == fScalerMap.end()) {
177 return 0;
178 }
179 auto currIt = fScalerMap.find(address)->second.lower_bound(time);
180 // if the time is after our last entry, we return the last entry divided by the number of entries
181 if(currIt == fScalerMap.find(address)->second.end()) {
182 return std::prev(fScalerMap.find(address)->second.end())->second[index] /
183 fScalerMap.find(address)->second.size();
184 }
185 // if this is the before or at the first scaler, we just return the first scaler
186 if(currIt == fScalerMap.find(address)->second.begin()) {
187 return fScalerMap.find(address)->second.begin()->second[index];
188 }
189 // otherwise we return the scaler minus the previous scaler
190 return (currIt->second[index]) - (std::prev(currIt)->second[index]);
191 }
192 // loop through the tree and find the right entry
193 for(Long64_t entry = 0; entry < fEntries; ++entry) {
194 fTree->GetEntry(entry);
195 // got the exact time match, so we look for the previous value
196 if(fScalerData->GetAddress() == address && fScalerData->GetTimeStamp() == time) {
197 UInt_t currentValue = fScalerData->GetScaler(index);
198 for(--entry; entry >= 0; --entry) {
199 if(fScalerData->GetAddress() == address) {
200 return currentValue - fScalerData->GetScaler(index);
201 }
202 }
203 return currentValue;
204 }
205 // got a scaler that is later than our requested time, so we need to find the previous time and return that one
206 if(fScalerData->GetAddress() == address && fScalerData->GetTimeStamp() > time) {
207 for(--entry; entry >= 0; --entry) {
208 if(fScalerData->GetAddress() == address) {
209 // got the current entry, so we look for the previous value
210 UInt_t currentValue = fScalerData->GetScaler(index);
211 for(--entry; entry >= 0; --entry) {
212 if(fScalerData->GetAddress() == address) {
213 return currentValue - fScalerData->GetScaler(index);
214 }
215 }
216 // failed to find a previous entry, so we return the current value
217 return currentValue;
218 }
219 }
220 // if we failed to find any previous data we return zero
221 return 0;
222 }
223 }
224 // failed to find any matching time, so we return 0 (???)
225 return 0;
226}
227
228void TScaler::Clear(Option_t*)
229{
230 fTree = nullptr;
231 fScalerData = nullptr;
232 fEntries = 0;
233 fTimePeriod.clear();
234 fNumberOfTimePeriods.clear();
237 fPPG = nullptr;
238 for(auto& addrIt : fHist) {
239 if(addrIt.second != nullptr) {
240 delete (addrIt.second);
241 addrIt.second = nullptr;
242 }
243 }
244 fHist.clear();
245 for(auto& addrIt : fHistRange) {
246 if(addrIt.second != nullptr) {
247 delete (addrIt.second);
248 addrIt.second = nullptr;
249 }
250 }
251 fHistRange.clear();
252 fScalerMap.clear();
253}
254
255TH1D* TScaler::Draw(UInt_t address, size_t index, Option_t* option)
256{
257 /// Draw scaler differences (i.e. current scaler minus last scaler) vs. time in cycle.
258 /// Passing "redraw" as option forces re-drawing of the histogram (e.g. for a different index).
259 if(fTree == nullptr || fEntries == 0) {
260 std::cout << "Empty" << std::endl;
261 return nullptr;
262 }
263
264 // if the address doesn't exist in the histogram map, insert a null pointer
265 if(fHist.find(address) == fHist.end()) {
266 fHist[address] = nullptr;
267 }
268 // try and find the ppg (if we haven't already done so)
269 if(fPPG == nullptr) {
270 fPPG = TPPG::Get(); // static_cast<TPPG*>(gROOT->FindObject("TPPG"));
271 // if we can't find the ppg we're done here
272 if(fPPG == nullptr) {
273 return nullptr;
274 }
275 }
276
277 TString opt = option;
278 opt.ToLower();
279 // if the histogram hasn't been created yet or the "redraw" option has been given, we create the histogram
280 Int_t opt_index = opt.Index("redraw");
281 if(fHist[address] == nullptr || opt_index >= 0) {
282 // we only need to create a new histogram if this is the first time drawing it, if we're just re-drawing we can
283 // re-use the existing histogram
284 if(fHist[address] == nullptr) {
285 int nofBins = fPPG->GetCycleLength() / GetTimePeriod(address);
286 fHist[address] = new TH1D(Form("TScalerHist_%04x", address),
287 Form("scaler %d vs time in cycle for address 0x%04x; time in cycle [ms]; counts/%.0f ms",
288 static_cast<int>(index), address, static_cast<double>(fPPG->GetCycleLength()) / 1e5 / nofBins),
289 nofBins, 0., static_cast<double>(fPPG->GetCycleLength()) / 1e5);
290 // fHist[address]->ResetBit(kMustCleanup);
291 }
292 // we have to skip the first data point in case this is a sub-run
293 // loop over the remaining scaler data for this address
294 UInt_t previousValue = 0;
295 for(Long64_t entry = 0; entry < fEntries; ++entry) {
296 fTree->GetEntry(entry);
297 if(fScalerData->GetAddress() == address) {
298 // fill the difference between the current and the next scaler (if we found a previous value and that one is
299 // smaller than the current one)
300 if(previousValue != 0 && previousValue < fScalerData->GetScaler(index)) {
301 fHist[address]->Fill(static_cast<double>(fPPG->GetTimeInCycle(fScalerData->GetTimeStamp())) / 1e6,
302 fScalerData->GetScaler(index) - previousValue);
303 }
304 previousValue = fScalerData->GetScaler(index);
305 }
306 if(entry % 1000 == 0) {
307 std::cout << std::setw(3) << (100 * entry) / fEntries << " % done\r" << std::flush;
308 }
309 }
310 std::cout << "100 % done\r" << std::flush;
311 }
312 // if redraw was part of the original options, remove it from the options passed on
313 if(opt_index >= 0) {
314 opt.Remove(opt_index, 6);
315 }
316
317 fHist[address]->Draw(opt);
318
319 return fHist[address];
320}
321
322TH1D* TScaler::Draw(UInt_t lowAddress, UInt_t highAddress, size_t index, Option_t* option)
323{
324 /// Draw scaler differences (i.e. current scaler minus last scaler) vs. time in cycle.
325 /// Passing "redraw" as option forces re-drawing of the histogram (e.g. for a different index).
326 /// The "single" options creates spectra for all single addresses in the given range (instead of one accumulative
327 /// spectrum).
328 if(fTree == nullptr || fEntries == 0) {
329 std::cout << "Empty" << std::endl;
330 return nullptr;
331 }
332
333 // try and find the ppg (if we haven't already done so)
334 if(fPPG == nullptr) {
335 fPPG = TPPG::Get(); // static_cast<TPPG*>(gROOT->FindObject("TPPG"));
336 // if we can't find the ppg we're done here
337 if(fPPG == nullptr) {
338 return nullptr;
339 }
340 }
341
342 TString opt = option;
343 opt.ToLower();
344 // if the histogram hasn't been created yet or the "redraw" option has been given, we create the histogram
345 Int_t draw_index = opt.Index("redraw");
346 Int_t single_index = opt.Index("single");
347
348 if(single_index < 0) {
349 // draw the whole range of addresses in a single histogram
350 // if the address doesn't exist in the histogram map, insert a null pointer
351 if(fHistRange.find(std::make_pair(lowAddress, highAddress)) == fHistRange.end()) {
352 fHistRange[std::make_pair(lowAddress, highAddress)] = nullptr;
353 }
354 if(fHistRange[std::make_pair(lowAddress, highAddress)] == nullptr || draw_index >= 0) {
355 int nofBins = fPPG->GetCycleLength() / GetTimePeriod(lowAddress); // the time period should be the same for all channels
356 fHistRange[std::make_pair(lowAddress, highAddress)] =
357 new TH1D(Form("TScalerHist_%04x_%04x", lowAddress, highAddress),
358 Form("scaler %d vs time in cycle for address 0x%04x - 0x%04x; time in cycle [ms]; counts/%.0f ms",
359 static_cast<int>(index), lowAddress, highAddress, static_cast<double>(fPPG->GetCycleLength()) / 1e5 / nofBins),
360 nofBins, 0., static_cast<double>(fPPG->GetCycleLength()) / 1e5);
361 // fHistRange[std::make_pair(lowAddress, highAddress)]->ResetBit(kMustCleanup);
362 // we have to skip the first data point in case this is a sub-run
363 // loop over the remaining scaler data for this address
364 std::map<UInt_t, UInt_t> previousValue; // we could make this a vector, since we know there can only be
365 // highAddress-lowAddress+1 different addresses
366 for(Long64_t entry = 0; entry < fEntries; ++entry) {
367 fTree->GetEntry(entry);
368 if(lowAddress <= fScalerData->GetAddress() && fScalerData->GetAddress() <= highAddress) {
369 // fill the difference between the current and the next scaler (if we found a previous value and that one
370 // is smaller than the current one)
371 if(previousValue[fScalerData->GetAddress()] != 0 &&
372 previousValue[fScalerData->GetAddress()] < fScalerData->GetScaler(index)) {
373 fHistRange[std::make_pair(lowAddress, highAddress)]->Fill(
374 static_cast<double>(fPPG->GetTimeInCycle(fScalerData->GetTimeStamp())) / 1e6,
375 fScalerData->GetScaler(index) - previousValue[fScalerData->GetAddress()]);
376 }
377 previousValue[fScalerData->GetAddress()] = fScalerData->GetScaler(index);
378 }
379 if(entry % 1000 == 0) {
380 std::cout << std::setw(3) << (100 * entry) / fEntries << " % done\r" << std::flush;
381 }
382 }
383 std::cout << "100 % done\r" << std::flush;
384 }
385 // if "redraw" was part of the original options, remove it from the options passed on
386 if(draw_index >= 0) {
387 opt.Remove(draw_index, 6);
388 }
389 // if "single" was part of the original options, remove it from the options passed on
390 if(single_index >= 0) {
391 opt.Remove(single_index, 6);
392 }
393
394 fHistRange[std::make_pair(lowAddress, highAddress)]->Draw(opt);
395
396 return fHistRange[std::make_pair(lowAddress, highAddress)];
397 }
398 // loop over all addresses and create one histogram for each
399 for(UInt_t address = lowAddress; address <= highAddress; ++address) {
400 // if the address doesn't exist in the histogram map, create a new histogram
401 if(fHist.find(address) == fHist.end()) {
402 int nofBins = fPPG->GetCycleLength() / GetTimePeriod(address);
403 fHist[address] =
404 new TH1D(Form("TScalerHist_%04x", address),
405 Form("scaler %d vs time in cycle for address 0x%04x; time in cycle [ms]; counts/%.0f ms",
406 static_cast<int>(index), address, static_cast<double>(fPPG->GetCycleLength()) / 1e5 / nofBins),
407 nofBins, 0., static_cast<double>(fPPG->GetCycleLength()) / 1e5);
408 } else {
409 // if the histogram already exist, reset it
410 fHist[address]->Reset();
411 }
412 fHist[address]->SetLineColor(static_cast<Color_t>(address - lowAddress + 1));
413 }
414 // now we have all histograms, so we loop through the tree (once) and create all that are in the range
415 std::map<UInt_t, UInt_t> previousValue; // we could make this a vector, since we know there can only be
416 // highAddress-lowAddress+1 different addresses
417 for(Long64_t entry = 0; entry < fEntries; ++entry) {
418 fTree->GetEntry(entry);
419 if(lowAddress <= fScalerData->GetAddress() && fScalerData->GetAddress() <= highAddress) {
420 // fill the difference between the current and the next scaler (if we found a previous value and that one is
421 // smaller than the current one)
422 if(previousValue[fScalerData->GetAddress()] != 0 &&
423 previousValue[fScalerData->GetAddress()] < fScalerData->GetScaler(index)) {
424 fHist[fScalerData->GetAddress()]->Fill(static_cast<double>(fPPG->GetTimeInCycle(fScalerData->GetTimeStamp())) / 1e6,
425 fScalerData->GetScaler(index) -
426 previousValue[fScalerData->GetAddress()]);
427 }
428 previousValue[fScalerData->GetAddress()] = fScalerData->GetScaler(index);
429 }
430 if(entry % 1000 == 0) {
431 std::cout << std::setw(3) << (100 * entry) / fEntries << " % done\r" << std::flush;
432 }
433 }
434 std::cout << "100 % done\r" << std::flush;
435 Double_t max = fHist[lowAddress]->GetMaximum();
436 for(UInt_t address = lowAddress + 1; address <= highAddress; ++address) {
437 if(max < fHist[address]->GetMaximum()) {
438 max = fHist[address]->GetMaximum();
439 }
440 }
441 fHist[lowAddress]->GetYaxis()->SetRangeUser(0., 1.05 * max);
442 fHist[lowAddress]->Draw();
443 for(UInt_t address = lowAddress + 1; address <= highAddress; ++address) {
444 fHist[address]->Draw("same");
445 }
446
447 return fHist[lowAddress];
448}
449
450TH1D* TScaler::DrawRawTimes(UInt_t address, Double_t lowtime, Double_t hightime, size_t index, Option_t* option)
451{
452 /// Draw scaler differences (i.e. current scaler minus last scaler) vs. time.
453 if(fTree == nullptr || fEntries == 0) {
454 std::cout << "Empty" << std::endl;
455 return nullptr;
456 }
457
458 TString opt = option;
459 opt.ToLower();
460 int nofBins = std::abs(static_cast<int>(1e9 * (hightime - lowtime) / static_cast<double>(GetTimePeriod(address))));
461 std::cout << nofBins << "nofbins" << std::endl;
462 // This scHist could be leaky as the outside user has ownership of it.
463 auto* scHist =
464 new TH1D(Form("TScalerHistRaw_%04x", address),
465 Form("scaler %d vs time for address 0x%04x; time in [ms]; counts/ ms", static_cast<int>(index), address),
466 nofBins, lowtime, hightime);
467 // we have to skip the first data point in case this is a sub-run
468 // loop over the remaining scaler data for this address
469 UInt_t previousValue = 0;
470 for(Long64_t entry = 0; entry < fEntries; ++entry) {
471 fTree->GetEntry(entry);
472 if(fScalerData->GetAddress() == address) {
473 // fill the difference between the current and the next scaler (if we found a previous value and that one is
474 // smaller than the current one)
475 if(previousValue != 0 && previousValue < fScalerData->GetScaler(index)) {
476 scHist->Fill(static_cast<double>(fScalerData->GetTimeStamp()) / 1e9, fScalerData->GetScaler(index) - previousValue);
477 }
478 previousValue = fScalerData->GetScaler(index);
479 }
480 if(entry % 1000 == 0) {
481 std::cout << std::setw(3) << (100 * entry) / fEntries << " % done\r" << std::flush;
482 }
483 }
484 std::cout << "100 % done\r" << std::flush;
485
486 scHist->Draw(opt);
487
488 return scHist;
489}
490
491ULong64_t TScaler::GetTimePeriod(UInt_t address)
492{
493 /// Get time period of scaler readouts for address "address" by calculating all time differences and choosing the one
494 /// that occurs most often.
495 /// Returns 0 if the address doesn't exist in the map.
496 if(fTimePeriod[address] == 0) {
497 ULong64_t previousValue = 0;
498 for(Long64_t entry = 0; entry < fEntries; ++entry) {
499 fTree->GetEntry(entry);
500 if(fScalerData->GetAddress() == address) {
501 // fill the difference between the current and the next scaler (if we found a previous value and that one is
502 // smaller than the current one)
503 if(previousValue != 0 && previousValue < fScalerData->GetTimeStamp()) {
504 // compare timestamp of current element with that of the previous element
505 ULong64_t diff = fScalerData->GetTimeStamp() - previousValue;
506 fNumberOfTimePeriods[address][diff]++;
507 }
508 previousValue = fScalerData->GetTimeStamp();
509 }
510 }
511 int counter = 0;
512 for(auto it = fNumberOfTimePeriods[address].begin(); it != fNumberOfTimePeriods[address].end(); ++it) {
513 if(it->second > counter) {
514 counter = it->second;
515 fTimePeriod[address] = it->first;
516 }
517 }
518 }
519
520 return fTimePeriod[address];
521}
522
524{
525 std::cout << "single address histograms:" << std::endl;
526 for(auto& iter : fHist) {
527 std::cout << "\t" << hex(iter.first, 4) << ": " << iter.second->GetName() << ", " << iter.second->GetTitle() << std::endl;
528 }
529
530 std::cout << "range histograms:" << std::endl;
531 for(auto& iter : fHistRange) {
532 std::cout << "\t" << hex(iter.first.first, 4) << ", " << iter.first.second << ": " << iter.second->GetName() << ", " << iter.second->GetTitle() << std::endl;
533 }
534}
std::string hex(T val, int width=-1)
Definition Globals.h:129
ULong64_t GetTimeInCycle(ULong64_t real_time)
Definition TPPG.cxx:613
ULong64_t GetCycleLength()
Definition TPPG.cxx:629
void Clear(Option_t *opt="") override
Definition TScaler.cxx:27
std::vector< UInt_t > fScaler
Definition TScaler.h:95
ULong64_t GetTimeStamp() const
Definition TScaler.h:79
UInt_t fAddress
Definition TScaler.h:94
UInt_t fNetworkPacketId
Definition TScaler.h:93
void Copy(TObject &rhs) const override
Definition TScaler.cxx:18
UInt_t fLowTimeStamp
Definition TScaler.h:96
UInt_t fHighTimeStamp
Definition TScaler.h:97
std::vector< UInt_t > GetScaler() const
Definition TScaler.h:70
void Print(Option_t *opt="") const override
Definition TScaler.cxx:37
UInt_t GetAddress() const
Definition TScaler.h:66
~TScaler()
Definition TScaler.cxx:79
std::map< UInt_t, std::map< ULong64_t, int > > fNumberOfTimePeriods
!
Definition TScaler.h:170
ULong64_t fTotalTimePeriod
!
Definition TScaler.h:171
TTree * fTree
Definition TScaler.h:165
void Clear(Option_t *opt="") override
Definition TScaler.cxx:228
TH1D * DrawRawTimes(UInt_t address, Double_t lowtime, Double_t hightime, size_t index=0, Option_t *option="")
Definition TScaler.cxx:450
void ListHistograms()
Definition TScaler.cxx:523
std::map< ULong64_t, int > fTotalNumberOfTimePeriods
!
Definition TScaler.h:172
std::map< UInt_t, ULong64_t > fTimePeriod
! a map between addresses and time differences (used to calculate the time period)
Definition TScaler.h:169
std::vector< UInt_t > GetScaler(UInt_t address, ULong64_t time) const
Definition TScaler.cxx:108
std::map< std::pair< UInt_t, UInt_t >, TH1D * > fHistRange
! map to store histograms for address-ranges
Definition TScaler.h:175
TScalerData * fScalerData
Definition TScaler.h:166
TScaler(bool loadIntoMap=false)
Definition TScaler.cxx:46
std::map< UInt_t, TH1D * > fHist
! map to store histograms that have already been drawn
Definition TScaler.h:174
UInt_t GetScalerDifference(UInt_t address, ULong64_t time, size_t index) const
Definition TScaler.cxx:163
Long64_t fEntries
Definition TScaler.h:167
std::map< UInt_t, std::map< ULong64_t, std::vector< UInt_t > > > fScalerMap
! an address-map of timestamp mapped scaler values
Definition TScaler.h:168
void Copy(TObject &obj) const override
Definition TScaler.cxx:95
ULong64_t GetTimePeriod(UInt_t address)
Definition TScaler.cxx:491
TPPG * fPPG
!
Definition TScaler.h:173
void ReadTree(bool loadIntoMap)
Definition TScaler.cxx:60
TH1D * Draw(UInt_t address, size_t index=0, Option_t *option="")
Definition TScaler.cxx:255
static TPPG * Get(bool verbose=false)
Definition TSingleton.h:33