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),
162 unsigned long long counts64 = (
unsigned long long)counts;
163 return(
rateLS(counts64,runNumber));
172 rate = ((double)counts) / 23.31040958083832;
176 rate = ((double)counts) / 93.24163832335329;
190 percent = ((double)counts) / 9342812.16;
194 percent = ((double)counts) / 37371248.64;
196 if ( percent > 100.0000 ) { percent = 100.0;}
209 percent = ((double)counts) / 7361003.52;
213 percent = ((double)counts) / 29444014.08;
215 if ( percent > 100.0000 ) { percent = 100.0;}
222 s <<
"Level1TriggerScalers Version:" << c.
version() <<
223 " SourceID: " << c.
sourceID() << std::endl;
225 char line[kLineBufferSize];
226 char zeitHeaven[128];
227 struct tm * horaHeaven;
229 snprintf(line, kLineBufferSize,
" TrigType: %d EventID: %d BunchNumber: %d",
231 s << line << std::endl;
234 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
235 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
236 snprintf(line, kLineBufferSize,
" CollectionTime: %s.%9.9d" ,
237 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
238 s << line << std::endl;
240 snprintf(line, kLineBufferSize,
241 " LumiSegmentNr: %10u LumiSegmentOrbits: %10u",
243 s << line << std::endl;
245 snprintf(line, kLineBufferSize,
246 " LumiSegmentNrLumiSeg: %10u OrbitNr: %10u ",
248 s << line << std::endl;
250 snprintf(line, kLineBufferSize,
251 " GtResets: %10u BunchCrossingErrors: %10u",
253 s << line << std::endl;
255 snprintf(line, kLineBufferSize,
256 " PrescaleIndexAlgo: %10d PrescaleIndexTech: %10d",
258 s << line << std::endl;
260 snprintf(line, kLineBufferSize,
" GtTriggers: %20llu %22.3f Hz",
262 s << line << std::endl;
264 snprintf(line, kLineBufferSize,
" GtEvents: %20llu %22.3f Hz",
266 s << line << std::endl;
269 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
270 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
271 snprintf(line, kLineBufferSize,
" CollectionTimeLumiSeg: %s.%9.9d" ,
272 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
273 s << line << std::endl;
276 snprintf(line, kLineBufferSize,
" TriggersPhysicsGeneratedFDL: %20llu %22.3f Hz",
279 s << line << std::endl;
281 snprintf(line, kLineBufferSize,
" TriggersPhysicsLost: %20llu %22.3f Hz",
284 s << line << std::endl;
286 snprintf(line, kLineBufferSize,
" TriggersPhysicsLostBeamActive: %20llu %22.3f Hz",
289 s << line << std::endl;
291 snprintf(line, kLineBufferSize,
" TriggersPhysicsLostBeamInactive: %20llu %22.3f Hz",
294 s << line << std::endl;
296 snprintf(line, kLineBufferSize,
" L1AsPhysics: %20llu %22.3f Hz",
299 s << line << std::endl;
301 snprintf(line, kLineBufferSize,
" L1AsRandom: %20llu %22.3f Hz",
304 s << line << std::endl;
306 snprintf(line, kLineBufferSize,
" L1AsTest: %20llu %22.3f Hz",
309 s << line << std::endl;
311 snprintf(line, kLineBufferSize,
" L1AsCalibration: %20llu %22.3f Hz",
314 s << line << std::endl;
316 snprintf(line, kLineBufferSize,
" Deadtime: %20llu %17.3f%%",
319 s << line << std::endl;
321 snprintf(line, kLineBufferSize,
" DeadtimeBeamActive: %20llu %17.3f%%",
324 s << line << std::endl;
326 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveTriggerRules: %20llu %17.3f%%",
329 s << line << std::endl;
331 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveCalibration: %20llu %17.3f%%",
334 s << line << std::endl;
336 snprintf(line, kLineBufferSize,
" DeadtimeBeamActivePrivateOrbit: %20llu %17.3f%%",
339 s << line << std::endl;
341 snprintf(line, kLineBufferSize,
" DeadtimeBeamActivePartitionController:%20llu %17.3f%%",
344 s << line << std::endl;
346 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveTimeSlot: %20llu %17.3f%%",
349 s << line << std::endl;
351 s <<
"Physics GtAlgoCounts" << std::endl;
353 int length = gtAlgoCounts.size() / 4;
354 for (
int i=0;
i<length;
i++)
356 snprintf(line, kLineBufferSize,
" %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
358 (i+length), gtAlgoCounts[i+length],
359 (i+(length*2)), gtAlgoCounts[i+(length*2)],
360 (i+(length*3)), gtAlgoCounts[i+(length*3)]);
361 s << line << std::endl;
364 s <<
"Test GtTechCounts" << std::endl;
366 length = gtTechCounts.size() / 4;
367 for (
int i=0;
i<length;
i++)
369 snprintf(line, kLineBufferSize,
" %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
371 (i+length), gtTechCounts[i+length],
372 (i+(length*2)), gtTechCounts[i+(length*2)],
373 (i+(length*3)), gtTechCounts[i+(length*3)]);
374 s << line << std::endl;
379 snprintf(line, kLineBufferSize,
" LastOrbitCounter0: %10u 0x%8.8X", c.
lastOrbitCounter0(),
381 s << line << std::endl;
383 snprintf(line, kLineBufferSize,
" LastTestEnable: %10u 0x%8.8X", c.
lastTestEnable(),
385 s << line << std::endl;
387 snprintf(line, kLineBufferSize,
" LastResync: %10u 0x%8.8X", c.
lastResync(),
389 s << line << std::endl;
391 snprintf(line, kLineBufferSize,
" LastStart: %10u 0x%8.8X", c.
lastStart(),
393 s << line << std::endl;
395 snprintf(line, kLineBufferSize,
" LastEventCounter0: %10u 0x%8.8X", c.
lastEventCounter0(),
397 s << line << std::endl;
399 snprintf(line, kLineBufferSize,
" LastHardReset: %10u 0x%8.8X", c.
lastHardReset(),
401 s << line << std::endl;
unsigned long long deadtimeBeamActivePartitionController_
float gtEventsRate() const
unsigned int gtTechCounts[ScalersRaw::N_L1_TEST_TRIGGERS_v1]
unsigned long long l1AsTest
unsigned long long spare1_
static double rateLS(unsigned long long counts)
unsigned long long deadtimeBeamActiveTriggerRules_
unsigned long long gtEvents() const
unsigned long long deadtimeBeamActive() const
unsigned long long deadtimeBeamActivePrivateOrbit() const
unsigned long long triggersPhysicsGeneratedFDL() const
unsigned int bunchNumber() const
virtual ~Level1TriggerScalers()
unsigned int lastTestEnable() const
void set_tv_nsec(long value)
int prescaleIndexAlgo() const
unsigned long long spare[ScalersRaw::N_SPARE_v5]
unsigned long long l1AsRandom() const
unsigned long long triggersPhysicsLostBeamInactive_
unsigned long long deadtimeBeamActiveTimeSlot_
unsigned int lastResync() const
std::vector< unsigned int > gtTechCounts() const
unsigned long long l1AsRandom
unsigned int trigType() const
unsigned long long triggersPhysicsLost() const
unsigned long long triggersPhysicsLostBeamActive() const
unsigned int collectionTime_sec
unsigned int lastStart() const
unsigned int collectionTime_nsec
unsigned long long gtTriggers_
unsigned int gtResets() const
unsigned long long l1AsCalibration() const
std::vector< unsigned int > gtTechCounts_
unsigned int lumiSegmentNr_
std::vector< unsigned int > gtAlgoCounts_
unsigned long long l1AsCalibration
unsigned long long deadtimeBeamActivePartitionController
unsigned long long deadtimeBeamActiveTimeSlot
unsigned long long triggersPhysicsLostBeamInactive
unsigned long long deadtime_
unsigned long long deadtimeBeamActiveTriggerRules
unsigned long long l1AsTest_
unsigned int lastTestEnable_
unsigned int bunchCrossingErrors() const
unsigned int orbitNr() const
unsigned int lastEventCounter0() const
struct TriggerScalersRaw_v3 trig
std::vector< unsigned int > gtAlgoCounts() const
std::ostream & operator<<(std::ostream &s, Level1TriggerScalers const &c)
Pretty-print operator for Level1TriggerScalers.
unsigned int collectionTimeLumiSeg_nsec
unsigned long long triggersPhysicsLost_
unsigned int lumiSegmentOrbits
unsigned long long l1AsPhysics() const
unsigned int lumiSegmentOrbits() const
static double percentLSActive(unsigned long long counts)
unsigned long long l1AsCalibration_
unsigned int lastHardReset
unsigned int bunchNumber_
unsigned long long deadtimeBeamActiveTriggerRules() const
unsigned long long deadtimeBeamActivePrivateOrbit_
unsigned int lastHardReset() const
TimeSpec collectionTimeLumiSeg_
unsigned int lumiSegmentNrLumiSeg_
unsigned long long l1AsTest() const
unsigned int bunchCrossingErrors_
unsigned int lastOrbitCounter0() const
unsigned int lumiSegmentNr() const
unsigned int lastEventCounter0
unsigned long long deadtimeBeamActive_
unsigned long long deadtimeBeamActivePrivateOrbit
unsigned long long deadtime() const
unsigned int gtAlgoCounts[ScalersRaw::N_L1_TRIGGERS_v1]
unsigned int lastTestEnable
unsigned long long gtTriggers() const
static double percentLS(unsigned long long counts)
unsigned int eventID() const
float gtTriggersRate() const
unsigned int sourceID() const
struct timespec collectionTimeLumiSeg() const
unsigned long long deadtimeBeamActiveTimeSlot() const
unsigned long long triggersPhysicsLostBeamActive
unsigned long long l1AsPhysics_
int prescaleIndexTech() const
unsigned long long gtEvents
unsigned long long deadtimeBeamActiveCalibration() const
unsigned long long deadtime
unsigned long long gtTriggers
unsigned long long triggersPhysicsLostBeamActive_
unsigned int collectionTimeLumiSeg_sec
unsigned int lastOrbitCounter0
unsigned int lastEventCounter0_
unsigned int lumiSegmentOrbits_
unsigned long long deadtimeBeamActiveCalibration
unsigned long long triggersPhysicsLostBeamInactive() const
unsigned long long spare2_
void set_tv_sec(long value)
unsigned long long header
unsigned int lumiSegmentNrLumiSeg
unsigned long long spare0_
unsigned long long deadtimeBeamActiveCalibration_
unsigned long long deadtimeBeamActivePartitionController() const
unsigned int lumiSegmentNrLumiSeg() const
unsigned long long deadtimeBeamActive
unsigned int lastHardReset_
unsigned long long triggersPhysicsGeneratedFDL
unsigned long long triggersPhysicsLost
unsigned long long triggersPhysicsGeneratedFDL_
unsigned int bunchCrossingErrors
unsigned int lumiSegmentNr
struct timespec collectionTime() const
unsigned long long l1AsPhysics
unsigned long long gtEvents_
unsigned long long l1AsRandom_
unsigned int lastOrbitCounter0_