ATLAS Offline Software
TileHitFillerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*
6  * File: TileHitFillerTool.cxx
7  * Author: Stephen Cole <stephen.cole@cern.ch>
8  *
9  * Created on January 13, 2012, 1:11 PM
10  */
11 
12 #include "TileHitFillerTool.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/StatusCode.h"
17 #include "CaloIdentifier/TileID.h"
18 
19 using namespace std;
20 
21 namespace D3PD{
22 
23 TileHitFillerTool::TileHitFillerTool(const string& type,
24  const string& name, const IInterface* parent):
26  m_tileID(0)
27 {
28  TileHitFillerTool::book().ignore(); // Avoid coverity warnings
29 }
30 
35 {
37  return StatusCode::SUCCESS;
38 }
39 
41  CHECK(addVariable("energy",m_energy));
42  CHECK(addVariable("time",m_time));
43  CHECK(addVariable("detector",m_detector));
44  CHECK(addVariable("side",m_side));
45  CHECK(addVariable("sample",m_sample));
46  CHECK(addVariable("pmt",m_pmt));
47  CHECK(addVariable("eta",m_eta));
48  CHECK(addVariable("phi",m_phi));
49  return StatusCode::SUCCESS;
50 }
51 
53  Identifier id=p.identify();
54 
55  int size=p.size();
56  for(int i=0;i<size;++i){
57  m_energy->push_back(p.energy(i));
58  m_time->push_back(p.time(i));
59 
60  m_detector->push_back(m_tileID->section(id));
61  m_side->push_back(m_tileID->side(id));
62  m_sample->push_back(m_tileID->sample(id));
63  m_pmt->push_back(m_tileID->pmt(id));
64  m_eta->push_back(m_tileID->tower(id));
65  m_phi->push_back(m_tileID->module(id));
66  }
67 
68  return StatusCode::SUCCESS;
69 }
70 
71 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
D3PD::TileHitFillerTool::fill
virtual StatusCode fill(const TileHit &p)
Fill one block — type-safe version.
Definition: TileHitFillerTool.cxx:52
Tile_Base_ID::pmt
int pmt(const Identifier &id) const
Definition: Tile_Base_ID.cxx:180
TileHitFillerTool.h
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
Tile_Base_ID::sample
int sample(const Identifier &id) const
Definition: Tile_Base_ID.cxx:171
D3PD::TileHitFillerTool::m_time
std::vector< float > * m_time
Definition: TileHitFillerTool.h:54
D3PD::AddVariable::addVariable
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.
Definition: AddVariable.cxx:85
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
D3PD::TileHitFillerTool::m_phi
std::vector< int > * m_phi
Definition: TileHitFillerTool.h:60
D3PD::TileHitFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: TileHitFillerTool.cxx:40
D3PD::TileHitFillerTool::m_tileID
const TileID * m_tileID
Definition: TileHitFillerTool.h:51
TileID.h
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Tile_Base_ID::module
int module(const Identifier &id) const
Definition: Tile_Base_ID.cxx:159
D3PD::TileHitFillerTool::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
Definition: TileHitFillerTool.cxx:34
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::TileHitFillerTool::m_detector
std::vector< int > * m_detector
Definition: TileHitFillerTool.h:56
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:68
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::TileHitFillerTool::m_eta
std::vector< int > * m_eta
Definition: TileHitFillerTool.h:59
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
D3PD::TileHitFillerTool::m_side
std::vector< int > * m_side
Definition: TileHitFillerTool.h:57
D3PD::TileHitFillerTool::m_sample
std::vector< int > * m_sample
Definition: TileHitFillerTool.h:58
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
TileHit
Definition: TileSimEvent/TileSimEvent/TileHit.h:30
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Tile_Base_ID::section
int section(const Identifier &id) const
Definition: Tile_Base_ID.cxx:147
D3PD::TileHitFillerTool::m_energy
std::vector< float > * m_energy
Definition: TileHitFillerTool.h:53
D3PD::TileHitFillerTool::m_pmt
std::vector< int > * m_pmt
Definition: TileHitFillerTool.h:55
Identifier
Definition: IdentifierFieldParser.cxx:14