ATLAS Offline Software
Loading...
Searching...
No Matches
D3PD::CaloCalibHitFillerTool Class Reference

Block filler tool for EM samplings from a CaloCluster. More...

#include <CaloCalibHitFillerTool.h>

Inheritance diagram for D3PD::CaloCalibHitFillerTool:

Public Member Functions

 CaloCalibHitFillerTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Gaudi tool constructor.
virtual StatusCode initialize () override
 Standard Gaudi initialize method.
virtual StatusCode book () override
 Book variables for this block.
virtual StatusCode fill (const CaloCalibrationHit &p) override
 Fill one block — type-safe version.
 BlockFillerToolImpl (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Gaudi tool constructor.
virtual StatusCode configureD3PD (IAddVariable *tree, const std::type_info &ti)
 Configure during initialization: type-check.
StatusCode configureD3PD (IAddVariable *tree)
 Configure the parent tree.
virtual StatusCode fillUntyped (const void *p, bool again=false)
 Fill one block.
virtual StatusCode fillAgain (const CaloCalibrationHit &p)
 Fill one block, after AGAIN has been returned (type-safe).
virtual StatusCode addVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
 Add a variable to the tuple.
StatusCode addVariable (const std::string &name, CaloCalibrationHit *&ptr, const std::string &docstring="")
 Make the template implementation from IAddVariable visible.
StatusCode addVariable (const std::string &name, CaloCalibrationHit *&ptr, const std::string &docstring, const U &defval)
 Make the template implementation from IAddVariable visible.
virtual StatusCode addDimensionedVariable (const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
 Add a variable to the tuple.
StatusCode addDimensionedVariable (const std::string &name, CaloCalibrationHit *&ptr, const std::string &dim, const std::string &docstring="")
 Add a variable to the tuple.
StatusCode addDimensionedVariable (const std::string &name, CaloCalibrationHit *&ptr, const std::string &dim, const std::string &docstring, const U &defval)
 Add a variable to the tuple.

Protected Member Functions

StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::type_info &fill_ti)
 Configure during initialization: type-check.
StatusCode configureImpl (IAddVariable *tree, const std::type_info &ti, const std::vector< const std::type_info * > &tis, size_t &which)
 Configure during initialization: type-check.
StatusCode convert (void const *&p) const
 Do type conversion.

Protected Attributes

ObjectMetadata m_metadata
 Metadata about the variables created by this object.

Private Member Functions

unsigned int CaloHit_GetDetectorInfo (Identifier &HitID)

Private Attributes

float * m_eta
 Variable: time, quality and id.
float * m_phi
float * m_etot
float * m_evis
float * m_e_em
float * m_e_nonem
float * m_e_inv
float * m_e_esc
unsigned int * m_particleID
unsigned int * m_id
unsigned int * m_det
unsigned int * m_sam
unsigned int * m_side
unsigned int * m_reg
unsigned int * m_etatow
unsigned int * m_phimod
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
const CaloDmDescrManagerm_dm_ddm
const LArEM_IDm_emid
const LArFCAL_IDm_fcalid
const LArHEC_IDm_hecid
const TileIDm_tileid
const LArOnlineIDm_onlineid
const CaloCell_IDm_cellid
const CaloDM_IDm_dmid
bool m_isDM
bool m_isbasic
bool m_savepartID
bool m_savefullID
bool m_savetoten
bool m_savevisen
bool m_saveallen
std::string m_prefix
 Property: the variable prefix for this block.
std::string m_suffix
 Property: the variable prefix for this block.
std::string m_blockName
 Property: the name of this block.
TypeConverter m_converter
 Helper to do type conversions.
IAddVariablem_tree
 Reference to the block name.

Static Private Attributes

static const std::string s_emptyString
 Used to provide a default value for blockName.

Detailed Description

Block filler tool for EM samplings from a CaloCluster.

Definition at line 48 of file CaloCalibHitFillerTool.h.

Constructor & Destructor Documentation

◆ CaloCalibHitFillerTool()

D3PD::CaloCalibHitFillerTool::CaloCalibHitFillerTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Standard Gaudi tool constructor.

Parameters
typeThe name of the tool type.
nameThe tool name.
parentThe tool's Gaudi parent.

Definition at line 33 of file CaloCalibHitFillerTool.cxx.

37 : BlockFillerTool<CaloCalibrationHit> (type, name, parent),
38 m_dm_ddm(0),
39 m_emid(0),
40 m_fcalid(0),
41 m_hecid(0),
42 m_tileid(0),
43 m_onlineid(0),
44 m_cellid(0),
45 m_dmid(0),
46 m_isDM(false),
47 m_isbasic(true),
48 m_savepartID(false), m_savefullID(false),
49 m_savetoten(true), m_savevisen(true),m_saveallen(false)
50{
51 declareProperty("isDeadMaterial",m_isDM);
52 declareProperty("isBasic",m_isbasic);
53 declareProperty("SaveParticleID",m_savepartID);
54 declareProperty("SaveFullCellID",m_savefullID);
55 declareProperty("SaveTotalEnergy",m_savetoten);
56 declareProperty("SaveVisibleEnergy",m_savevisen);
57 declareProperty("SaveAllEnergies",m_saveallen);
59}
const CaloDmDescrManager * m_dm_ddm
virtual StatusCode book() override
Book variables for this block.

Member Function Documentation

◆ addDimensionedVariable() [1/3]

StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
CaloCalibrationHit *& ptr,
const std::string & dim,
const std::string & docstring,
const U & defval )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [2/3]

