ATLAS Offline Software
TowerD3PDObject.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from D3PDMakerCoreComps.D3PDObject import D3PDObject
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 D3PD = CompFactory.D3PD
7 
8 def makeTowerD3PDObject (name, prefix, object_name='TowerD3PDObject', getter = None,
9  sgkey = None,
10  label = None):
11  if sgkey is None: sgkey = 'CombinedTower'
12  if label is None: label = prefix
13 
14  ContainerType='CaloTowerContainer'
15 
16  if sgkey== 'TopoTower': ContainerType='CaloTopoTowerContainer'
17 
18  print(" makeTowerD3PDObject: name = ", name)
19  print(" makeTowerD3PDObject: prefix = ", prefix)
20  print(" makeTowerD3PDObject: object_name = ", object_name)
21  print(" makeTowerD3PDObject: sgkey = ", sgkey)
22 
23  if not getter:
25  (name + '_Getter',
26  TypeName = ContainerType,
27  SGKey = sgkey,
28  Label = label)
29 
30  # create the selected cells
31  from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
32  return D3PD.VectorFillerTool (name,
33  Prefix = prefix,
34  Getter = getter,
35  ObjectName = object_name,
36  SaveMetadata = \
37  D3PDMakerFlags.SaveObjectMetadata)
38 
39 
40 
41 
42 def getTowerD3PDObject (maker, prefix,object_name) :
43 
44  towerD3PDObject = D3PDObject (maker, prefix, object_name)
45 
46  towerD3PDObject.defineBlock (0, 'Detail0',
48  SaveNCellConstituents=False
49  )
50 
51  towerD3PDObject.defineBlock (1, 'Detail1',
53  SaveNCellConstituents=True
54  )
55  return towerD3PDObject
56 
57 
58 
59 # All Tower cells
60 TowerD3PDObject = getTowerD3PDObject(makeTowerD3PDObject,'tower_','TowerD3PDObject')
61 
62 
python.TowerD3PDObject.getTowerD3PDObject
def getTowerD3PDObject(maker, prefix, object_name)
Definition: TowerD3PDObject.py:42
python.TowerD3PDObject.makeTowerD3PDObject
def makeTowerD3PDObject(name, prefix, object_name='TowerD3PDObject', getter=None, sgkey=None, label=None)
Definition: TowerD3PDObject.py:8
D3PD::TowerFillerTool
Definition: TowerFillerTool.h:23
D3PD::SGDataVectorGetterTool
Getter tool to retrieve DataVector/List collections from StoreGate.
Definition: SGDataVectorGetterTool.h:55
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
D3PD::VectorFillerTool
Object filler tool for a collection of objects, saved as vectors.
Definition: VectorFillerTool.h:70