ATLAS Offline Software
Loading...
Searching...
No Matches
BarcodeServicesConfig.py
Go to the documentation of this file.
1"""ComponentAccumulator BarcodeServices configurations
2
3Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4"""
5from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory import CompFactory
7
8
9def BarcodeSvcCfg(flags, **kwargs):
10 """Return the MCxBarcodeSvcCfg config flagged by Sim.TruthStrategy"""
11 from SimulationConfig.SimEnums import TruthStrategy
12 stratmap = {
13 TruthStrategy.MC12: MC12BarcodeSvcCfg,
14 TruthStrategy.MC12LLP: MC12LLPBarcodeSvcCfg,
15 TruthStrategy.MC12Plus: MC12PlusBarcodeSvcCfg,
16 TruthStrategy.MC15: MC15aBarcodeSvcCfg,
17 TruthStrategy.MC15a: MC15aBarcodeSvcCfg,
18 TruthStrategy.MC15aPlus: MC15aPlusBarcodeSvcCfg,
19 TruthStrategy.MC15aPlusLLP: MC15aPlusLLPBarcodeSvcCfg,
20 TruthStrategy.Validation: ValidationBarcodeSvcCfg,
21 # TruthStrategy.Cosmic: CosmicBarcodeSvcCfg,
22 }
23 MCxCfg = stratmap[flags.Sim.TruthStrategy]
24 return MCxCfg(flags, name="BarcodeSvc", **kwargs)
25
26
27def MC12BarcodeSvcCfg(flags, name="Barcode_MC12BarcodeSvc", **kwargs):
28 result = ComponentAccumulator()
29 svc = CompFactory.Barcode.LegacyBarcodeSvc(name, **kwargs)
30 result.addService(svc, primary=True)
31 return result
32
33
34def MC12LLPBarcodeSvcCfg(flags, name="Barcode_MC12LLPBarcodeSvc", **kwargs):
35 return MC12BarcodeSvcCfg(flags, name, **kwargs)
36
37
38def MC12PlusBarcodeSvcCfg(flags, name="Barcode_MC12PlusBarcodeSvc", **kwargs):
39 return MC12BarcodeSvcCfg(flags, name, **kwargs)
40
41
42def MC15aPlusBarcodeSvcCfg(flags, name="Barcode_MC15aPlusBarcodeSvc", **kwargs):
43 return MC12BarcodeSvcCfg(flags, name, **kwargs)
44
45
46def MC15aPlusLLPBarcodeSvcCfg(flags, name="Barcode_MC15aPlusLLPBarcodeSvc", **kwargs):
47 return MC12BarcodeSvcCfg(flags, name, **kwargs)
48
49
50def MC15aBarcodeSvcCfg(flags, name="Barcode_MC15aBarcodeSvc", **kwargs):
51 return MC12BarcodeSvcCfg(flags, name, **kwargs)
52
53
54def ValidationBarcodeSvcCfg(flags, name="Barcode_ValidationBarcodeSvc", **kwargs):
55 result = ComponentAccumulator()
56 svc = CompFactory.Barcode.ValidationBarcodeSvc(name, **kwargs)
57 result.addService(svc, primary=True)
58 return result
MC12BarcodeSvcCfg(flags, name="Barcode_MC12BarcodeSvc", **kwargs)
ValidationBarcodeSvcCfg(flags, name="Barcode_ValidationBarcodeSvc", **kwargs)
MC15aPlusBarcodeSvcCfg(flags, name="Barcode_MC15aPlusBarcodeSvc", **kwargs)
MC15aBarcodeSvcCfg(flags, name="Barcode_MC15aBarcodeSvc", **kwargs)
BarcodeSvcCfg(flags, **kwargs)
MC12PlusBarcodeSvcCfg(flags, name="Barcode_MC12PlusBarcodeSvc", **kwargs)
MC12LLPBarcodeSvcCfg(flags, name="Barcode_MC12LLPBarcodeSvc", **kwargs)
MC15aPlusLLPBarcodeSvcCfg(flags, name="Barcode_MC15aPlusLLPBarcodeSvc", **kwargs)