StatusCode D3PD::IAddVariable::addDimensionedVariable ( const std::string & name,
CaloCalibrationHit *& ptr,
const std::string & dim,
const std::string & docstring = "" )
inherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.

If called from the constructor, the only effect is to clear ptr.

◆ addDimensionedVariable() [3/3]

StatusCode D3PD::AddVariable::addDimensionedVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & dim,
const std::string & docstring = "",
const void * defval = 0 )
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
dimDimension for the variable. (Presently unimplemented!)
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Definition at line 119 of file AddVariable.cxx.

129{
130 if (!m_tree) {
131 // Called from constructor --- just initialize pointer.
132 ptr = 0;
133 return StatusCode::SUCCESS;
134 }
135
137 ti, ptr, dim,
138 docstring, defval ) );
140 ti, ptr, dim,
142}
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addDimensionedVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &dim, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Type-safe wrapper for block filler tools.

◆ addVariable() [1/3]

StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
CaloCalibrationHit *& ptr,
const std::string & docstring,
const U & defval )
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [2/3]

StatusCode D3PD::IAddVariable::addVariable ( const std::string & name,
CaloCalibrationHit *& ptr,
const std::string & docstring = "" )
inherited

Make the template implementation from IAddVariable visible.

◆ addVariable() [3/3]

StatusCode D3PD::AddVariable::addVariable ( const std::string & name,
const std::type_info & ti,
void *& ptr,
const std::string & docstring = "",
const void * defval = 0 )
virtualinherited

Add a variable to the tuple.

Parameters
nameThe name of the variable.
typeThe type of the variable.
ptrPointer to the type of the variable. The pointer need not be initialized; the D3PD software will set the pointer prior to calling fill().
docstringDocumentation string for this variable.
defvalPointer to the default value to use for this variable. Null for no default (generally means to fill with zeros). Of the type given by ti. Only works for basic types.

If called from the constructor, the only effect is to clear ptr.

Definition at line 93 of file AddVariable.cxx.

90{
91 if (!m_tree) {
92 // Called from constructor --- just initialize pointer.
93 ptr = 0;
95 }
96
98 ti, ptr, docstring, defval ) );
101}
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.

◆ BlockFillerToolImpl()

( const std::string & type,
const std::string & name,
const IInterface * parent )
inherited

Standard Gaudi tool constructor.

