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.
◆ __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=""):
67 accessor needs to be initialized with either a filename or the dbalias and hlpskey
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"
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}")
◆ chainNames()
def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.chainNames |
( |
|
self | ) |
|
◆ 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"]
◆ 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"]
◆ prescales()
def python.HLTTriggerConfigAccess.HLTPrescalesSetAccess.prescales |
( |
|
self | ) |
|
◆ 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()) )
The documentation for this class was generated from the following file: