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),
113 const std::vector<unsigned int> gtAlgoCounts = t.
gtAlgoCounts();
114 for ( std::vector<unsigned int>::const_iterator counts = gtAlgoCounts.begin();
115 counts != gtAlgoCounts.end(); ++counts)
120 const std::vector<unsigned int> gtTechCounts = t.
gtTechCounts();
121 for ( std::vector<unsigned int>::const_iterator counts = gtTechCounts.begin();
122 counts != gtTechCounts.end(); ++counts)
143 unsigned long long zeit1 =
144 ( (
unsigned long long)t1.
collectionTime().tv_sec * 1000000000ULL)|
146 unsigned long long zeit2 =
147 ( (
unsigned long long)t2.
collectionTime().tv_sec * 1000000000ULL)|
168 char zeitHeaven[128];
169 struct tm * horaHeaven;
171 s <<
"Level1TriggerRates Version: " << c.
version()
172 <<
" Rates in Hz, DeltaT: ";
176 s << c.
deltaT() <<
" sec" << std::endl;
180 s <<
"n/a" << std::endl;
184 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
185 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
186 sprintf(line,
" CollectionTime: %s.%9.9d" ,
187 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
188 s << line << std::endl;
190 sprintf(line,
" GtTriggersRate: %22.3f Hz",
192 s << line << std::endl;
194 sprintf(line,
" GtEventsRate: %22.3f Hz",
196 s << line << std::endl;
199 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
200 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
201 sprintf(line,
" CollectionTimeLumiSeg: %s.%9.9d" ,
202 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
203 s << line << std::endl;
205 sprintf(line,
" TriggersPhysicsGeneratedFDLRate: %22.3f Hz",
207 s << line << std::endl;
209 sprintf(line,
" TriggersPhysicsLostRate: %22.3f Hz",
211 s << line << std::endl;
213 sprintf(line,
" TriggersPhysicsLostBeamActiveRate: %22.3f Hz",
215 s << line << std::endl;
217 sprintf(line,
" TriggersPhysicsLostBeamInactiveRate: %22.3f Hz",
219 s << line << std::endl;
221 sprintf(line,
" L1AsPhysicsRate: %22.3f Hz",
223 s << line << std::endl;
225 sprintf(line,
" L1AsRandomRate: %22.3f Hz",
227 s << line << std::endl;
229 sprintf(line,
" L1AsTestRate: %22.3f Hz",
231 s << line << std::endl;
233 sprintf(line,
" L1AsCalibrationRate: %22.3f Hz",
235 s << line << std::endl;
237 sprintf(line,
" DeadtimePercent: %22.3f %%",
239 s << line << std::endl;
241 sprintf(line,
" DeadtimeBeamActivePercent: %22.3f %%",
243 s << line << std::endl;
245 sprintf(line,
" DeadtimeBeamActiveTriggerRulesPercent: %22.3f %%",
247 s << line << std::endl;
249 sprintf(line,
" DeadtimeBeamActiveCalibrationPercent: %22.3f %%",
251 s << line << std::endl;
253 sprintf(line,
" DeadtimeBeamActivePrivateOrbitPercent: %22.3f %%",
255 s << line << std::endl;
257 sprintf(line,
" DeadtimeBeamActivePartitionControllerPercent:%22.3f %%",
259 s << line << std::endl;
261 sprintf(line,
" DeadtimeBeamActiveTimeSlotPercent: %22.3f %%",
263 s << line << std::endl;
265 s <<
"Physics GtAlgoCountsRate, Hz" << std::endl;
267 int length = gtAlgoCountsRate.size() / 4;
268 for (
int i=0;
i<length;
i++)
271 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
272 i, gtAlgoCountsRate[
i],
273 (i+length), gtAlgoCountsRate[i+length],
274 (i+(length*2)), gtAlgoCountsRate[i+(length*2)],
275 (i+(length*3)), gtAlgoCountsRate[i+(length*3)]);
276 s << line << std::endl;
279 s <<
"Test GtTechCountsRate, Hz" << std::endl;
281 length = gtTechCountsRate.size() / 4;
282 for (
int i=0;
i<length;
i++)
285 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
286 i, gtTechCountsRate[
i],
287 (i+length), gtTechCountsRate[i+length],
288 (i+(length*2)), gtTechCountsRate[i+(length*2)],
289 (i+(length*3)), gtTechCountsRate[i+(length*3)]);
290 s << line << std::endl;
double deadtimeBeamActiveTimeSlotPercent_
float gtEventsRate() const
double l1AsTestRate() const
static double rateLS(unsigned long long counts)
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
double l1AsRandomRate() const
double triggersPhysicsLostBeamActiveRate() const
unsigned long long l1AsCalibration() const
double gtTriggersRate() const
std::ostream & operator<<(std::ostream &s, const Level1TriggerRates &c)
Pretty-print operator for Level1TriggerRates.
std::vector< double > gtAlgoCountsRate() const
double triggersPhysicsLostBeamInactiveRate_
double triggersPhysicsLostBeamActiveRate_
double deadtimeBeamActiveCalibrationPercent_
int version() const
get the data
double l1AsCalibrationRate_
auto const T2 &decltype(t1.eta()) t2
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