Parameters
typeThe name of the tool type.
nameThe tool name.
parentThe tool's Gaudi parent.

◆ book()

StatusCode D3PD::CaloCalibHitFillerTool::book ( )
overridevirtual

Book variables for this block.

Implements D3PD::BlockFillerTool< CaloCalibrationHit >.

Definition at line 93 of file CaloCalibHitFillerTool.cxx.

94{
95
96
97 if(m_isbasic) {
98 CHECK( addVariable ("eta", m_eta) );
99 CHECK( addVariable ("phi", m_phi) );
100 }
101 if(m_savepartID) {
102 CHECK( addVariable ("particleID", m_particleID) );
103 }
104 if(m_savefullID){
105 if(m_isDM) {
106 CHECK( addVariable ("detzside", m_det) );
107 CHECK( addVariable ("type", m_side) );
108 CHECK( addVariable ("sampling", m_sam) );
109 CHECK( addVariable ("region", m_reg) );
110 CHECK( addVariable ("ieta", m_etatow) );
111 CHECK( addVariable ("iphi", m_phimod) );
112 } else {
113 CHECK( addVariable ("detector", m_det) );
114 CHECK( addVariable ("sample", m_sam) );
115 CHECK( addVariable ("side", m_side) );
116 CHECK( addVariable ("reg_sec", m_reg) );
117 CHECK( addVariable ("eta_tower", m_etatow) );
118 CHECK( addVariable ("phi_module", m_phimod) );
119 }
120 }
121 if(m_isbasic){
122 CHECK( addVariable ("ID", m_id) );
123 }
124 if(m_savetoten && m_isbasic) {
125 CHECK( addVariable ("EnergyTot", m_etot) );
126 }
127 if(m_savevisen && m_isbasic) {
128 CHECK( addVariable ("EnergyVis", m_evis) );
129 }
130 if(m_saveallen) {
131 CHECK( addVariable ("EnergyEm", m_e_em) );
132 CHECK( addVariable ("EnergyNonEm",m_e_nonem) );
133 CHECK( addVariable ("EnergyInv", m_e_inv) );
134 CHECK( addVariable ("EnergyEsc", m_e_esc) );
135
136 }
137 return StatusCode::SUCCESS;
138}
float * m_eta
Variable: time, quality and id.
StatusCode addVariable(const std::string &name, T *&ptr, const std::string &docstring="")
Add a variable to the tuple.

◆ CaloHit_GetDetectorInfo()

unsigned int D3PD::CaloCalibHitFillerTool::CaloHit_GetDetectorInfo ( Identifier & HitID)
private

Definition at line 221 of file CaloCalibHitFillerTool.cxx.

