Definition at line 58 of file TriggerConfigAccessBase.py.
◆ __init__()
def python.TriggerConfigAccessBase.ConfigFileLoader.__init__ |
( |
|
self, |
|
|
|
configType, |
|
|
|
filename |
|
) |
| |
◆ 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):
53 checks that the in-file specification of the configuration type matches the expected type
55 if config[
'filetype'] != self.configType:
56 raise RuntimeError(
"Can not load file with filetype '%s' when expecting '%s'" % (config[
'filetype'], self.configType.filetype))
◆ 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"
◆ load()
def python.TriggerConfigAccessBase.ConfigFileLoader.load |
( |
|
self | ) |
|
Definition at line 62 of file TriggerConfigAccessBase.py.
63 with open(self.filename,
'r')
as fp:
64 config = json.load(fp, object_pairs_hook = odict)
65 self.confirmConfigType(config)
◆ setQuery()
def python.TriggerConfigAccessBase.ConfigFileLoader.setQuery |
( |
|
self, |
|
|
|
query |
|
) |
| |
◆ configType
python.TriggerConfigAccessBase.ConfigLoader.configType |
|
inherited |
◆ filename
python.TriggerConfigAccessBase.ConfigFileLoader.filename |
The documentation for this class was generated from the following file: