ATLAS Offline Software
TileTTL1FillerTool.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: TileTTL1FillerTool.cxx
7  * Author: Stephen Cole <stephen.cole@cern.ch>
8  *
9  * Created on January 13, 2012, 10:27 AM
10  */
11 
12 #include "TileTTL1FillerTool.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/StatusCode.h"
19 
20 using namespace std;
21 
22 namespace D3PD{
23 
24 TileTTL1FillerTool::TileTTL1FillerTool(const string& type,
25  const string& name, const IInterface* parent):
27  m_tileTBID(0),
28  m_TT_ID(0)
29 {
30  TileTTL1FillerTool::book().ignore(); // Avoid coverity warnings
31 }
32 
33 
38 {
41  return StatusCode::SUCCESS;
42 }
43 
44 
46 {
47  CHECK(addVariable("side",m_side));
48  CHECK(addVariable("eta",m_eta));
49  CHECK(addVariable("phi",m_phi));
50  CHECK(addVariable("samples",m_samples));
51  return StatusCode::SUCCESS;
52 }
53 
55  Identifier id=p.TTL1_ID();
56 
57  if(m_tileTBID->is_tiletb(id)){
58  *m_side=m_tileTBID->type(id);
59  *m_eta=m_tileTBID->eta(id);
60  *m_phi=m_tileTBID->module(id);
61  }
62  else{
63  *m_side=m_TT_ID->pos_neg_z(id);
64  *m_eta=m_TT_ID->eta(id);
65  *m_phi=m_TT_ID->phi(id);
66  }
67 
68  *m_samples=p.fsamples();
69  return StatusCode::SUCCESS;
70 }
71 
72 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileTBID::is_tiletb
bool is_tiletb(const Identifier &id) const
Test ID if it is TileTBID.
Definition: TileTBID.cxx:87
D3PD::TileTTL1FillerTool::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
Definition: TileTTL1FillerTool.cxx:37
TileTTL1
Definition: TileTTL1.h:26
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
D3PD::TileTTL1FillerTool::m_eta
int * m_eta
Definition: TileTTL1FillerTool.h:66
TileTBID::type
int type(const Identifier &id) const
extract type field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:146
TileTBID::module
int module(const Identifier &id) const
extract module field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:150
CaloLVL1_ID::phi
int phi(const Identifier id) const
return phi according to :
Definition: CaloLVL1_ID.h:659
D3PD::TileTTL1FillerTool::m_phi
int * m_phi
Definition: TileTTL1FillerTool.h:67
TileTBID.h
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
D3PD::TileTTL1FillerTool::fill
virtual StatusCode fill(const TileTTL1 &p)
Fill one block — type-safe version.
Definition: TileTTL1FillerTool.cxx:54
D3PD::TileTTL1FillerTool::m_samples
std::vector< float > * m_samples
Definition: TileTTL1FillerTool.h:68
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
TileTTL1FillerTool.h
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CaloLVL1_ID::eta
int eta(const Identifier id) const
return eta according to :
Definition: CaloLVL1_ID.h:653
D3PD::TileTTL1FillerTool::m_tileTBID
const TileTBID * m_tileTBID
A data member to retain a pointer to the Tile Test Beam Identifier service.
Definition: TileTTL1FillerTool.h:58
CaloLVL1_ID::pos_neg_z
int pos_neg_z(const Identifier id) const
return pos_neg_z according to :
Definition: CaloLVL1_ID.h:635
D3PD::TileTTL1FillerTool::m_TT_ID
const CaloLVL1_ID * m_TT_ID
A data member to retain a pointer to the Tile Identifier service.
Definition: TileTTL1FillerTool.h:63
D3PD::TileTTL1FillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: TileTTL1FillerTool.cxx:45
CaloLVL1_ID.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::TileTTL1FillerTool::m_side
int * m_side
Definition: TileTTL1FillerTool.h:65
TileTBID::eta
int eta(const Identifier &id) const
extract eta field from MBTS identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:169
Identifier
Definition: IdentifierFieldParser.cxx:14