222{
223 if(!m_isDM) {
224 // AtlasID bit (4)
225 // 1 : lar_em
226 // 2 : lar_hec
227 // 3 : lar_fcal
228 // 4 : tile
229 unsigned ATbit1 = m_emid->is_lar_em(cellID) ? (1<<0) : 0;
230 unsigned ATbit2 = m_hecid->is_lar_hec(cellID) ? (1<<1) : 0;
231 unsigned ATbit3 = m_fcalid->is_lar_fcal(cellID) ? (1<<2) : 0;
232 unsigned ATbit4 = m_tileid->is_tile(cellID) ? (1<<3) : 0;
233 unsigned ATbit = (ATbit1 | ATbit2 | ATbit3 | ATbit4);
234
235 //std::cout << "ATLAS Calo(EM,HEC,FCal,Tile) : " << ATbit1 << " " << ATbit2 << " " << ATbit3 << " " << ATbit4 << std::endl;
236
237 // EM bit (5)
238 // 1-2 : sampling
239 // 0,1,2,3
240 // 0 presampler
241 // 1,2,3 each layer
242 // 3 : barrel
243 // 4 : endcap_inner
244 // 5 : endcap_outer
245 unsigned EMbit1 = 0;
246 unsigned EMbit3 = 0;
247 unsigned EMbit4 = 0;
248 unsigned EMbit5 = 0;
249 if (ATbit1) {
250 EMbit1 = unsigned(m_emid->sampling(cellID));
251 EMbit3 = m_emid->is_em_barrel(cellID) ? (1<<2) : 0;
252 EMbit4 = m_emid->is_em_endcap_inner(cellID) ? (1<<3) : 0;
253 EMbit5 = m_emid->is_em_endcap_outer(cellID) ? (1<<4) : 0;
254 }
255 unsigned EMbit = (EMbit1 | EMbit3 | EMbit4 | EMbit5);
256
257 //std::cout << "EM : " << EMbit1 << " " << EMbit3 << " " << EMbit4 << " " << EMbit5 << std::endl;
258
259 // HEC (2)
260 // 1-2: sampling
261 // 0,1 = first wheel
262 // 2,3 = second wheel
263 unsigned HCbit1 = 0;
264 if (ATbit2) {
265 HCbit1 = unsigned(m_hecid->sampling(cellID));
266 }
267 unsigned HCbit = HCbit1;
268
269 //std::cout << "HEC : " << HCbit1 << std::endl;
270
271 // FCal (2)
272 // 1-2 : module
273 // 1,2,3
274 // 1 EM
275 // 2,3 Hadronic
276 //
277 unsigned FCbit1 = 0;
278 if (ATbit3) {
279 FCbit1 = unsigned(m_fcalid->module(cellID));
280 }
281 unsigned FCbit = FCbit1;
282
283 //std::cout << "FCal : " << FCbit1 << std::endl;
284
285 // Tile bit (8)
286 // 1-3 : sample
287 // 0 = SAMP_A
288 // 1 = SAMP_B, SAMP_BC, SAMP_C
289 // 2 = SAMP_D
290 // 3 = SAMP_E
291 // 4 = SAMP_X
292 // 4 : barrel
293 // 5 : extbarrel
294 // 6 : gap
295 // 7 : gapscin
296 unsigned TLbit1 = 0;
297 unsigned TLbit4 = 0;
298 unsigned TLbit5 = 0;
299 unsigned TLbit6 = 0;
300 unsigned TLbit7 = 0;
301 if (ATbit4) {
302 TLbit1 = unsigned(m_tileid->sample(cellID));
303 TLbit4 = m_tileid->is_tile_barrel(cellID) ? (1<<3) : 0;
304 TLbit5 = m_tileid->is_tile_extbarrel(cellID) ? (1<<4) : 0;
305 TLbit6 = m_tileid->is_tile_gap(cellID) ? (1<<5) : 0;
306 TLbit7 = m_tileid->is_tile_gapscin(cellID) ? (1<<6) : 0;
307 }
308 unsigned TLbit = (TLbit1 | TLbit4 | TLbit5 | TLbit6 | TLbit7);
309
310 //std::cout << "Tile : " << TLbit1 << " " << TLbit4 << " " << TLbit5 << " " << TLbit6 << " " << TLbit7 << std::endl;
311
312 unsigned int CombBit = (ATbit | (EMbit<<4) | (HCbit<<9) |
313 (FCbit<<11) | (TLbit<<13));
314
315 return CombBit;
316 } else { // How to code the DM identifier ?
317 unsigned int SideBit = 0; // bit 0
318 if(m_dmid->pos_neg_z(cellID) < 0) SideBit = 1;
319 unsigned int DetBit = 0; // bit 1
320 if(m_dmid->is_tile(cellID)) DetBit = (1<<1);
321 unsigned int TypeBit = m_dmid->dmat(cellID)<<2; // bit 2-3
322 unsigned int SamplBit = m_dmid->sampling(cellID)<<4; // bit 4-5
323 unsigned int RegionBit = m_dmid->region(cellID)<<6; // bit 6-8
324 unsigned int EtaBit = m_dmid->eta(cellID)<<9; // bit 9-14
325 unsigned int PhiBit = m_dmid->phi(cellID)<<15; // bit 15-21
326 unsigned int CombBit = (SideBit | DetBit | TypeBit | SamplBit | RegionBit | EtaBit | PhiBit);
327 return CombBit;
328 }
329}

