|
|
Go to the documentation of this file.
18 collectionTime_(0, 0),
20 lumiSegmentOrbits_(0),
23 bunchCrossingErrors_(0),
26 gtTriggersRate_((
float)0.0),
27 gtEventsRate_((
float)0.0),
28 prescaleIndexAlgo_(0),
29 prescaleIndexTech_(0),
30 collectionTimeLumiSeg_(0, 0),
31 lumiSegmentNrLumiSeg_(0),
32 triggersPhysicsGeneratedFDL_(0),
33 triggersPhysicsLost_(0),
34 triggersPhysicsLostBeamActive_(0),
35 triggersPhysicsLostBeamInactive_(0),
41 deadtimeBeamActive_(0),
42 deadtimeBeamActiveTriggerRules_(0),
43 deadtimeBeamActiveCalibration_(0),
44 deadtimeBeamActivePrivateOrbit_(0),
45 deadtimeBeamActivePartitionController_(0),
46 deadtimeBeamActiveTimeSlot_(0),
47 gtAlgoCounts_(nLevel1Triggers),
48 gtTechCounts_(nLevel1TestTriggers),
49 lastOrbitCounter0_(0),
53 lastEventCounter0_(0),
146 unsigned long long counts64 = (
unsigned long long)
counts;
165 percent = ((double)
counts) / 9342812.16;
167 percent = ((double)
counts) / 37371248.64;
169 if (percent > 100.0000) {
182 percent = ((double)
counts) / 7361003.52;
184 percent = ((double)
counts) / 29444014.08;
186 if (percent > 100.0000) {
194 s <<
"Level1TriggerScalers Version:" <<
c.version() <<
" SourceID: " <<
c.sourceID() << std::endl;
195 constexpr
size_t kLineBufferSize = 164;
196 char line[kLineBufferSize];
197 char zeitHeaven[128];
198 struct tm* horaHeaven;
202 " TrigType: %d EventID: %d BunchNumber: %d",
206 s <<
line << std::endl;
208 struct timespec secondsToHeaven =
c.collectionTime();
209 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
210 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
211 snprintf(
line, kLineBufferSize,
" CollectionTime: %s.%9.9d", zeitHeaven, (
int)secondsToHeaven.tv_nsec);
212 s <<
line << std::endl;
216 " LumiSegmentNr: %10u LumiSegmentOrbits: %10u",
218 c.lumiSegmentOrbits());
219 s <<
line << std::endl;
223 " LumiSegmentNrLumiSeg: %10u OrbitNr: %10u ",
224 c.lumiSegmentNrLumiSeg(),
226 s <<
line << std::endl;
230 " GtResets: %10u BunchCrossingErrors: %10u",
232 c.bunchCrossingErrors());
233 s <<
line << std::endl;
237 " PrescaleIndexAlgo: %10d PrescaleIndexTech: %10d",
238 c.prescaleIndexAlgo(),
239 c.prescaleIndexTech());
240 s <<
line << std::endl;
243 line, kLineBufferSize,
" GtTriggers: %20llu %22.3f Hz",
c.gtTriggers(),
c.gtTriggersRate());
244 s <<
line << std::endl;
246 snprintf(
line, kLineBufferSize,
" GtEvents: %20llu %22.3f Hz",
c.gtEvents(),
c.gtEventsRate());
247 s <<
line << std::endl;
249 secondsToHeaven =
c.collectionTimeLumiSeg();
250 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
251 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
252 snprintf(
line, kLineBufferSize,
" CollectionTimeLumiSeg: %s.%9.9d", zeitHeaven, (
int)secondsToHeaven.tv_nsec);
253 s <<
line << std::endl;
257 " TriggersPhysicsGeneratedFDL: %20llu %22.3f Hz",
258 c.triggersPhysicsGeneratedFDL(),
260 s <<
line << std::endl;
264 " TriggersPhysicsLost: %20llu %22.3f Hz",
265 c.triggersPhysicsLost(),
267 s <<
line << std::endl;
271 " TriggersPhysicsLostBeamActive: %20llu %22.3f Hz",
272 c.triggersPhysicsLostBeamActive(),
274 s <<
line << std::endl;
278 " TriggersPhysicsLostBeamInactive: %20llu %22.3f Hz",
279 c.triggersPhysicsLostBeamInactive(),
281 s <<
line << std::endl;
285 " L1AsPhysics: %20llu %22.3f Hz",
288 s <<
line << std::endl;
292 " L1AsRandom: %20llu %22.3f Hz",
295 s <<
line << std::endl;
299 " L1AsTest: %20llu %22.3f Hz",
302 s <<
line << std::endl;
306 " L1AsCalibration: %20llu %22.3f Hz",
309 s <<
line << std::endl;
313 " Deadtime: %20llu %17.3f%%",
316 s <<
line << std::endl;
320 " DeadtimeBeamActive: %20llu %17.3f%%",
321 c.deadtimeBeamActive(),
323 s <<
line << std::endl;
327 " DeadtimeBeamActiveTriggerRules: %20llu %17.3f%%",
328 c.deadtimeBeamActiveTriggerRules(),
330 s <<
line << std::endl;
334 " DeadtimeBeamActiveCalibration: %20llu %17.3f%%",
335 c.deadtimeBeamActiveCalibration(),
337 s <<
line << std::endl;
341 " DeadtimeBeamActivePrivateOrbit: %20llu %17.3f%%",
342 c.deadtimeBeamActivePrivateOrbit(),
344 s <<
line << std::endl;
348 " DeadtimeBeamActivePartitionController:%20llu %17.3f%%",
349 c.deadtimeBeamActivePartitionController(),
351 s <<
line << std::endl;
355 " DeadtimeBeamActiveTimeSlot: %20llu %17.3f%%",
356 c.deadtimeBeamActiveTimeSlot(),
358 s <<
line << std::endl;
360 s <<
"Physics GtAlgoCounts" << std::endl;
361 const std::vector<unsigned int> gtAlgoCounts =
c.gtAlgoCounts();
362 int length = gtAlgoCounts.size() / 4;
363 for (
int i = 0;
i < length;
i++) {
366 " %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
370 gtAlgoCounts[
i + length],
372 gtAlgoCounts[
i + (length * 2)],
374 gtAlgoCounts[
i + (length * 3)]);
375 s <<
line << std::endl;
378 s <<
"Test GtTechCounts" << std::endl;
379 const std::vector<unsigned int> gtTechCounts =
c.gtTechCounts();
380 length = gtTechCounts.size() / 4;
381 for (
int i = 0;
i < length;
i++) {
384 " %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
388 gtTechCounts[
i + length],
390 gtTechCounts[
i + (length * 2)],
392 gtTechCounts[
i + (length * 3)]);
393 s <<
line << std::endl;
396 if (
c.version() >= 5) {
397 snprintf(
line, kLineBufferSize,
" LastOrbitCounter0: %10u 0x%8.8X",
c.lastOrbitCounter0(),
c.lastOrbitCounter0());
398 s <<
line << std::endl;
400 snprintf(
line, kLineBufferSize,
" LastTestEnable: %10u 0x%8.8X",
c.lastTestEnable(),
c.lastTestEnable());
401 s <<
line << std::endl;
403 snprintf(
line, kLineBufferSize,
" LastResync: %10u 0x%8.8X",
c.lastResync(),
c.lastResync());
404 s <<
line << std::endl;
406 snprintf(
line, kLineBufferSize,
" LastStart: %10u 0x%8.8X",
c.lastStart(),
c.lastStart());
407 s <<
line << std::endl;
409 snprintf(
line, kLineBufferSize,
" LastEventCounter0: %10u 0x%8.8X",
c.lastEventCounter0(),
c.lastEventCounter0());
410 s <<
line << std::endl;
412 snprintf(
line, kLineBufferSize,
" LastHardReset: %10u 0x%8.8X",
c.lastHardReset(),
c.lastHardReset());
413 s <<
line << std::endl;
unsigned long long gtTriggers
unsigned long long l1AsRandom_
unsigned int lastOrbitCounter0_
std::ostream & operator<<(std::ostream &s, Level1TriggerScalers const &c)
Pretty-print operator for Level1TriggerScalers.
unsigned long long deadtimeBeamActiveCalibration
unsigned long long deadtimeBeamActivePartitionController_
unsigned int lumiSegmentNrLumiSeg
unsigned long long deadtimeBeamActiveTimeSlot
static double rateLS(unsigned long long counts)
unsigned long long l1AsCalibration
unsigned long long triggersPhysicsLostBeamActive_
unsigned long long triggersPhysicsLostBeamInactive
unsigned long long triggersPhysicsLostBeamActive
unsigned int lastTestEnable
unsigned int lumiSegmentOrbits_
unsigned int gtTechCounts[ScalersRaw::N_L1_TEST_TRIGGERS_v1]
unsigned int bunchCrossingErrors_
unsigned long long l1AsTest
unsigned long long header
void set_tv_nsec(long value)
unsigned long long deadtimeBeamActiveTriggerRules
unsigned int collectionTime_sec
unsigned long long l1AsPhysics
unsigned int lastEventCounter0
unsigned int lumiSegmentNr_
unsigned long long l1AsRandom
unsigned int lumiSegmentNrLumiSeg_
virtual ~Level1TriggerScalers()
unsigned long long deadtimeBeamActivePartitionController
unsigned long long deadtime
unsigned int collectionTime_nsec
unsigned long long gtTriggers_
unsigned int lastEventCounter0_
std::vector< unsigned int > gtTechCounts_
void set_tv_sec(long value)
unsigned long long gtEvents_
unsigned long long deadtimeBeamActiveTriggerRules_
TimeSpec collectionTimeLumiSeg_
unsigned long long spare1_
unsigned long long deadtime_
unsigned long long triggersPhysicsLost
unsigned long long triggersPhysicsGeneratedFDL
std::vector< unsigned int > gtAlgoCounts_
unsigned long long triggersPhysicsLostBeamInactive_
unsigned long long deadtimeBeamActivePrivateOrbit
unsigned int lastOrbitCounter0
unsigned long long spare[ScalersRaw::N_SPARE_v5]
unsigned int lastHardReset
unsigned long long deadtimeBeamActive_
unsigned int collectionTimeLumiSeg_nsec
unsigned int lastHardReset_
unsigned int gtAlgoCounts[ScalersRaw::N_L1_TRIGGERS_v1]
static double percentLSActive(unsigned long long counts)
struct TriggerScalersRaw_v3 trig
unsigned long long l1AsTest_
unsigned long long deadtimeBeamActivePrivateOrbit_
unsigned long long l1AsCalibration_
unsigned int bunchNumber_
static double percentLS(unsigned long long counts)
unsigned long long deadtimeBeamActive
unsigned long long triggersPhysicsLost_
unsigned int collectionTimeLumiSeg_sec
unsigned int bunchCrossingErrors
unsigned long long l1AsPhysics_
unsigned long long spare2_
unsigned int lumiSegmentNr
unsigned long long triggersPhysicsGeneratedFDL_
unsigned int lumiSegmentOrbits
unsigned int lastTestEnable_
unsigned long long deadtimeBeamActiveCalibration_
unsigned long long gtEvents
unsigned long long spare0_
unsigned long long deadtimeBeamActiveTimeSlot_