Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
python.AthenaCPRunScript.AthenaCPRunScript Class Reference
Inheritance diagram for python.AthenaCPRunScript.AthenaCPRunScript:
Collaboration diagram for python.AthenaCPRunScript.AthenaCPRunScript:

Public Member Functions

def __init__ (self)
 
def cfg (self)
 
def addCustomArguments (self)
 
def makeAlgSequence (self)
 
def initServiceCfg (self)
 
def run (self)
 

Private Attributes

 _cfg
 

Detailed Description

Definition at line 6 of file AthenaCPRunScript.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AthenaCPRunScript.AthenaCPRunScript.__init__ (   self)

Definition at line 7 of file AthenaCPRunScript.py.

7  def __init__(self):
8  super().__init__()
9  self.logger.info("AthenaCPRunScript initialized")
10  self._cfg = None
11  self.addCustomArguments()
12  # Avoid putting call to parse_args() here! Otherwise it is hard to retrieve the parser infos
13 

Member Function Documentation

◆ addCustomArguments()

def python.AthenaCPRunScript.AthenaCPRunScript.addCustomArguments (   self)

Definition at line 20 of file AthenaCPRunScript.py.

20  def addCustomArguments(self):
21  # derivedGroup = self.parser.add_argument_group('Athena specific arguments') # commented out for now to avoid compilation warning in Athena, add it back when needed
22  # add arguments here derivedGroup.add_argument(...)
23  return
24 

◆ cfg()

def python.AthenaCPRunScript.AthenaCPRunScript.cfg (   self)

Definition at line 15 of file AthenaCPRunScript.py.

15  def cfg(self):
16  if self._cfg is None:
17  raise ValueError('Service configuration not initialized, use initServiceCfg()')
18  return self._cfg
19 

◆ initServiceCfg()

def python.AthenaCPRunScript.AthenaCPRunScript.initServiceCfg (   self)

Definition at line 39 of file AthenaCPRunScript.py.

39  def initServiceCfg(self):
40  if not self.flags.locked():
41  raise ValueError('Flags must be locked before initializing services')
42  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
43  self._cfg = MainServicesCfg(self.flags)
44 

◆ makeAlgSequence()

def python.AthenaCPRunScript.AthenaCPRunScript.makeAlgSequence (   self)

Definition at line 25 of file AthenaCPRunScript.py.

25  def makeAlgSequence(self):
26  from AthenaConfiguration.ComponentFactory import CompFactory
27  algSeq = CompFactory.AthSequencer()
28  self.logger.info("Configuring algorithms based on YAML file")
29  configSeq = self.config.configure()
30  self.logger.info("Configuring common services")
31  from AnalysisAlgorithmsConfig.ConfigAccumulator import ConfigAccumulator
32  configAccumulator = ConfigAccumulator(autoconfigFromFlags=self.flags,
33  algSeq=algSeq,
34  noSystematics=self.args.no_systematics)
35  self.logger.info("Configuring algorithms")
36  configSeq.fullConfigure(configAccumulator)
37  return configAccumulator.CA
38 

◆ run()

def python.AthenaCPRunScript.AthenaCPRunScript.run (   self)

Definition at line 45 of file AthenaCPRunScript.py.

45  def run(self):
46  self.setup()
47  self.flags.lock()
48  self.printFlags()
49 
50  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
51  from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg
52  self.initServiceCfg()
53  self.cfg.merge(PoolReadCfg(self.flags))
54  self.cfg.merge(CutFlowSvcCfg(self.flags))
55 
56  outputFile = f"ANALYSIS DATAFILE='{self.args.output_name}.root' OPT='RECREATE'"
57  from AthenaConfiguration.ComponentFactory import CompFactory
58  self.cfg.addService(CompFactory.THistSvc(Output=[outputFile]))
59  self.cfg.merge(self.makeAlgSequence())
60  self.cfg.printConfig()
61 
62  sc = self.cfg.run(self.flags.Exec.MaxEvents)
63  sys.exit(sc.isFailure())

Member Data Documentation

◆ _cfg

python.AthenaCPRunScript.AthenaCPRunScript._cfg
private

Definition at line 10 of file AthenaCPRunScript.py.


The documentation for this class was generated from the following file:
grepfile.info
info
Definition: grepfile.py:38
configure
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)
Definition: TrigGlobEffCorrValidation.cxx:514
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
run
Definition: run.py:1
WriteCaloSwCorrections.cfg
cfg
Definition: WriteCaloSwCorrections.py:23
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.EventBookkeeperToolsConfig.CutFlowSvcCfg
def CutFlowSvcCfg(flags, **kwargs)
Definition: EventBookkeeperToolsConfig.py:24
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
merge
Definition: merge.py:1