Definition at line 117 of file atlas_oh.py.
◆ __init__()
def python.atlas_oh.OHOutputModule.__init__ |
( |
|
self | ) |
|
◆ configure()
None python.atlas_oh.OHOutputModule.configure |
( |
|
self, |
|
|
Mapping[str, Any] |
options |
|
) |
| |
Configure this module. Potential elements of "options":
target: should be a ROOT-openable filename or URL which
can be opened for writing.
prefix: directory path to place results under.
overwrite: boolean to indicate whether results should overwrite
existing histograms in the file.
delay: only write histograms in finalize() (not during publish()).
Definition at line 121 of file atlas_oh.py.
121 def configure(self, options: Mapping[str, Any]) ->
None:
123 Configure this module. Potential elements of "options":
124 target: should be a ROOT-openable filename or URL which
125 can be opened for writing.
126 prefix: directory path to place results under.
127 overwrite: boolean to indicate whether results should overwrite
128 existing histograms in the file.
129 delay: only write histograms in finalize() (not during publish()).
133 if 'target' not in options:
134 raise ValueError(
"Must specify 'target' as an option "
136 self.target = options[
'target']
137 self.partition, self.server, self.provider = self.target.
split(
';')
138 self.partition = ispy.IPCPartition(self.partition)
139 if not self.partition.
isValid():
140 raise ValueError(f
'Output partition {self.partition.name()} is not valid')
141 self.prefix = options.get(
'prefix',
'')
142 self.provider = oh.OHRootProvider(self.partition,
143 self.server, self.provider,
None)
145 log = logging.getLogger(self.__class__.__name__)
146 log.info(f
'Using target {self.target}')
◆ finalize()
None python.atlas_oh.OHOutputModule.finalize |
( |
|
self | ) |
|
Writes outstanding HistObjects to file
Definition at line 157 of file atlas_oh.py.
158 """ Writes outstanding HistObjects to file """
◆ publish()
None python.atlas_oh.OHOutputModule.publish |
( |
|
self, |
|
|
Union[HistObject, Iterable[HistObject]] |
obj |
|
) |
| |
Accepts a HistObject containing a ROOT object to write to file
Definition at line 148 of file atlas_oh.py.
148 def publish(self, obj: Union[HistObject, Iterable[HistObject]]) ->
None:
149 """ Accepts a HistObject containing a ROOT object to write to file """
151 if isinstance(obj, HistObject):
155 self.provider.publish(o.hist, os.path.join(self.prefix, o.name))
◆ partition
python.atlas_oh.OHOutputModule.partition |
◆ prefix
python.atlas_oh.OHOutputModule.prefix |
◆ provider
python.atlas_oh.OHOutputModule.provider |
◆ queue
python.atlas_oh.OHOutputModule.queue |
◆ target
python.atlas_oh.OHOutputModule.target |
The documentation for this class was generated from the following file:
bool configure(asg::AnaToolHandle< ITrigGlobalEfficiencyCorrectionTool > &tool, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronEffToolsHandles, ToolHandleArray< IAsgElectronEfficiencyCorrectionTool > &electronSFToolsHandles, ToolHandleArray< CP::IMuonTriggerScaleFactors > &muonToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonEffToolsHandles, ToolHandleArray< IAsgPhotonEfficiencyCorrectionTool > &photonSFToolsHandles, const std::string &triggers, const std::map< std::string, std::string > &legsPerTool, unsigned long nToys, bool debug)
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.