13 collectionTimeSummary_(0,0),
16 triggerNumberRate_(0.0),
17 eventNumberRate_(0.0),
18 finalTriggersDistributedRate_(0.0),
19 finalTriggersGeneratedRate_(0.0),
20 randomTriggersRate_(0.0),
21 calibrationTriggersRate_(0.0),
22 totalTestTriggersRate_(0.0),
23 orbitNumberRate_(0.0),
24 numberResetsRate_(0.0),
25 deadTimePercent_(0.0),
26 deadTimeActivePercent_(0.0),
27 deadTimeActiveCalibrationPercent_(0.0),
28 deadTimeActivePrivatePercent_(0.0),
29 deadTimeActivePartitionPercent_(0.0),
30 deadTimeActiveThrottlePercent_(0.0),
31 deadTimeActiveTimeSlotPercent_(0.0),
32 finalTriggersInvalidBCPercent_(0.0),
33 lostFinalTriggersPercent_(0.0),
34 lostFinalTriggersActivePercent_(0.0),
37 triggerNumberRunRate_(0.0),
38 eventNumberRunRate_(0.0),
39 finalTriggersDistributedRunRate_(0.0),
40 finalTriggersGeneratedRunRate_(0.0),
41 randomTriggersRunRate_(0.0),
42 calibrationTriggersRunRate_(0.0),
43 totalTestTriggersRunRate_(0.0),
44 orbitNumberRunRate_(0.0),
45 numberResetsRunRate_(0.0),
46 deadTimeRunPercent_(0.0),
47 deadTimeActiveRunPercent_(0.0),
48 deadTimeActiveCalibrationRunPercent_(0.0),
49 deadTimeActivePrivateRunPercent_(0.0),
50 deadTimeActivePartitionRunPercent_(0.0),
51 deadTimeActiveThrottleRunPercent_(0.0),
52 deadTimeActiveTimeSlotRunPercent_(0.0),
53 finalTriggersInvalidBCRunPercent_(0.0),
54 lostFinalTriggersRunPercent_(0.0),
55 lostFinalTriggersActiveRunPercent_(0.0),
56 collectionTimeDetails_(0,0),
97 double deltaBC = deltaOrbit *
N_BX;
145 ( length1 >= length2 ) ? minLength = length2 : minLength=length1;
146 std::vector<unsigned int> triggers1 = t1.
triggers();
147 std::vector<unsigned int> triggers2 = t2.
triggers();
148 for (
int i=0;
i<minLength;
i++)
150 double rate = ((double)triggers2[
i] -
158 ( length1 >= length2 ) ? minLength = length2 : minLength=length1;
159 std::vector<unsigned int> testTriggers1 = t1.
testTriggers();
160 std::vector<unsigned int> testTriggers2 = t2.
testTriggers();
161 for (
int i=0;
i<minLength;
i++)
163 double rate = ((double)testTriggers2[
i] -
164 (
double)testTriggers1[
i] ) /
deltaT_;
181 if ( deltaOrbit > 0 )
184 double deltaBC = deltaOrbit *
N_BX;
212 for (
int i=0;
i<length;
i++)
224 s <<
"L1TriggerRates Version: " << c.
version()
225 <<
" Differential Rates in Hz, DeltaT: " <<
226 c.
deltaT() <<
" sec" << std::endl;
230 " TriggerNumber: %e EventNumber: %e",
232 s << line << std::endl;
235 " TriggersDistributed: %e TriggersGenerated: %e",
237 s << line << std::endl;
240 " RandomTriggers: %e CalibrationTriggers: %e",
242 s << line << std::endl;
245 " TotalTestTriggers: %e OrbitNumber: %e",
247 s << line << std::endl;
250 " NumberResets: %e DeadTime: %3.3f%%",
252 s << line << std::endl;
255 " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
258 s << line << std::endl;
261 " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
264 s << line << std::endl;
267 " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
270 s << line << std::endl;
273 " TriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
276 s << line << std::endl;
279 " DeadTimeActiveTimeSlot: %3.3f%%",
281 s << line << std::endl;
284 int length = triggersRate.size() / 4;
285 for (
int i=0;
i<length;
i++)
287 sprintf(line,
" %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
289 (i+length), triggersRate[i+length],
290 (i+(length*2)), triggersRate[i+(length*2)],
291 (i+(length*3)), triggersRate[i+(length*3)]);
292 s << line << std::endl;
296 length = testTriggersRate.size() / 4;
297 for (
int i=0;
i<length;
i++)
299 sprintf(line,
" %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
300 i, testTriggersRate[
i],
301 (i+length), testTriggersRate[i+length],
302 (i+(length*2)), testTriggersRate[i+(length*2)],
303 (i+(length*3)), testTriggersRate[i+(length*3)]);
304 s << line << std::endl;
310 s <<
"L1TriggerRates Version: " << c.
version()
311 <<
" Run Average Rates in Hz, DeltaT: " <<
315 " TriggerNumber: %e EventNumber: %e",
317 s << line << std::endl;
320 " TriggersDistributed: %e TriggersGenerated: %e",
323 s << line << std::endl;
326 " RandomTriggers: %e CalibrationTriggers: %e",
328 s << line << std::endl;
331 " TotalTestTriggers: %e OrbitNumber: %e",
333 s << line << std::endl;
336 " NumberResets: %e DeadTime: %3.3f%%",
338 s << line << std::endl;
341 " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
344 s << line << std::endl;
347 " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
350 s << line << std::endl;
353 " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
356 s << line << std::endl;
359 " FinalTriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
362 s << line << std::endl;
365 " DeadTimeActiveTimeSlot: %3.3f%%",
367 s << line << std::endl;
370 length = triggersRunRate.size() / 4;
371 for (
int i=0;
i<length;
i++)
373 sprintf(line,
" %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
374 i, triggersRunRate[
i],
375 (i+length), triggersRunRate[i+length],
376 (i+(length*2)), triggersRunRate[i+(length*2)],
377 (i+(length*3)), triggersRunRate[i+(length*3)]);
378 s << line << std::endl;
double numberResetsRate() const
double totalTestTriggersRunRate() const
double lostFinalTriggersActivePercent() const
double deadTimeActivePrivateRunPercent_
double lostFinalTriggersActiveRunPercent_
double deadTimeActiveCalibrationPercent_
double finalTriggersGeneratedRate_
unsigned long long deadTimeActivePartition() const
unsigned long long lostFinalTriggers() const
double finalTriggersInvalidBCRunPercent() const
std::vector< double > triggersRate_
unsigned int eventNumber() const
double orbitNumberRunRate_
void set_tv_nsec(long value)
double finalTriggersInvalidBCPercent_
timespec collectionTimeSummary() const
double lostFinalTriggersRunPercent() const
double lostFinalTriggersActiveRunPercent() const
unsigned int numberResets() const
double deadTimeActiveThrottleRunPercent_
double eventNumberRunRate() const
double numberResetsRunRate_
double finalTriggersDistributedRunRate_
std::ostream & operator<<(std::ostream &s, const L1TriggerRates &c)
Pretty-print operator for L1TriggerRates.
double finalTriggersGeneratedRunRate() const
double deadTimeActiveRunPercent_
double finalTriggersGeneratedRate() const
double randomTriggersRate_
double deadTimeActivePartitionRunPercent() const
double deadTimeActiveTimeSlotPercent() const
double deadTimeActivePercent() const
double randomTriggersRunRate_
unsigned int totalTestTriggers() const
TimeSpec collectionTimeSummary_
int version() const
get the data
unsigned int triggerNumber() const
double deadTimeRunPercent() const
double finalTriggersDistributedRunRate() const
double deadTimePercent() const
double deadTimeActiveCalibrationRunPercent() const
unsigned long long deadTimeActiveThrottle() const
double triggerNumberRate_
double eventNumberRate() const
double deadTimeActivePartitionPercent() const
unsigned int randomTriggers() const
double finalTriggersDistributedRate() const
unsigned long long deadTimeActive() const
unsigned long long lostFinalTriggersActive() const
std::vector< unsigned int > testTriggers() const
unsigned long long deadTimeActiveCalibration() const
double calibrationTriggersRunRate() const
double numberResetsRunRate() const
double deadTimeActiveThrottlePercent() const
double deadTimeRunPercent_
timespec collectionTimeDetails() const
unsigned long long deadTime() const
double lostFinalTriggersActivePercent_
unsigned int finalTriggersDistributed() const
unsigned int finalTriggersGenerated() const
double deadTimeActivePartitionRunPercent_
double triggerNumberRate() const
double finalTriggersInvalidBCRunPercent_
double deadTimeActiveTimeSlotRunPercent() const
double deadTimeActivePercent_
double finalTriggersInvalidBCPercent() const
double deadTimeActiveThrottlePercent_
double randomTriggersRunRate() const
double calibrationTriggersRate() const
double deadTimeActiveTimeSlotPercent_
double orbitNumberRate() const
double totalTestTriggersRunRate_
double deadTimeActivePartitionPercent_
double calibrationTriggersRate_
double deadTimeActiveTimeSlotRunPercent_
std::vector< double > testTriggersRate_
virtual ~L1TriggerRates()
void computeRunRates(L1TriggerScalers const &t)
double lostFinalTriggersPercent_
double deadTimeActiveCalibrationRunPercent_
double triggerNumberRunRate() const
double totalTestTriggersRate() const
std::vector< double > triggersRunRate() const
double deadTimeActiveCalibrationPercent() const
void computeRates(L1TriggerScalers const &t1, L1TriggerScalers const &t2)
double triggerNumberRunRate_
double finalTriggersGeneratedRunRate_
std::vector< double > testTriggersRate() const
unsigned long long deadTimeActiveTimeSlot() const
double deadTimeActiveRunPercent() const
unsigned int orbitNumber() const
double calibrationTriggersRunRate_
double randomTriggersRate() const
double deadTimeActiveThrottleRunPercent() const
double deadTimeActivePrivatePercent_
double lostFinalTriggersPercent() const
std::vector< unsigned int > triggers() const
unsigned int calibrationTriggers() const
TimeSpec collectionTimeDetails_
double deadTimeActivePrivateRunPercent() const
double eventNumberRunRate_
void set_tv_sec(long value)
std::vector< double > triggersRunRate_
double deadTimeActivePrivatePercent() const
double orbitNumberRunRate() const
unsigned int finalTriggersInvalidBC() const
double totalTestTriggersRate_
unsigned long long deadTimeActivePrivate() const
double lostFinalTriggersRunPercent_
std::vector< double > triggersRate() const
double finalTriggersDistributedRate_