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)
 
def load (self)
 
def setQuery (self, query)
 
def getWriteFilename (self)
 
def confirmConfigType (self, config)
 

Public Attributes

 filename
 
 configType
 

Detailed Description

Definition at line 58 of file TriggerConfigAccessBase.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 59 of file TriggerConfigAccessBase.py.

59  def __init__(self, configType, filename ):
60  super(ConfigFileLoader,self).__init__(configType)
61  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)

Definition at line 69 of file TriggerConfigAccessBase.py.

69  def getWriteFilename(self):
70  outfn = os.path.basename(self.filename)
71  if outfn.endswith(".json"):
72  outfn = outfn.rsplit('.',1)[0]
73  return outfn + ".out.json"
74 

◆ load()

def python.TriggerConfigAccessBase.ConfigFileLoader.load (   self)

Definition at line 62 of file TriggerConfigAccessBase.py.

62  def load(self):
63  with open(self.filename, 'r') as fp:
64  config = json.load(fp, object_pairs_hook = odict)
65  self.confirmConfigType(config)
66  return config

◆ setQuery()

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

Definition at line 67 of file TriggerConfigAccessBase.py.

67  def setQuery(self, query):
68  pass

Member Data Documentation

◆ configType

python.TriggerConfigAccessBase.ConfigLoader.configType
inherited

Definition at line 50 of file TriggerConfigAccessBase.py.

◆ filename

python.TriggerConfigAccessBase.ConfigFileLoader.filename

Definition at line 61 of file TriggerConfigAccessBase.py.


The documentation for this class was generated from the following file:
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.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:476