ATLAS Offline Software
Public Member Functions | List of all members
python.HLTTriggerConfigAccess.HLTPrescalesSetAccess Class Reference
Inheritance diagram for python.HLTTriggerConfigAccess.HLTPrescalesSetAccess:
Collaboration diagram for python.HLTTriggerConfigAccess.HLTPrescalesSetAccess:

Public Member Functions

def __init__ (self, filename=None, jsonString=None, dbalias=None, hltpskey=None, useCrest=False, crestServer="")
 
def prescales (self)
 
def chainNames (self)
 
def prescale (self, chainName)
 
def enabled (self, chainName)
 
def printSummary (self)
 

Detailed Description

this class provides access to the HLT prescales set
the methods are self-explanatory for people with knowledge of the configuration

Definition at line 59 of file HLTTriggerConfigAccess.py.

Constructor & Destructor Documentation

◆ __init__()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.__init__ (   self,
  filename = None,
  jsonString = None,
  dbalias = None,
  hltpskey = None,
  useCrest = False,
  crestServer = "" 
)
accessor needs to be initialized with either a filename or the dbalias and hlpskey

Definition at line 64 of file HLTTriggerConfigAccess.py.

64  def __init__(self, filename = None, jsonString = None, dbalias = None, hltpskey = None,
65  useCrest=False, crestServer=""):
66  """
67  accessor needs to be initialized with either a filename or the dbalias and hlpskey
68  """
69  super().__init__(ConfigType.HLTPS, mainkey = "prescales",
70  jsonString = jsonString, filename = filename, dbalias = dbalias, dbkey = hltpskey,
71  useCrest=useCrest, crestServer=crestServer)
72  self.loader.setQuery({
73  1: "SELECT HPS_DATA FROM {schema}.HLT_PRESCALE_SET HPS WHERE HPS_ID=:dbkey" # for current and new db schema
74  })
75  self.load()
76  if hltpskey is not None:
77  log.info(f"Loaded HLT prescales {self.name()} (size {len(self)}) from {dbalias} with psk {hltpskey}{' using CREST' if useCrest else ''}")
78  elif filename is not None:
79  log.info(f"Loaded HLT prescales {self.name()} with {len(self)} chains from file {filename}")
80 

Member Function Documentation

◆ chainNames()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.chainNames (   self)

Definition at line 84 of file HLTTriggerConfigAccess.py.

84  def chainNames(self):
85  return iter(self)
86 

◆ enabled()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.enabled (   self,
  chainName 
)

Definition at line 90 of file HLTTriggerConfigAccess.py.

90  def enabled(self, chainName):
91  return self["prescales"][chainName]["enabled"]
92 

◆ prescale()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.prescale (   self,
  chainName 
)

Definition at line 87 of file HLTTriggerConfigAccess.py.

87  def prescale(self, chainName):
88  return self["prescales"][chainName]["prescale"]
89 

◆ prescales()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.prescales (   self)

Definition at line 81 of file HLTTriggerConfigAccess.py.

81  def prescales(self):
82  return self["prescales"]
83 

◆ printSummary()

def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.printSummary (   self)

Definition at line 93 of file HLTTriggerConfigAccess.py.

93  def printSummary(self):
94  print("HLT prescales set %s" % self.name())
95  print("Number of prescales: %i" % len(self) )
96  print("Number of enabled prescales: %i" % sum(x["enabled"] for x in self["prescales"].values()) )
97 
98 
99 

The documentation for this class was generated from the following file:
RatesAnalysisFullMenu.prescales
prescales
Definition: RatesAnalysisFullMenu.py:119
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18