13 collectionTime_(0, 0),
18 collectionTimeLumiSeg_(0, 0),
19 triggersPhysicsGeneratedFDLRate_(0.0),
20 triggersPhysicsLostRate_(0.0),
21 triggersPhysicsLostBeamActiveRate_(0.0),
22 triggersPhysicsLostBeamInactiveRate_(0.0),
23 l1AsPhysicsRate_(0.0),
26 l1AsCalibrationRate_(0.0),
27 deadtimePercent_(0.0),
28 deadtimeBeamActivePercent_(0.0),
29 deadtimeBeamActiveTriggerRulesPercent_(0.0),
30 deadtimeBeamActiveCalibrationPercent_(0.0),
31 deadtimeBeamActivePrivateOrbitPercent_(0.0),
32 deadtimeBeamActivePartitionControllerPercent_(0.0),
33 deadtimeBeamActiveTimeSlotPercent_(0.0),
94 const std::vector<unsigned int> gtAlgoCounts = t.
gtAlgoCounts();
95 for (std::vector<unsigned int>::const_iterator
counts = gtAlgoCounts.begin();
counts != gtAlgoCounts.end();
100 const std::vector<unsigned int> gtTechCounts = t.
gtTechCounts();
101 for (std::vector<unsigned int>::const_iterator
counts = gtTechCounts.begin();
counts != gtTechCounts.end();
117 unsigned long long zeit1 = ((
unsigned long long)t1.
collectionTime().tv_sec * 1000000000ULL) |
119 unsigned long long zeit2 = ((
unsigned long long)t2.
collectionTime().tv_sec * 1000000000ULL) |
134 constexpr
size_t kLineBufferSize = 164;
135 char line[kLineBufferSize];
136 char zeitHeaven[128];
137 struct tm* horaHeaven;
139 s <<
"Level1TriggerRates Version: " << c.
version() <<
" Rates in Hz, DeltaT: ";
142 s << c.
deltaT() <<
" sec" << std::endl;
144 s <<
"n/a" << std::endl;
148 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
149 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
150 snprintf(line, kLineBufferSize,
" CollectionTime: %s.%9.9d", zeitHeaven, (
int)secondsToHeaven.tv_nsec);
151 s << line << std::endl;
153 snprintf(line, kLineBufferSize,
" GtTriggersRate: %22.3f Hz", c.
gtTriggersRate());
154 s << line << std::endl;
156 snprintf(line, kLineBufferSize,
" GtEventsRate: %22.3f Hz", c.
gtEventsRate());
157 s << line << std::endl;
160 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
161 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
162 snprintf(line, kLineBufferSize,
" CollectionTimeLumiSeg: %s.%9.9d", zeitHeaven, (
int)secondsToHeaven.tv_nsec);
163 s << line << std::endl;
167 " TriggersPhysicsGeneratedFDLRate: %22.3f Hz",
169 s << line << std::endl;
173 s << line << std::endl;
177 " TriggersPhysicsLostBeamActiveRate: %22.3f Hz",
179 s << line << std::endl;
183 " TriggersPhysicsLostBeamInactiveRate: %22.3f Hz",
185 s << line << std::endl;
187 snprintf(line, kLineBufferSize,
" L1AsPhysicsRate: %22.3f Hz", c.
l1AsPhysicsRate());
188 s << line << std::endl;
190 snprintf(line, kLineBufferSize,
" L1AsRandomRate: %22.3f Hz", c.
l1AsRandomRate());
191 s << line << std::endl;
193 snprintf(line, kLineBufferSize,
" L1AsTestRate: %22.3f Hz", c.
l1AsTestRate());
194 s << line << std::endl;
196 snprintf(line, kLineBufferSize,
" L1AsCalibrationRate: %22.3f Hz", c.
l1AsCalibrationRate());
197 s << line << std::endl;
199 snprintf(line, kLineBufferSize,
" DeadtimePercent: %22.3f %%", c.
deadtimePercent());
200 s << line << std::endl;
204 s << line << std::endl;
208 " DeadtimeBeamActiveTriggerRulesPercent: %22.3f %%",
210 s << line << std::endl;
214 " DeadtimeBeamActiveCalibrationPercent: %22.3f %%",
216 s << line << std::endl;
220 " DeadtimeBeamActivePrivateOrbitPercent: %22.3f %%",
222 s << line << std::endl;
226 " DeadtimeBeamActivePartitionControllerPercent:%22.3f %%",
228 s << line << std::endl;
232 " DeadtimeBeamActiveTimeSlotPercent: %22.3f %%",
234 s << line << std::endl;
236 s <<
"Physics GtAlgoCountsRate, Hz" << std::endl;
238 int length = gtAlgoCountsRate.size() / 4;
239 for (
int i = 0;
i < length;
i++) {
242 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
246 gtAlgoCountsRate[i + length],
248 gtAlgoCountsRate[i + (length * 2)],
250 gtAlgoCountsRate[i + (length * 3)]);
251 s << line << std::endl;
254 s <<
"Test GtTechCountsRate, Hz" << std::endl;
256 length = gtTechCountsRate.size() / 4;
257 for (
int i = 0;
i < length;
i++) {
260 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
264 gtTechCountsRate[i + length],
266 gtTechCountsRate[i + (length * 2)],
268 gtTechCountsRate[i + (length * 3)]);
269 s << line << std::endl;
double deadtimeBeamActiveTimeSlotPercent_
float gtEventsRate() const
double l1AsTestRate() const
static double rateLS(unsigned long long counts)
const edm::EventSetup & c
unsigned long long gtEvents() const
unsigned long long deadtimeBeamActive() const
unsigned long long deadtimeBeamActivePrivateOrbit() const
unsigned long long triggersPhysicsGeneratedFDL() const
double deadtimeBeamActivePartitionControllerPercent() const
double triggersPhysicsGeneratedFDLRate() const
timespec collectionTime()
virtual ~Level1TriggerRates()
void set_tv_nsec(long value)
unsigned long long l1AsRandom() const
double triggersPhysicsLostRate_
unsigned long long deltaNS_
std::vector< unsigned int > gtTechCounts() const
double deadtimeBeamActivePercent_
unsigned long long triggersPhysicsLost() const
unsigned long long triggersPhysicsLostBeamActive() const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
double l1AsRandomRate() const
double triggersPhysicsLostBeamActiveRate() const
unsigned long long l1AsCalibration() const
double gtTriggersRate() const
std::vector< double > gtAlgoCountsRate() const
double triggersPhysicsLostBeamInactiveRate_
double triggersPhysicsLostBeamActiveRate_
double deadtimeBeamActiveCalibrationPercent_
int version() const
get the data
double l1AsCalibrationRate_
std::vector< double > gtAlgoCountsRate_
double triggersPhysicsLostBeamInactiveRate() const
double deadtimeBeamActivePercent() const
std::vector< unsigned int > gtAlgoCounts() const
double deadtimeBeamActiveTriggerRulesPercent_
double deadtimeBeamActiveTriggerRulesPercent() const
double deadtimeBeamActivePrivateOrbitPercent() const
unsigned long long l1AsPhysics() const
static double percentLSActive(unsigned long long counts)
unsigned long long deadtimeBeamActiveTriggerRules() const
unsigned long long deltaNS() const
timespec collectionTimeLumiSeg()
unsigned long long l1AsTest() const
double deadtimeBeamActiveTimeSlotPercent() const
double gtEventsRate() const
unsigned long long deadtime() const
unsigned long long gtTriggers() const
static double percentLS(unsigned long long counts)
float gtTriggersRate() const
void computeRates(Level1TriggerScalers const &t1)
std::vector< double > gtTechCountsRate_
struct timespec collectionTimeLumiSeg() const
unsigned long long deadtimeBeamActiveTimeSlot() const
double triggersPhysicsGeneratedFDLRate_
double deadtimeBeamActivePrivateOrbitPercent_
unsigned long long deadtimeBeamActiveCalibration() const
double deadtimePercent() const
double triggersPhysicsLostRate() const
TimeSpec collectionTimeLumiSeg_
double deadtimeBeamActiveCalibrationPercent() const
unsigned long long triggersPhysicsLostBeamInactive() const
void set_tv_sec(long value)
std::vector< double > gtTechCountsRate() const
unsigned long long deadtimeBeamActivePartitionController() const
double l1AsCalibrationRate() const
double deadtimeBeamActivePartitionControllerPercent_
double l1AsPhysicsRate() const
struct timespec collectionTime() const