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

Public Member Functions

def __init__ (self, configType, filename)
 
dict[str, Any] load (self)
 
def setQuery (self, query)
 
def getWriteFilename (self)
 
def confirmConfigType (self, config)
 

Public Attributes

 filename
 

Detailed Description

Definition at line 70 of file TriggerConfigAccessBase.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TriggerConfigAccessBase.ConfigFileLoader.__init__ (   self,
  configType,
  filename 
)

Definition at line 71 of file TriggerConfigAccessBase.py.

71  def __init__(self, configType, filename ):
72  super(ConfigFileLoader,self).__init__(configType)
73  self.filename = filename

Member Function Documentation

◆ confirmConfigType()

def python.TriggerConfigAccessBase.ConfigLoader.confirmConfigType (   self,
  config 
)
inherited
checks that the in-file specification of the configuration type matches the expected type

Definition at line 51 of file TriggerConfigAccessBase.py.

51  def confirmConfigType(self,config):
52  """
53  checks that the in-file specification of the configuration type matches the expected type
54  """
55  if config['filetype'] != self.configType:
56  raise RuntimeError("Can not load file with filetype '%s' when expecting '%s'" % (config['filetype'], self.configType.filetype))
57 

◆ getWriteFilename()

def python.TriggerConfigAccessBase.ConfigFileLoader.getWriteFilename (   self)

Reimplemented from python.TriggerConfigAccessBase.ConfigLoader.

Definition at line 81 of file TriggerConfigAccessBase.py.

81  def getWriteFilename(self):
82  outfn = os.path.basename(self.filename)
83  if outfn.endswith(".json"):
84  outfn = outfn.rsplit('.',1)[0]
85  return outfn + ".out.json"
86 

◆ load()

dict[str, Any] python.TriggerConfigAccessBase.ConfigFileLoader.load (   self)

Reimplemented from python.TriggerConfigAccessBase.ConfigLoader.

Definition at line 74 of file TriggerConfigAccessBase.py.

74  def load(self) -> dict[str, Any]:
75  with open(self.filename, 'r') as fp:
76  config = json.load(fp)
77  self.confirmConfigType(config)
78  return config

◆ setQuery()

def python.TriggerConfigAccessBase.ConfigFileLoader.setQuery (   self,
  query 
)

Reimplemented from python.TriggerConfigAccessBase.ConfigLoader.

Definition at line 79 of file TriggerConfigAccessBase.py.

79  def setQuery(self, query):
80  pass

Member Data Documentation

◆ filename

python.TriggerConfigAccessBase.ConfigFileLoader.filename

Definition at line 73 of file TriggerConfigAccessBase.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
Trk::open
@ open
Definition: BinningType.h:40
python.root_pickle.load
def load(f, use_proxy=1, key=None)
Definition: root_pickle.py:430