ATLAS Offline Software
Functions | Variables
python.TileSampleNoiseConfig Namespace Reference

Functions

def TileSampleNoiseCondAlgCfg (flags, **kwargs)
 
def TileCondToolNoiseSampleCfg (flags, **kwargs)
 

Variables

 flags
 
 Files
 
 isOnline
 
 acc
 
 sampleNoiseTool
 
 accOnlSampleNoise
 
 TileSampleNoise
 
 TileOnlineSampleNoise
 
 withDetails
 
 True
 
 summariseProps
 

Function Documentation

◆ TileCondToolNoiseSampleCfg()

def python.TileSampleNoiseConfig.TileCondToolNoiseSampleCfg (   flags,
**  kwargs 
)
Return component accumulator with configured private Tile sample noise tool
Arguments:
    flags  -- Athena configuration flags
Keyword arguments:
    Source -- source of Tile sample noise conditions (COOL, FILE). Defaults to COOL.
    TileSampleNoise -- name of Tile sample noise conditions object. Defaults to TileSampleNoise.
    TileOnlineSampleNoise -- name of Tile online sample noise conditions object. If it is not empty
                             online sample noise will be accessible in offline also and that allows
                             to get difference between pedestal used in online and corrected one 
                             in offline. Proposed name: TileOnlineSampleNoise. Defaults to empty.

Definition at line 69 of file TileSampleNoiseConfig.py.

69 def TileCondToolNoiseSampleCfg(flags, **kwargs):
70  """Return component accumulator with configured private Tile sample noise tool
71  Arguments:
72  flags -- Athena configuration flags
73  Keyword arguments:
74  Source -- source of Tile sample noise conditions (COOL, FILE). Defaults to COOL.
75  TileSampleNoise -- name of Tile sample noise conditions object. Defaults to TileSampleNoise.
76  TileOnlineSampleNoise -- name of Tile online sample noise conditions object. If it is not empty
77  online sample noise will be accessible in offline also and that allows
78  to get difference between pedestal used in online and corrected one
79  in offline. Proposed name: TileOnlineSampleNoise. Defaults to empty.
80  """
81 
82  from AthenaCommon.Logging import logging
83  msg = logging.getLogger('TileCondToolNoiseSample')
84 
85  acc = ComponentAccumulator()
86 
87  kwargs.setdefault('Source', 'COOL')
88  kwargs.setdefault('TileSampleNoise', 'TileSampleNoise')
89 
90  sampleNoise = kwargs['TileSampleNoise']
91  onlineSampleNoise = kwargs.pop('TileOnlineSampleNoise', '')
92 
93  name = 'TileCondToolNoiseSample'
94 
95  from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
96  acc.merge( TileEMScaleCondAlgCfg(flags, **kwargs) )
97 
98  acc.merge( TileSampleNoiseCondAlgCfg(flags, **kwargs) )
99 
100  if onlineSampleNoise:
101  if flags.Common.isOnline:
102  msg.warning('Not necessary to configure online sample noise in online especially')
103  onlineSampleNoise = sampleNoise
104  else:
105  kwargs['TileSampleNoise'] = onlineSampleNoise
106  acc.merge( TileSampleNoiseCondAlgCfg(flags, ForceOnline = True, **kwargs) )
107 
108  TileCondToolNoiseSample=CompFactory.TileCondToolNoiseSample
109  acc.setPrivateTools( TileCondToolNoiseSample(name, TileSampleNoise = sampleNoise,
110  TileOnlineSampleNoise = onlineSampleNoise) )
111 
112  return acc
113 
114 

◆ TileSampleNoiseCondAlgCfg()

def python.TileSampleNoiseConfig.TileSampleNoiseCondAlgCfg (   flags,
**  kwargs 
)
Return component accumulator with configured Tile sample noise conditions algorithm

Arguments:
    flags  -- Athena configuration flags
Keyword arguments:
    Source -- source of Tile sample noise conditions (COOL, FILE). Defaults to COOL.
    ForceOnline -- flag to use online sample noise in offline. Defaults to False.
    TileSampleNoise -- name of Tile sample noise conditions object. 
                       Defaults to TileOnlineSampleNoise if ForceOnline else TileSampleNoise.

Definition at line 8 of file TileSampleNoiseConfig.py.

