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

Static Public Attributes

bool statusOn = True
list allowedTypes = ['list']
list StoredValue = []

Protected Member Functions

 _do_action (self, *args, **kwds)

Detailed Description

A list of outputs to be produced by THistSvc in the format <streamName>:<fileName>

Definition at line 121 of file AthenaCommonFlags.py.

Member Function Documentation

◆ _do_action()

python.AthenaCommonFlags.HistOutputs._do_action ( self,
* args,
** kwds )
protected

Definition at line 127 of file AthenaCommonFlags.py.

127 def _do_action( self, *args, **kwds ):
128 from AthenaCommon import CfgMgr
129 from AthenaCommon import AppMgr
130 if not hasattr(AppMgr.ServiceMgr,"THistSvc"):
131 AppMgr.ServiceMgr += CfgMgr.THistSvc()
132
133 for output in self.StoredValue:
134 if ":" not in output:
135 self.StoredValue.remove(output)
136 raise ValueError("HistOutputs: %s must be in format '<streamName>:<fileName>'" % output)
137
138 streamName = output.split(":",1)[0]
139 fileName = output.split(":",1)[1]
140
141 #check the THistSvc has the stream, if not we create it
142 outputs = AppMgr.ServiceMgr.THistSvc.Output
143 foundStream=False
144 for hsOutput in outputs:
145 hsStreamName = hsOutput.split(" ",1)[0]
146 if hsStreamName==streamName:
147 foundStream=True
148 break
149 if not foundStream:
150 AppMgr.ServiceMgr.THistSvc.Output += ["%s DATAFILE='%s' OPT='RECREATE'" % (streamName,fileName)]
151
152

Member Data Documentation

◆ allowedTypes

list python.AthenaCommonFlags.HistOutputs.allowedTypes = ['list']
static

Definition at line 124 of file AthenaCommonFlags.py.

◆ statusOn

bool python.AthenaCommonFlags.HistOutputs.statusOn = True
static

Definition at line 123 of file AthenaCommonFlags.py.

◆ StoredValue

list python.AthenaCommonFlags.HistOutputs.StoredValue = []
static

Definition at line 125 of file AthenaCommonFlags.py.


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