◆ configureD3PD() [1/2]

StatusCode D3PD::AddVariable::configureD3PD ( IAddVariable * tree)
inherited

Configure the parent tree.

Parameters
treeThe parent IAddVariable instance.

Definition at line 69 of file AddVariable.cxx.

62{
63 m_tree = tree;
64 m_metadata.clear();
66}

◆ configureD3PD() [2/2]

virtual StatusCode D3PD::BlockFillerTool< CaloCalibrationHit >::configureD3PD ( IAddVariable * tree,
const std::type_info & ti )
virtualinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.

configureD3PD should check that the type of the object coming as input is compatible with what it expects, and raise an error otherwise.

◆ configureImpl() [1/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable * tree,
const std::type_info & ti,
const std::type_info & fill_ti )
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
fill_tiis the type of object that the user code will expect.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

Definition at line 70 of file BlockFillerToolImpl.cxx.

58{
60 CHECK( m_converter.init (ti, fill_ti) );
61
63}

◆ configureImpl() [2/2]

StatusCode D3PD::BlockFillerToolImpl::configureImpl ( IAddVariable * tree,
const std::type_info & ti,
const std::vector< const std::type_info * > & tis,
size_t & which )
protectedinherited

Configure during initialization: type-check.

Parameters
treeOur parent for tuple making.
tiGives the type of the object being passed to fillUntyped.
tisList of possible input types that we can accept.
[out]whichIndex of the accepted type.

This is the common implementation for the configureD3PD method of IBlockFillerTool. It checks that the type of the object coming as input is compatible with what the user code is expecting, and raises an error otherwise.

This version allows for one of a set of types to match. If successful, WHICH is set to the index (0-based) of the matching type.

Definition at line 91 of file BlockFillerToolImpl.cxx.

87{
89 CHECK( m_converter.init (ti, tis, which) );
91}

◆ convert()

StatusCode D3PD::BlockFillerToolImpl::convert ( void const *& p) const
protectedinherited

Do type conversion.

Parameters
p[in,out]Pointer to convert.

On entry, p is a pointer to an object of the type that was passed into configureImpl as ti. Convert the pointer to point to an object of the type that was given as fill_ti. If the conversion fails, the pointer is set to 0 (and FAILURE is returned).

Definition at line 107 of file BlockFillerToolImpl.cxx.

106{
107 p = m_converter.convertUntyped (p);
108 if (!p) {
110 << "Pointer conversion from " << m_converter.srcName() << " to "
111 << m_converter.dstName() << "failed.";
112 return StatusCode::FAILURE;
113 }
114 return StatusCode::SUCCESS;
115}
#define REPORT_MESSAGE(LVL)
Report a message.

◆ fill()

StatusCode D3PD::CaloCalibHitFillerTool::fill ( const CaloCalibrationHit & p)
overridevirtual

Fill one block — type-safe version.

Parameters
pThe input object.

This is called once per object. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

Implements D3PD::BlockFillerTool< CaloCalibrationHit >.

Definition at line 149 of file CaloCalibHitFillerTool.cxx.