8 def TileSampleNoiseCondAlgCfg(flags, **kwargs):
9  """Return component accumulator with configured Tile sample noise conditions algorithm
10 
11  Arguments:
12  flags -- Athena configuration flags
13  Keyword arguments:
14  Source -- source of Tile sample noise conditions (COOL, FILE). Defaults to COOL.
15  ForceOnline -- flag to use online sample noise in offline. Defaults to False.
16  TileSampleNoise -- name of Tile sample noise conditions object.
17  Defaults to TileOnlineSampleNoise if ForceOnline else TileSampleNoise.
18  """
19 
20  acc = ComponentAccumulator()
21 
22  source = kwargs.get('Source', 'COOL')
23  sampleNoise = kwargs.get('TileSampleNoise', 'TileSampleNoise')
24  forceOnline = kwargs.get('ForceOnline', False)
25 
26  name = sampleNoise + 'CondAlg'
27 
28  if source == 'COOL':
29  # Connect COOL Tile conditions proxies to the algorithm (default)
30 
31  from TileConditions.TileFolders import TileFolders
32  folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
33 
34  if flags.IOVDb.DatabaseInstance == 'CONDBR2':
35  onlineSampleNoiseFolder = '/TILE/ONL01/NOISE/SAMPLE'
36  else:
37  onlineSampleNoiseFolder = '/TILE/OFL01/NOISE/SAMPLE'
38 
39  if forceOnline:
40  sampleNoiseFolder = folders.add(onlineSampleNoiseFolder, 'TILE')
41  else:
42  sampleNoiseFolder = folders.addSplitOnline(onlineSampleNoiseFolder, '/TILE/OFL02/NOISE/SAMPLE')
43 
44  TileCondProxyCoolFlt=CompFactory.getComp("TileCondProxyCool<TileCalibDrawerFlt>")
45  sampleNoiseProxy = TileCondProxyCoolFlt('TileCondProxyCool_NoiseSample', Source = sampleNoiseFolder)
46 
47  from IOVDbSvc.IOVDbSvcConfig import addFolderList
48  acc.merge( addFolderList(flags, folders.get()) )
49 
50  elif source == 'FILE':
51  # Connect FILE Tile conditions proxies to the algorithm
52  TileCondProxyFileFlt=CompFactory.getComp("TileCondProxyFile<TileCalibDrawerFlt>")
53  sampleNoiseProxy = TileCondProxyFileFlt('TileCondProxyFile_NoiseSample', Source = 'TileDefault.ped')
54 
55  else:
56  raise(Exception("Invalid source: %s" % source))
57 
58  TileSampleNoiseCondAlg = CompFactory.getComp("TileCondAlg<TileSampleNoise,TileCalibDrawerFlt>")
59  sampleNoiseCondAlg = TileSampleNoiseCondAlg( name = name,
60  ConditionsProxy = sampleNoiseProxy,
61  TileCondData = sampleNoise)
62 
63  acc.addCondAlgo(sampleNoiseCondAlg)
64 
65  return acc
66 
67 
68 

Variable Documentation

◆ acc

python.TileSampleNoiseConfig.acc

Definition at line 130 of file TileSampleNoiseConfig.py.

◆ accOnlSampleNoise

python.TileSampleNoiseConfig.accOnlSampleNoise

Definition at line 135 of file TileSampleNoiseConfig.py.

◆ Files

python.TileSampleNoiseConfig.Files

Definition at line 126 of file TileSampleNoiseConfig.py.

◆ flags

python.TileSampleNoiseConfig.flags

Definition at line 125 of file TileSampleNoiseConfig.py.

◆ isOnline

python.TileSampleNoiseConfig.isOnline

Definition at line 127 of file TileSampleNoiseConfig.py.

◆ sampleNoiseTool

python.TileSampleNoiseConfig.sampleNoiseTool

Definition at line 132 of file TileSampleNoiseConfig.py.

◆ summariseProps

python.TileSampleNoiseConfig.summariseProps

Definition at line 142 of file TileSampleNoiseConfig.py.

◆ TileOnlineSampleNoise

python.TileSampleNoiseConfig.TileOnlineSampleNoise

Definition at line 137 of file TileSampleNoiseConfig.py.

◆ TileSampleNoise

python.TileSampleNoiseConfig.TileSampleNoise

Definition at line 136 of file TileSampleNoiseConfig.py.

◆ True

python.TileSampleNoiseConfig.True

Definition at line 142 of file TileSampleNoiseConfig.py.

◆ withDetails

python.TileSampleNoiseConfig.withDetails

Definition at line 142 of file TileSampleNoiseConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TileSampleNoiseConfig.TileCondToolNoiseSampleCfg
def TileCondToolNoiseSampleCfg(flags, **kwargs)
Definition: TileSampleNoiseConfig.py:69
python.IOVDbSvcConfig.addFolderList
def addFolderList(flags, listOfFolderInfoTuple, extensible=False, db=None, modifiers='')
Definition: IOVDbSvcConfig.py:90
TileCondAlg
Condition algorithm to prepare Tile conditions object and put it into conditions store.
Definition: TileCondAlg.h:21
TileCondProxyCool
The tool to get Tile conditions data from DB.
Definition: TileCondProxyCool.h:25
TileCondProxyFile
The tool to get Tile conditions data from file.
Definition: TileCondProxyFile.h:28
python.TileEMScaleConfig.TileEMScaleCondAlgCfg
def TileEMScaleCondAlgCfg(flags, **kwargs)
Definition: TileEMScaleConfig.py:10
python.TileSampleNoiseConfig.TileSampleNoiseCondAlgCfg
def TileSampleNoiseCondAlgCfg(flags, **kwargs)
Definition: TileSampleNoiseConfig.py:8
TileCondToolNoiseSample
Definition: TileCondToolNoiseSample.h:22