ATLAS Offline Software
Functions | Variables
L1CaloCondConfig Namespace Reference

Functions

def L1CaloCondAlgCfg (flags, readTest=False, Physics=True, Calib1=False, Calib2=False)
 

Variables

 flags
 Default outputlevel=1 (INFO = 1, DEBUG=2) timingRegime = "", strategy = "" are empty. More...
 
 Files
 
 AtlasVersion
 
 MaxEvents
 
 GlobalTag
 
 enableL1CaloLegacy
 
 acc
 
 Physics
 
 True
 
 Calib1
 
 False
 
 Calib2
 

Function Documentation

◆ L1CaloCondAlgCfg()

def L1CaloCondConfig.L1CaloCondAlgCfg (   flags,
  readTest = False,
  Physics = True,
  Calib1 = False,
  Calib2 = False 
)

Definition at line 6 of file L1CaloCondConfig.py.

6 def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=False, Calib2=False):
7  # The three flags: Physics, Calib1, Calib2 are the timing regimes that should or should not be supported
8  # i.e. should the required necessary folders be loaded for these regimes or not.
9  # default is only the Physics timing regime is loaded. If Calib1 or Calib2 are found in the DerivedRunPars
10  # then this will lead to error unless Calib1 and/or Calib2 is True.
11 
12  L1CaloFolders = {} # will use this dict to populate condalg properties below
13 
14  # both data and mc have this folder
15  L1CaloFolders['PhysicsKeys'] = ['/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib']
16 
17  if not flags.Input.isMC:
18  # folders only existing or used if running on data
19  if Physics:
20  L1CaloFolders['PhysicsKeys'] += ['/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCommon',
21  '/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanHighMu',
22  '/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanLowMu']
23  if Calib1:
24  L1CaloFolders['Calib1Keys'] = ['/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanCalib',
25  '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanCommon',
26  '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanHighMu',
27  '/TRIGGER/L1Calo/V2/Calibration/Calib1/PprChanLowMu']
28  if Calib2:
29  L1CaloFolders['Calib2Keys'] = ['/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanCalib',
30  '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanCommon',
31  '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanHighMu',
32  '/TRIGGER/L1Calo/V2/Calibration/Calib2/PprChanLowMu']
33 
34  L1CaloFolders['ReadoutConfig'] = "/TRIGGER/L1Calo/V2/Configuration/ReadoutConfig"
35  L1CaloFolders['ReadoutConfigJSON'] = "/TRIGGER/L1Calo/V2/Configuration/ReadoutConfigJSON"
36  L1CaloFolders['PprChanStrategy'] = "/TRIGGER/L1Calo/V2/Configuration/PprChanStrategy"
37  L1CaloFolders['PpmFineTimeRefs'] = "/TRIGGER/L1Calo/V1/References/FineTimeReferences"
38  L1CaloFolders['RunParameters'] = "/TRIGGER/L1Calo/V1/Conditions/RunParameters"
39  L1CaloFolders['PprChanStrategy'] = '/TRIGGER/Receivers/Conditions/Strategy'
40  L1CaloFolders['DerivedRunPars'] = '/TRIGGER/L1Calo/V1/Conditions/DerivedRunPars'
41 
42 
43  L1CaloFolders['PprChanDefaults'] = '/TRIGGER/L1Calo/V2/Configuration/PprChanDefaults'
44  # Different folders for data and MC
45  ver = 'V2' if flags.Input.isMC else 'V1'
46  L1CaloFolders['DisabledTowers'] = f'/TRIGGER/L1Calo/{ver}/Conditions/DisabledTowers'
47  L1CaloFolders['PpmDeadChannels'] = f'/TRIGGER/L1Calo/{ver}/Calibration/PpmDeadChannels'
48 
49 
50  from IOVDbSvc.IOVDbSvcConfig import addFolders
51  db = 'TRIGGER_ONL' if not flags.Input.isMC else 'TRIGGER_OFL'
52  result = addFolders(flags,[xx for x in L1CaloFolders.values() if isinstance(x,list) for xx in x if xx!=""] +
53  [x for x in L1CaloFolders.values() if not isinstance(x,list)], db, className='CondAttrListCollection')
54 
55  from AthenaConfiguration.ComponentFactory import CompFactory
56 
57  alg = CompFactory.L1CaloCondAlg(UsePhysicsRegime = Physics,
58  UseCalib1Regime = Calib1,
59  UseCalib2Regime = Calib2)
60  for k,v in L1CaloFolders.items(): setattr(alg,k,v)
61 
62  if flags.Input.isMC:
63  # some conditions containers are not created for MC
64  alg.OutputKeyDerRunsPars = ""
65  alg.OutputKeyTimeRefs = ""
66  alg.OutputKeyRunParameters = ""
67  alg.OutputKeyPprChanStrategy = ""
68  alg.OutputKeyPprConditionsRun2 = ""
69  alg.OutputKeyReadoutConfig = ""
70  alg.OutputKeyReadoutConfigJSON = ""
71 
72  result.addCondAlgo(alg)
73 
74  if readTest:
75  # Set True for test L1CaloCondAlg and print condition container parameters
76  L1CaloCondReader = CompFactory.L1CaloCondAlgReader()
77  result.addEventAlgo(L1CaloCondReader, 'AthAlgSeq')
78 
79 
80  return result
81 
82 

Variable Documentation

◆ acc

L1CaloCondConfig.acc

Definition at line 103 of file L1CaloCondConfig.py.

◆ AtlasVersion

L1CaloCondConfig.AtlasVersion

Definition at line 90 of file L1CaloCondConfig.py.

◆ Calib1

L1CaloCondConfig.Calib1

Definition at line 113 of file L1CaloCondConfig.py.

◆ Calib2

L1CaloCondConfig.Calib2

Definition at line 113 of file L1CaloCondConfig.py.

◆ enableL1CaloLegacy

L1CaloCondConfig.enableL1CaloLegacy

Definition at line 93 of file L1CaloCondConfig.py.

◆ False

L1CaloCondConfig.False

Definition at line 113 of file L1CaloCondConfig.py.

◆ Files

L1CaloCondConfig.Files

Definition at line 89 of file L1CaloCondConfig.py.

◆ flags

L1CaloCondConfig.flags

Default outputlevel=1 (INFO = 1, DEBUG=2) timingRegime = "", strategy = "" are empty.

Read it from DB directly readTest False, True execute L1CaloCondAlgReader

Definition at line 88 of file L1CaloCondConfig.py.

◆ GlobalTag

L1CaloCondConfig.GlobalTag

Definition at line 92 of file L1CaloCondConfig.py.

◆ MaxEvents

L1CaloCondConfig.MaxEvents

Definition at line 91 of file L1CaloCondConfig.py.

◆ Physics

L1CaloCondConfig.Physics

Definition at line 113 of file L1CaloCondConfig.py.

◆ True

L1CaloCondConfig.True

Definition at line 113 of file L1CaloCondConfig.py.

python.IOVDbSvcConfig.addFolders
def addFolders(flags, folderStrings, detDb=None, className=None, extensible=False, tag=None, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:72
L1CaloCondConfig.L1CaloCondAlgCfg
def L1CaloCondAlgCfg(flags, readTest=False, Physics=True, Calib1=False, Calib2=False)
Definition: L1CaloCondConfig.py:6