ATLAS Offline Software
Functions | Variables
python.TileCablingSvcConfig Namespace Reference

Functions

def TileCablingSvcCfg (flags)
 

Variables

 flags
 
 Files
 
 acc
 
 withDetails
 
 True
 
 summariseProps
 

Function Documentation

◆ TileCablingSvcCfg()

def python.TileCablingSvcConfig.TileCablingSvcCfg (   flags)
Return component accumulator with configured Tile cabling service

Arguments:
    flags  -- Athena configuration flags

Definition at line 11 of file TileCablingSvcConfig.py.

11 def TileCablingSvcCfg(flags):
12  """Return component accumulator with configured Tile cabling service
13 
14  Arguments:
15  flags -- Athena configuration flags
16  """
17 
18  from AthenaCommon.Logging import logging
19  msg = logging.getLogger('TileCablingSvc')
20 
21  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
22  acc = ComponentAccumulator()
23 
24  from TileGeoModel.TileGMConfig import TileGMCfg
25  acc.merge( TileGMCfg(flags) )
26 
27  tileCablingSvc = CompFactory.TileCablingSvc()
28 
29  geometry = flags.GeoModel.AtlasVersion
30 
31  if not flags.Common.isOnline:
32  runNumber = flags.Input.RunNumbers[0]
33  if flags.Input.OverrideRunNumber > 0:
34  from AthenaKernel.EventIdOverrideConfig import getMinMaxRunNumbers
35  runNumber = getMinMaxRunNumbers(flags)[0]
36  if flags.GeoModel.Run is LHCPeriod.Run1:
37  if runNumber > 219651:
38  # Choose RUN2 cabling for old geometry tags starting from 26-MAR-2013
39  tileCablingSvc.CablingType = 4
40  msg.warning("Forcing RUN2 cabling for run %s with geometry %s", runNumber, geometry)
41 
42  elif flags.GeoModel.Run is LHCPeriod.Run2:
43  if (flags.Input.isMC and runNumber >= 310000) or runNumber >= 343000 or runNumber < 1:
44  # Choose RUN2a cabling for R2 geometry tags starting from 31-Jan-2018
45  tileCablingSvc.CablingType = 5
46  msg.info("Forcing RUN2a (2018) cabling for run %s with geometry %s", runNumber, geometry)
47 
48  else:
49  tileCablingSvc.CablingType = 4
50  msg.info("Forcing RUN2 (2014-2017) cabling for run %s with geometry %s", runNumber, geometry)
51  elif flags.GeoModel.Run is LHCPeriod.Run3:
52  tileCablingSvc.CablingType = 6
53  msg.info("Forcing RUN3 cabling for run %s with geometry %s", flags.GeoModel.Run.value, geometry)
54  else: #Running online or simulating running online: either way, do not access run number
55  if flags.GeoModel.Run is LHCPeriod.Run1:
56  tileCablingSvc.CablingType = 4
57  msg.warning("Forcing RUN2 (2014-2017) cabling for unknown run number and geometry %s", geometry)
58  if flags.GeoModel.Run is LHCPeriod.Run2:
59  tileCablingSvc.CablingType = 5
60  msg.info("Forcing RUN2a (2018) cabling for online run with geometry %s", geometry)
61  elif flags.GeoModel.Run is LHCPeriod.Run3:
62  tileCablingSvc.CablingType = 6
63  msg.info("Forcing RUN3 cabling for online run with geometry %s", geometry)
64  elif flags.GeoModel.Run is LHCPeriod.Run4:
65  tileCablingSvc.CablingType = 6
66  msg.warning("Forcing RUN3 cabling beyond Run3 for online run with geometry %s", geometry)
67  else:
68  msg.error("Tile Cabling version not set for %s", geometry)
69 
70  acc.addService(tileCablingSvc, primary = True)
71 
72  return acc
73 
74 

Variable Documentation

◆ acc

python.TileCablingSvcConfig.acc

Definition at line 90 of file TileCablingSvcConfig.py.

◆ Files

python.TileCablingSvcConfig.Files

Definition at line 87 of file TileCablingSvcConfig.py.

◆ flags

python.TileCablingSvcConfig.flags

Definition at line 86 of file TileCablingSvcConfig.py.

◆ summariseProps

python.TileCablingSvcConfig.summariseProps

Definition at line 93 of file TileCablingSvcConfig.py.

◆ True

python.TileCablingSvcConfig.True

Definition at line 93 of file TileCablingSvcConfig.py.

◆ withDetails

python.TileCablingSvcConfig.withDetails

Definition at line 93 of file TileCablingSvcConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.EventIdOverrideConfig.getMinMaxRunNumbers
def getMinMaxRunNumbers(flags)
Definition: EventIdOverrideConfig.py:101
python.TileCablingSvcConfig.TileCablingSvcCfg
def TileCablingSvcCfg(flags)
Definition: TileCablingSvcConfig.py:11
TileGMConfig.TileGMCfg
def TileGMCfg(flags)
Definition: TileGMConfig.py:7