ATLAS Offline Software
run_hypo_container_ctest.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 import os
7 
8 if __name__ == '__main__':
9 
10  from AthenaCommon.Logging import logging
11  from AthenaCommon.Constants import DEBUG
12 
13  logger = logging.getLogger('run_eEmSortSelectCount')
14  logger.setLevel(DEBUG)
15 
16 
17  from AthenaConfiguration.AllConfigFlags import initConfigFlags
18  flags = initConfigFlags()
19 
20  #flags.Common.isOnline = not flags.Input.isMC
21  flags.Concurrency.NumThreads = 1
22  flags.Concurrency.NumConcurrentEvents = 1
23  flags.Trigger.doLVL1 = True
24 
25 
26  flags.Concurrency.NumThreads = 1
27  flags.Concurrency.NumConcurrentEvents = 1
28 
29  flags.GeoModel.AtlasVersion="ATLAS-R3S-2021-03-01-00"
30 
31  flags.Scheduler.ShowDataDeps = True
32  flags.Scheduler.CheckDependencies = True
33  flags.Scheduler.ShowDataFlow = True
34  flags.Trigger.EDMVersion = 3
35  flags.Trigger.doLVL1 = True
36  flags.Trigger.enableL1CaloPhase1 = True
37 
38  parser = flags.getArgumentParser()
39  args = flags.fillFromArgs(parser=parser)
40  flags.dump()
41 
42  flags.lock()
43  flags.dump()
44 
45  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
46  acc = MainServicesCfg(flags)
47 
48 
49  hypoTestBench_alg = CompFactory.GlobalSim.HypoTestBenchAlg(
50  "testBenchAlg")
51 
52  base_data = "/eos/atlas/atlascerngroupdisk/data-art/"\
53  "large-input/trig-val/GlobalSimTest/eEmSortSelectCount/"
54 
55  # an example input file name of test vectors
56 
57 
58  # run from file.
59  hypoTestBench_alg.testsFileName=os.path.join(base_data,
60  '2025-03-24_tests.dat')
61 
62  exp_mults_data = os.path.join(base_data,
63  '2025-03-24_expected_multiplicity.dat')
64  hypoTestBench_alg.expectedMultsFileName = exp_mults_data
65 
66  exp_tobs_data = os.path.join(base_data, '2025-03-24_expected_tobs.dat')
67  hypoTestBench_alg.expectedTobsFileName = exp_tobs_data
68 
69  # values for manual testing.
70  # manual testing is active if no input file name is given
71  hypoTestBench_alg.test_vecs = ['0x1000000000000000fe']
72  hypoTestBench_alg.expTobs = '0x' + '0'* (198*8)
73  hypoTestBench_alg.expMults = '0x' + '0' * 13
74 
75 
76  acc.addEventAlgo(hypoTestBench_alg)
77  from AthenaCommon.Constants import DEBUG
78 
79  hypoTestBench_alg.OutputLevel = DEBUG
80 
81  from GlobalSimAlgCfg_hypo_container import GlobalSimulationAlgCfg
82  acc.merge(GlobalSimulationAlgCfg(flags))
83 
84  if acc.run().isFailure():
85  import sys
86  sys.exit(1)
87 
88 
GlobalSimAlgCfg_Egamma1Baseline.GlobalSimulationAlgCfg
def GlobalSimulationAlgCfg(flags, name="GlobalSimEgamma1Baseline", OutputLevel=DEBUG, dump=False)
Definition: GlobalSimAlgCfg_Egamma1Baseline.py:10
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:312
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19