150{
151 MsgStream log(msgSvc(), name());
152
153 Identifier id = p.cellID();
154
155 // Check if we have good ID
156 if(m_isDM && (! (m_dmid->is_lar(id) || m_dmid->is_tile(id)))) {
157 ATH_MSG_ERROR( "Should be DM calibration hit, but do not have DM identifier: "<<id.getString() );
158 return StatusCode::FAILURE;
159 }
160 //bool fcal = m_tileid->is_lar_fcal(id);
161
162 if(m_saveallen) {
163 *m_e_em = p.energyEM();
164 *m_e_nonem = p.energyNonEM();
165 *m_e_inv = p.energyInvisible();
166 *m_e_esc = p.energyEscaped();
167 }
168 if(m_savetoten && m_isbasic) *m_etot=p.energyTotal();
169 if(m_savevisen && m_isbasic) *m_evis=p.energyEM() + p.energyNonEM();
170
171 if(m_isbasic) {
172 if(!m_isDM) {
173 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
174 ATH_CHECK(caloMgrHandle.isValid());
175 const CaloDetDescrElement* dde = (*caloMgrHandle)->get_element(id);
176 if(dde) {
177 *m_eta = dde->eta();
178 *m_phi = dde->phi();
179 }
180 } else {
181 const CaloDmDescrElement *el = m_dm_ddm->get_element(id);
182 if(el) {
183 *m_eta = el->eta();
184 *m_phi = el->phi();
185 }
186 }
187 }
188 if(m_savefullID){
189 if(m_isDM) {
190 *m_det = m_dmid->pos_neg_z(id);
191 *m_side = m_dmid->dmat(id);
192 *m_sam = m_dmid->sampling(id);
193 *m_reg = m_dmid->region(id);
194 *m_etatow = m_dmid->eta(id);
195 *m_phimod = m_dmid->phi(id);
196 } else {
197 *m_det = m_cellid->sub_calo(id);
198 *m_sam = m_cellid->calo_sample(id);
199 if(m_cellid->is_tile(id)) {
200 *m_side = m_cellid->side(id);
201 *m_reg = m_cellid->section(id);
202 *m_etatow = m_cellid->tower(id);
203 *m_phimod = m_cellid->module(id);
204 } else {
205 *m_side = m_cellid->pos_neg(id);
206 *m_reg = m_cellid->region(id);
207 *m_etatow = m_cellid->eta(id);
208 *m_phimod = m_cellid->phi(id);
209 }
210 }
211 }
212 if(m_isbasic){
214 }
215
216 return StatusCode::SUCCESS;
217}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
unsigned int CaloHit_GetDetectorInfo(Identifier &HitID)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ fillAgain()

virtual StatusCode D3PD::BlockFillerTool< CaloCalibrationHit >::fillAgain ( const CaloCalibrationHit & p)
virtualinherited

Fill one block, after AGAIN has been returned (type-safe).

Parameters
pThe input object.

Once fill returns AGAIN, the parent should call fillAgain with the same arguments. This continues until fillAgain returns something other than AGAIN.

By default, this just calls fill().

◆ fillUntyped()

virtual StatusCode D3PD::BlockFillerTool< CaloCalibrationHit >::fillUntyped ( const void * p,
bool again = false )
virtualinherited

Fill one block.

Parameters
pThe input object.
againSet if this is a subsequent call requested by an AGAIN return

This is called once per object. The type of the object at which p points is given by the ti argument to configureD3PD. The caller is responsible for arranging that all the pointers for booked variables are set appropriately upon entry.

If the return status is the special code AGAIN (defined above), then this filler tool wants to make multiple entries. The parent should set up to capture a new ‘row’ and run through the list of block filler tools again, but for this tool call fillAgainUntyped instead of fillUntyped. This should be repeated as long as fillAgainUntyped returns AGAIN.

Once fillUntyped returns AGAIN, the parent should call fillUntyped with the same p argument and again set to true. This continues until fillUntyped returns something other than AGAIN.

Not all parents may support this. In that case, returning AGAIN will be treated as an error.

◆ initialize()

StatusCode D3PD::CaloCalibHitFillerTool::initialize ( )
overridevirtual

Standard Gaudi initialize method.

Definition at line 62 of file CaloCalibHitFillerTool.cxx.

