62 self.setup()
63
64
65 from PerfMonComps.PerfMonConfigHelpers import setPerfmonFlagsFromRunArgs
66 setPerfmonFlagsFromRunArgs(self.flags, self.args)
67
68 if self.args.test_mt_dependencies is not None:
69 self.flags.Concurrency.NumThreads = self.args.test_mt_dependencies
70 self.flags.Scheduler.ShowControlFlow = True
71 self.flags.Scheduler.ShowDataDeps = True
73 self.printFlags()
74
75 self.initServiceCfg()
76 if self.args.pool_file_reading or self.args.test_mt_dependencies is not None:
77 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
78 self.cfg.
merge(PoolReadCfg(self.flags))
79 else:
80 from AthenaRootComps.xAODEventSelectorConfig import xAODReadCfg
81 self.cfg.
merge(xAODReadCfg(self.flags))
82 from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg
83 self.cfg.
merge(CutFlowSvcCfg(self.flags))
84
85 from AthenaConfiguration.ComponentFactory import CompFactory
86 if not self.args.merge_output_files:
87 outputFileHist = f"ANALYSIS_HIST DATAFILE='hist-{self.outputName}.root' OPT='RECREATE'"
88 self.cfg.addService(CompFactory.THistSvc(Output=[outputFileHist]))
89
90
91 self.cfg.
merge(self.makeAlgSequence())
92
93
94
95 for stream in self.outputStreams:
96 if stream == 'ANALYSIS_HIST' and not self.args.merge_output_files:
97 continue
98 suffix = '' if stream == 'ANALYSIS' else '_' + stream.removeprefix('ANALYSIS_')
99 self.cfg.addService(CompFactory.THistSvc(Output=[
100 f"{stream} DATAFILE='{self.outputName}{suffix}.root' OPT='RECREATE'"]))
101
102
103 if self.flags.PerfMon.doFastMonMT or self.flags.PerfMon.doFullMonMT:
104 from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
105 self.cfg.
merge(PerfMonMTSvcCfg(self.flags))
106
107 self.cfg.printConfig()
108
109
110 if self.args.config_only:
111 with open("CPRunConfig.pkl", "wb") as f:
112 self.cfg.store(f)
113 sys.exit(0)
114
116 sys.exit(sc.isFailure())
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
int run(int argc, char *argv[])