ATLAS Offline Software
BarcodeServicesConfig.py
Go to the documentation of this file.
1 """ComponentAccumulator BarcodeServices configurations
2 
3 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 """
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 
8 
9 def 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 
27 def 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 
34 def MC12LLPBarcodeSvcCfg(flags, name="Barcode_MC12LLPBarcodeSvc", **kwargs):
35  return MC12BarcodeSvcCfg(flags, name, **kwargs)
36 
37 
38 def MC12PlusBarcodeSvcCfg(flags, name="Barcode_MC12PlusBarcodeSvc", **kwargs):
39  return MC12BarcodeSvcCfg(flags, name, **kwargs)
40 
41 
42 def MC15aPlusBarcodeSvcCfg(flags, name="Barcode_MC15aPlusBarcodeSvc", **kwargs):
43  return MC12BarcodeSvcCfg(flags, name, **kwargs)
44 
45 
46 def MC15aPlusLLPBarcodeSvcCfg(flags, name="Barcode_MC15aPlusLLPBarcodeSvc", **kwargs):
47  return MC12BarcodeSvcCfg(flags, name, **kwargs)
48 
49 
50 def MC15aBarcodeSvcCfg(flags, name="Barcode_MC15aBarcodeSvc", **kwargs):
51  return MC12BarcodeSvcCfg(flags, name, **kwargs)
52 
53 
54 def 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
BarcodeServicesConfig.MC15aBarcodeSvcCfg
def MC15aBarcodeSvcCfg(flags, name="Barcode_MC15aBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:50
BarcodeServicesConfig.ValidationBarcodeSvcCfg
def ValidationBarcodeSvcCfg(flags, name="Barcode_ValidationBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:54
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
BarcodeServicesConfig.BarcodeSvcCfg
def BarcodeSvcCfg(flags, **kwargs)
Definition: BarcodeServicesConfig.py:9
BarcodeServicesConfig.MC12LLPBarcodeSvcCfg
def MC12LLPBarcodeSvcCfg(flags, name="Barcode_MC12LLPBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:34
BarcodeServicesConfig.MC12PlusBarcodeSvcCfg
def MC12PlusBarcodeSvcCfg(flags, name="Barcode_MC12PlusBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:38
BarcodeServicesConfig.MC15aPlusBarcodeSvcCfg
def MC15aPlusBarcodeSvcCfg(flags, name="Barcode_MC15aPlusBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:42
BarcodeServicesConfig.MC12BarcodeSvcCfg
def MC12BarcodeSvcCfg(flags, name="Barcode_MC12BarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:27
BarcodeServicesConfig.MC15aPlusLLPBarcodeSvcCfg
def MC15aPlusLLPBarcodeSvcCfg(flags, name="Barcode_MC15aPlusLLPBarcodeSvc", **kwargs)
Definition: BarcodeServicesConfig.py:46