ATLAS Offline Software
Loading...
Searching...
No Matches
TesterTreeConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5
6def TesterTreeAlgCfg(flags, name = "TesterTreeAlg", **kwargs):
7 result = ComponentAccumulator()
8 the_alg = CompFactory.MuonVal.MuonTester.TreeTestAlg(name, **kwargs)
9 result.addEventAlgo(the_alg, primary = True)
10 return result
11
12if __name__ == "__main__":
13 from MuonGeoModelTest.testGeoModel import SetupArgParser
14 from AthenaConfiguration.AllConfigFlags import initConfigFlags
15 parser = SetupArgParser()
16 parser.set_defaults(outRootFile="TesterTreeFile.root")
17
18 args = SetupArgParser().parse_args()
19
20 flags = initConfigFlags()
21 flags.Concurrency.NumThreads = args.threads
22 flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
23 flags.Input.Files = args.inputFile
24 flags.GeoModel.AtlasVersion = args.geoTag
25 flags.IOVDb.GlobalTag = args.condTag
26 flags.Scheduler.ShowDataDeps = True
27 flags.Scheduler.ShowDataFlow = True
28 flags.Exec.MaxEvents = 1
29 flags.lock()
30
31 from MuonConfig.MuonConfigUtils import setupHistSvcCfg, executeTest, SetupMuonStandaloneCA
32 cfg = SetupMuonStandaloneCA(flags)
33 cfg.merge(setupHistSvcCfg(flags, outStream="TestStream", outFile = args.outRootFile))
34 cfg.merge(TesterTreeAlgCfg(flags))
35
36 executeTest(cfg)
TesterTreeAlgCfg(flags, name="TesterTreeAlg", **kwargs)