ATLAS Offline Software
Loading...
Searching...
No Matches
TElectronTestAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3# Simple script to run the TElectronTestAlg with CA
4
5
6import sys
7from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
8from AthenaConfiguration.ComponentFactory import CompFactory
9
10
12
13 acc = ComponentAccumulator()
14 TElectronTestAlg = CompFactory.getComp("CP::TElectronTestAlg")
15 testAlg = TElectronTestAlg(name="CP_TElectronTestAlg",
16 IdKey="Medium")
17 acc.addEventAlgo(testAlg)
18 return acc
19
20
21if __name__ == "__main__":
22 from AthenaConfiguration.AllConfigFlags import initConfigFlags
23 flags = initConfigFlags()
24 flags.fillFromArgs()
25 flags.lock()
26 flags.dump()
27
28 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
29 cfg = MainServicesCfg(flags)
30 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
31 cfg.merge(PoolReadCfg(flags))
32 MessageSvc = CompFactory.MessageSvc
33 cfg.addService(MessageSvc(infoLimit=0))
34 cfg.merge(TElectronTestAlgCfg())
35
36 print("Start running...")
37 statusCode = None
38 statusCode = cfg.run()
39
40 assert statusCode is not None, "Issue while running"
41 sys.exit(not statusCode.isSuccess())
void print(char *figname, TCanvas *c1)
Dual use Test Alg for TElectronEfficiencyTool.