6 from TrigCostAnalysis.TableConstructorBase
import TableConstructorBase, Column
9 @file Global_HLT_TableConstructor.py
10 @brief Contains TableConstructor classes per Global_HLT table. Defines what
11 should be saved in table and fills them
16 ''' @brief Class representing Global_HLT table
18 def __init__(self, tableObj, underflowThreshold, overflowThreshold):
19 super().
__init__(tableObj, underflowThreshold, overflowThreshold)
23 "SteeringTime_perEvent",
30 self.columns[
'name'] = Column(
"Name",
"Algorithms name")
31 self.columns[
'lbLength'] = Column(
"Lumi Block Length [s]",
"Length of this luminosity block or blocks")
32 self.columns[
'events'] = Column(
"Raw Active Events",
"Raw underlying statistics on number of events processed")
33 self.columns[
'eventsWeighted'] = Column(
"Active Events",
"Total weighted number of events processed")
34 self.columns[
'callsPerEvent'] = Column(
"Alg Calls/Event",
"Mean number of alg calls")
35 self.columns[
'eventRate'] = Column(
"Event Rate [Hz]",
"LB normalised rate of events in the HLT")
36 self.columns[
'callRate'] = Column(
"Alg Call Rate [Hz]",
"LB normalised rate of alg calls in events in the HLT")
37 self.columns[
'steeringTime'] = Column(
"Total Steering Time [s]",
"Total weighted integrated steering time")
38 self.columns[
'steeringTimePerEvent'] = Column(
"Steering Time/Event [ms]",
"Mean integrated steering time per event")
39 self.columns[
'totalTimeSec'] = Column(
"Alg Total Time [s]",
"Total weighted integrated walltime of all algs")
40 self.columns[
'timePerCall'] = Column(
"Alg Time/Call [ms]",
"Mean weighted alg time normalised to all alg calls")
41 self.columns[
'timePerEvent'] = Column(
"Alg Time/Event [ms]",
"Mean weighted alg time normalised to all events")
42 self.columns[
'nPU'] = Column(
"Number of PU",
"Estimated number of needed CPU with 100 kHz input rate based on algorithm time per event")
43 self.columns[
'nPUErr'] = Column(
"Error on number of CPUs",
"Error on number of CPUs based on Algorithm tome per event error")
47 rateDenominator = self.
lbLength if itemName ==
"All" else self.getHistogram(
"LbLength").GetBinContent(1)
48 weightedEvents = self.getHistogram(
"SteeringTime_perEvent").Integral()
49 weightedCalls = self.getXWeightedIntegral(
"AlgCalls_perEvent", isLog=
False)
51 self.columns[
'name'].addValue(itemName)
52 self.columns[
'lbLength'].addValue(self.getHistogram(
"LbLength").GetBinContent(1))
53 self.columns[
'events'].addValue(self.getHistogram(
"SteeringTime_perEvent").
GetEntries())
54 self.columns[
'eventsWeighted'].addValue(weightedEvents)
55 self.columns[
'callsPerEvent'].addValue(self.getHistogram(
"AlgCalls_perEvent").
GetMean())
56 self.columns[
'eventRate'].addValue(weightedEvents / rateDenominator)
57 self.columns[
'callRate'].addValue(weightedCalls / rateDenominator)
58 self.columns[
'steeringTime'].addValue(self.getXWeightedIntegral(
"SteeringTime_perEvent", isLog=
True) * 1e-3)
59 self.columns[
'steeringTimePerEvent'].addValue(self.getHistogram(
"SteeringTime_perEvent").
GetMean())
60 self.columns[
'totalTimeSec'].addValue(self.getXWeightedIntegral(
"AlgTime_perEvent", isLog=
True) * 1e-3)
61 self.columns[
'timePerCall'].addValue(self.getHistogram(
"AlgTime_perCall").
GetMean())
62 self.columns[
'timePerEvent'].addValue(self.getHistogram(
"AlgTime_perEvent").
GetMean())
63 self.columns[
'nPU'].addValue(self.getHistogram(
"AlgTime_perEvent").
GetMean() * 100)
64 self.columns[
'nPUErr'].addValue(self.getHistogram(
"AlgTime_perEvent").GetMeanError() * 100)