63{
64 ServiceHandle<StoreGateSvc> detStore("DetectorStore", name());
65 ATH_CHECK ( detStore.retrieve() );
66
67 ATH_CHECK ( m_caloMgrKey.initialize() );
68 ATH_CHECK ( detStore->retrieve(m_emid) );
69 ATH_CHECK ( detStore->retrieve(m_fcalid) );
70 ATH_CHECK ( detStore->retrieve(m_hecid) );
71 ATH_CHECK ( detStore->retrieve(m_tileid) );
72 ATH_CHECK ( detStore->retrieve(m_onlineid));
73 if(m_isDM) {
74 ATH_CHECK ( detStore->retrieve(m_dmid) );
76 if(!m_dm_ddm) {
77 std::cout<<"Could not get CaloDmDescrManager"<<std::endl;
78 return StatusCode::FAILURE;
79 }
80 } else {
81 ATH_CHECK ( detStore->retrieve(m_cellid) );
82 }
83
84 if(m_saveallen) { m_savetoten = false; m_savevisen = false; }
85
86 return StatusCode::SUCCESS;
87}
static const CaloDmDescrManager * instance()

Member Data Documentation

◆ m_blockName

std::string D3PD::BlockFillerToolImpl::m_blockName
privateinherited

Property: the name of this block.

Definition at line 118 of file BlockFillerToolImpl.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> D3PD::CaloCalibHitFillerTool::m_caloMgrKey
private
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Definition at line 100 of file CaloCalibHitFillerTool.h.

