ATLAS Offline Software
Loading...
Searching...
No Matches
python.HLTTriggerConfigAccess.HLTJobOptionsAccess Class Reference
Inheritance diagram for python.HLTTriggerConfigAccess.HLTJobOptionsAccess:
Collaboration diagram for python.HLTTriggerConfigAccess.HLTJobOptionsAccess:

Public Member Functions

 __init__ (self, str filename="", str dbalias="", int smkey=0, bool useCrest=False, str crestServer="")
 algorithms (self)
 algorithmNames (self)
 properties (self, algName)
 name (self)
 printSummary (self)

Detailed Description

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

Definition at line 100 of file HLTTriggerConfigAccess.py.

Constructor & Destructor Documentation

◆ __init__()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.__init__ ( self,
str filename = "",
str dbalias = "",
int smkey = 0,
bool useCrest = False,
str crestServer = "" )
accessor needs to be initialized with either a filename or the dbalias and smkey

Definition at line 105 of file HLTTriggerConfigAccess.py.

106 useCrest: bool = False, crestServer: str = ""):
107 """
108 accessor needs to be initialized with either a filename or the dbalias and smkey
109 """
110 super().__init__(ConfigType.HLTJO, mainkey = "properties",
111 filename = filename, dbalias = dbalias, dbkey = smkey,
112 useCrest = useCrest, crestServer = crestServer)
113 self.loader.setQuery({
114 2: "SELECT JO.HJO_DATA FROM {schema}.SUPER_MASTER_TABLE SMT, {schema}.HLT_JOBOPTIONS JO WHERE JO.HJO_ID=SMT.SMT_HLT_JOBOPTIONS_ID AND SMT.SMT_ID=:dbkey", # for new db schema
115 1: "SELECT JO.JO_CONTENT FROM {schema}.SUPER_MASTER_TABLE SMT, {schema}.JO_MASTER_TABLE JO WHERE JO.JO_ID=SMT.SMT_JO_MASTER_TABLE_ID AND SMT.SMT_ID=:dbkey" # for current db schema
116 })
117 self.load()
118 if smkey is not None:
119 log.info(f"Loaded HLT job options {self.name()} with {len(self)} algorithms from {dbalias} with smk {smkey}{' using CREST' if useCrest else ''}")
120 elif filename is not None:
121 log.info(f"Loaded HLT job options {self.name()} with {len(self)} chains from file {filename}")
122

Member Function Documentation

◆ algorithmNames()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.algorithmNames ( self)

Definition at line 126 of file HLTTriggerConfigAccess.py.

126 def algorithmNames(self):
127 return iter(self)
128

◆ algorithms()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.algorithms ( self)

Definition at line 123 of file HLTTriggerConfigAccess.py.

123 def algorithms(self):
124 return self["properties"]
125

◆ name()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.name ( self)

Definition at line 132 of file HLTTriggerConfigAccess.py.

132 def name(self):
133 # job options don't have a name
134 return "HLT JobOptions"
135
136

◆ printSummary()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.printSummary ( self)

Definition at line 137 of file HLTTriggerConfigAccess.py.

137 def printSummary(self):
138 print("Job options")
139 print("Number of algorithms: %i" % len(self) )
140 print("Number of properties: %i" % sum(len(alg) for alg in self.algorithms().values()) )
141
142
void print(char *figname, TCanvas *c1)

◆ properties()

python.HLTTriggerConfigAccess.HLTJobOptionsAccess.properties ( self,
algName )

Definition at line 129 of file HLTTriggerConfigAccess.py.

129 def properties(self, algName):
130 return self["properties"][algName]
131

The documentation for this class was generated from the following file: