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.MSLLPValidation: MSLLPValidationBarcodeSvcCfg,
22 # TruthStrategy.Cosmic: CosmicBarcodeSvcCfg,
23 }
24 MCxCfg = stratmap[flags.Sim.TruthStrategy]
25 return MCxCfg(flags, name="BarcodeSvc", **kwargs)
26
27
28def MC12BarcodeSvcCfg(flags, name="Barcode_MC12BarcodeSvc", **kwargs):
29 result = ComponentAccumulator()
30 svc = CompFactory.Barcode.LegacyBarcodeSvc(name, **kwargs)
31 result.addService(svc, primary=True)
32 return result
33
34
35def MC12LLPBarcodeSvcCfg(flags, name="Barcode_MC12LLPBarcodeSvc", **kwargs):
36 return MC12BarcodeSvcCfg(flags, name, **kwargs)
37
38
39def MC12PlusBarcodeSvcCfg(flags, name="Barcode_MC12PlusBarcodeSvc", **kwargs):
40 return MC12BarcodeSvcCfg(flags, name, **kwargs)
41
42
43def MC15aPlusBarcodeSvcCfg(flags, name="Barcode_MC15aPlusBarcodeSvc", **kwargs):
44 return MC12BarcodeSvcCfg(flags, name, **kwargs)
45
46
47def MC15aPlusLLPBarcodeSvcCfg(flags, name="Barcode_MC15aPlusLLPBarcodeSvc", **kwargs):
48 return MC12BarcodeSvcCfg(flags, name, **kwargs)
49
50
51def MC15aBarcodeSvcCfg(flags, name="Barcode_MC15aBarcodeSvc", **kwargs):
52 return MC12BarcodeSvcCfg(flags, name, **kwargs)
53
54
55def MSLLPValidationBarcodeSvcCfg(flags, name="Barcode_MSLLPValidationBarcodeSvc", **kwargs):
56 return MC12BarcodeSvcCfg(flags, name, **kwargs)
57
58
59def ValidationBarcodeSvcCfg(flags, name="Barcode_ValidationBarcodeSvc", **kwargs):
60 result = ComponentAccumulator()
61 svc = CompFactory.Barcode.ValidationBarcodeSvc(name, **kwargs)
62 result.addService(svc, primary=True)
63 return result
MC12BarcodeSvcCfg(flags, name="Barcode_MC12BarcodeSvc", **kwargs)
ValidationBarcodeSvcCfg(flags, name="Barcode_ValidationBarcodeSvc", **kwargs)
MSLLPValidationBarcodeSvcCfg(flags, name="Barcode_MSLLPValidationBarcodeSvc", **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)