ATLAS Offline Software
Public Member Functions | Static Public Attributes | List of all members
python.subdetectors.global_system.TDAQ_Busy Class Reference
Inheritance diagram for python.subdetectors.global_system.TDAQ_Busy:
Collaboration diagram for python.subdetectors.global_system.TDAQ_Busy:

Public Member Functions

def make_good_iovs (self, iovs)
 
def tdaq_busy_generator (self, iovs)
 
def quantize (self, lbtime, iovs)
 

Static Public Attributes

string input_db = 'COOLOFL_TRIGGER/CONDBR2'
 
 fetch_args = dict(tag="OflLumiAcct-Run3-003")
 
float deadfraction_threshold = 0.9
 

Detailed Description

Overloads calculate_good_iovs & quantize
Latter because this is a strange COOL folder that is timewise but already quantized
as run-LB

Definition at line 35 of file global_system.py.

Member Function Documentation

◆ make_good_iovs()

def python.subdetectors.global_system.TDAQ_Busy.make_good_iovs (   self,
  iovs 
)

Definition at line 45 of file global_system.py.

45  def make_good_iovs(self, iovs):
46  return IOVSet(list(connect_adjacent_iovs_defect(self.tdaq_busy_generator(iovs))))
47 

◆ quantize()

def python.subdetectors.global_system.TDAQ_Busy.quantize (   self,
  lbtime,
  iovs 
)

Definition at line 82 of file global_system.py.

82  def quantize(self, lbtime, iovs):
83  return iovs
84 

◆ tdaq_busy_generator()

def python.subdetectors.global_system.TDAQ_Busy.tdaq_busy_generator (   self,
  iovs 
)

Definition at line 48 of file global_system.py.

48  def tdaq_busy_generator(self, iovs):
49  events = process_iovs(iovs)
50  counter=0
51 
52  for since, until, (state,) in events:
53  if state.Run == 0 or state.Run is None: continue
54  if state is not None:
55  if state.LiveFraction is None:
56  deadfrac=1
57  log.warning('WARNING: LiveFraction is "None" for %d %d', state.Run, state.LumiBlock)
58  else:
59  deadfrac = 1-state.LiveFraction
60  if deadfrac < self.deadfraction_threshold:
61  continue
62  yield DefectIOV(RunLumi(state.Run, state.LumiBlock),
63  RunLumi(state.Run, state.LumiBlock+1),
64  'GLOBAL_BUSY', True,
65  comment='Average live fraction %.1f%%' % ((1-deadfrac)*100))
66  counter +=1
67 
68  counter_max=counter
69  counter=0
70  events = process_iovs(iovs)
71  for since, until, (state,) in events:
72  if state is not None and state.Run is not None:
73  deadfrac = 1-state.LiveFraction
74  if deadfrac < self.deadfraction_threshold:
75  continue
76  counter +=1
77  if state.Run == 0 and counter <counter_max:
78  log.error('ERROR: Wrong run number in LumiAccounting; here is the IOV: ')
79  log.error(state)
80  continue
81 

Member Data Documentation

◆ deadfraction_threshold

float python.subdetectors.global_system.TDAQ_Busy.deadfraction_threshold = 0.9
static

Definition at line 43 of file global_system.py.

◆ fetch_args

python.subdetectors.global_system.TDAQ_Busy.fetch_args = dict(tag="OflLumiAcct-Run3-003")
static

Definition at line 42 of file global_system.py.

◆ input_db

string python.subdetectors.global_system.TDAQ_Busy.input_db = 'COOLOFL_TRIGGER/CONDBR2'
static

Definition at line 41 of file global_system.py.


The documentation for this class was generated from the following file:
python.variable.DefectIOV
def DefectIOV(channel, present, comment)
Definition: variable.py:26
python.sugar.runlumi.RunLumi
RunLumi
Definition: runlumi.py:131
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.events.process_iovs
def process_iovs(*iovsets)
Definition: events.py:30
python.libcore.connect_adjacent_iovs_defect
def connect_adjacent_iovs_defect(generator)
Definition: libcore.py:69