100 { this
101 , "CaloDetDescrManager"
102 , "CaloDetDescrManager"
103 , "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_cellid

const CaloCell_ID* D3PD::CaloCalibHitFillerTool::m_cellid
private

Definition at line 112 of file CaloCalibHitFillerTool.h.

◆ m_converter

TypeConverter D3PD::BlockFillerToolImpl::m_converter
privateinherited

Helper to do type conversions.

Definition at line 121 of file BlockFillerToolImpl.h.

◆ m_det

unsigned int* D3PD::CaloCalibHitFillerTool::m_det
private

Definition at line 93 of file CaloCalibHitFillerTool.h.

◆ m_dm_ddm

const CaloDmDescrManager* D3PD::CaloCalibHitFillerTool::m_dm_ddm
private

Definition at line 106 of file CaloCalibHitFillerTool.h.

◆ m_dmid

const CaloDM_ID* D3PD::CaloCalibHitFillerTool::m_dmid
private

Definition at line 113 of file CaloCalibHitFillerTool.h.

◆ m_e_em

float* D3PD::CaloCalibHitFillerTool::m_e_em
private

Definition at line 87 of file CaloCalibHitFillerTool.h.

◆ m_e_esc

float* D3PD::CaloCalibHitFillerTool::m_e_esc
private

Definition at line 90 of file CaloCalibHitFillerTool.h.

◆ m_e_inv

float* D3PD::CaloCalibHitFillerTool::m_e_inv
private

Definition at line 89 of file CaloCalibHitFillerTool.h.

◆ m_e_nonem

float* D3PD::CaloCalibHitFillerTool::m_e_nonem
private

Definition at line 88 of file CaloCalibHitFillerTool.h.

◆ m_emid

const LArEM_ID* D3PD::CaloCalibHitFillerTool::m_emid
private

Definition at line 107 of file CaloCalibHitFillerTool.h.

◆ m_eta

float* D3PD::CaloCalibHitFillerTool::m_eta
private

Variable: time, quality and id.

Definition at line 83 of file CaloCalibHitFillerTool.h.

◆ m_etatow

unsigned int* D3PD::CaloCalibHitFillerTool::m_etatow
private

Definition at line 97 of file CaloCalibHitFillerTool.h.

◆ m_etot

float* D3PD::CaloCalibHitFillerTool::m_etot
private

Definition at line 85 of file CaloCalibHitFillerTool.h.

◆ m_evis

float* D3PD::CaloCalibHitFillerTool::m_evis
private

Definition at line 86 of file CaloCalibHitFillerTool.h.

◆ m_fcalid

const LArFCAL_ID* D3PD::CaloCalibHitFillerTool::m_fcalid
private

Definition at line 108 of file CaloCalibHitFillerTool.h.

◆ m_hecid

const LArHEC_ID* D3PD::CaloCalibHitFillerTool::m_hecid
private

Definition at line 109 of file CaloCalibHitFillerTool.h.

◆ m_id

unsigned int* D3PD::CaloCalibHitFillerTool::m_id
private

Definition at line 92 of file CaloCalibHitFillerTool.h.

◆ m_isbasic

bool D3PD::CaloCalibHitFillerTool::m_isbasic
private

Definition at line 118 of file CaloCalibHitFillerTool.h.

◆ m_isDM

bool D3PD::CaloCalibHitFillerTool::m_isDM
private

Definition at line 117 of file CaloCalibHitFillerTool.h.

◆ m_metadata

ObjectMetadata D3PD::AddVariable::m_metadata
protectedinherited

Metadata about the variables created by this object.

Definition at line 129 of file AddVariable.h.

◆ m_onlineid

const LArOnlineID* D3PD::CaloCalibHitFillerTool::m_onlineid
private

Definition at line 111 of file CaloCalibHitFillerTool.h.

◆ m_particleID

unsigned int* D3PD::CaloCalibHitFillerTool::m_particleID
private

Definition at line 91 of file CaloCalibHitFillerTool.h.

◆ m_phi

float* D3PD::CaloCalibHitFillerTool::m_phi
private

Definition at line 84 of file CaloCalibHitFillerTool.h.

◆ m_phimod

unsigned int* D3PD::CaloCalibHitFillerTool::m_phimod
private

Definition at line 98 of file CaloCalibHitFillerTool.h.

◆ m_prefix

std::string D3PD::BlockFillerToolImpl::m_prefix
privateinherited

Property: the variable prefix for this block.

Definition at line 112 of file BlockFillerToolImpl.h.

◆ m_reg

unsigned int* D3PD::CaloCalibHitFillerTool::m_reg
private

Definition at line 96 of file CaloCalibHitFillerTool.h.

◆ m_sam

unsigned int* D3PD::CaloCalibHitFillerTool::m_sam
private

Definition at line 94 of file CaloCalibHitFillerTool.h.

◆ m_saveallen

bool D3PD::CaloCalibHitFillerTool::m_saveallen
private

Definition at line 123 of file CaloCalibHitFillerTool.h.

◆ m_savefullID

bool D3PD::CaloCalibHitFillerTool::m_savefullID
private

Definition at line 120 of file CaloCalibHitFillerTool.h.

◆ m_savepartID

bool D3PD::CaloCalibHitFillerTool::m_savepartID
private

Definition at line 119 of file CaloCalibHitFillerTool.h.

◆ m_savetoten

bool D3PD::CaloCalibHitFillerTool::m_savetoten
private

Definition at line 121 of file CaloCalibHitFillerTool.h.

◆ m_savevisen

bool D3PD::CaloCalibHitFillerTool::m_savevisen
private

Definition at line 122 of file CaloCalibHitFillerTool.h.

◆ m_side

unsigned int* D3PD::CaloCalibHitFillerTool::m_side
private

Definition at line 95 of file CaloCalibHitFillerTool.h.

◆ m_suffix

std::string D3PD::BlockFillerToolImpl::m_suffix
privateinherited

Property: the variable prefix for this block.

Definition at line 115 of file BlockFillerToolImpl.h.

◆ m_tileid

const TileID* D3PD::CaloCalibHitFillerTool::m_tileid
private

Definition at line 110 of file CaloCalibHitFillerTool.h.

◆ m_tree

IAddVariable* D3PD::AddVariable::m_tree
privateinherited

Reference to the block name.

The parent IAddVariable instance.

Definition at line 143 of file AddVariable.h.

◆ s_emptyString

const std::string D3PD::AddVariable::s_emptyString
staticprivateinherited

Used to provide a default value for blockName.

Definition at line 41 of file AddVariable.h.


The documentation for this class was generated from the following files: