ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
CaloSysD3PDMaker
src
LArRawChannelFillerTool.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: LArRawChannelFillerTool.cxx
7
* Author: Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
8
*
9
* Created on May 30, 2012
10
*/
11
12
#include "
LArRawChannelFillerTool.h
"
13
#include "
StoreGate/StoreGateSvc.h
"
14
#include "
AthenaKernel/errorcheck.h
"
15
16
namespace
D3PD
{
17
18
LArRawChannelFillerTool::LArRawChannelFillerTool
(
const
std::string&
type
,
19
const
std::string& name,
20
const
IInterface* parent):
Base
(
type
, name,parent)
21
{
22
LArRawChannelFillerTool::book
().ignore();
// Avoid coverity warnings.
23
}
24
25
LArRawChannelFillerTool::~LArRawChannelFillerTool
() {
26
}
27
28
32
StatusCode
LArRawChannelFillerTool::initialize
()
33
{
34
CHECK
(
m_cablingKey
.initialize() );
35
return
StatusCode::SUCCESS;
36
}
37
38
StatusCode
LArRawChannelFillerTool::book
(){
39
CHECK
(
addVariable
(
"offlineID"
,
m_offId
));
40
CHECK
(
addVariable
(
"onlineID"
,
m_onlId
));
41
CHECK
(
addVariable
(
"energy"
,
m_energy
));
42
CHECK
(
addVariable
(
"time"
,
m_time
));
43
CHECK
(
addVariable
(
"quality"
,
m_quality
));
44
return
StatusCode::SUCCESS;
45
}
46
47
StatusCode
LArRawChannelFillerTool::fill
(
const
LArRawChannel
& p){
48
ATH_MSG_DEBUG
(
" in LArRawChannelFillerTool::fill()"
);
49
50
const
LArRawChannel
* larR=&p;
51
if
( larR ) {
52
SG::ReadCondHandle<LArOnOffIdMapping>
cablingHdl{
m_cablingKey
};
53
const
LArOnOffIdMapping
* cabling{*cablingHdl};
54
if
(!cabling){
55
ATH_MSG_ERROR
(
"Do not have mapping object "
<<
m_cablingKey
.key() );
56
return
StatusCode::FAILURE;
57
}
58
const
Identifier
id
=cabling->cnvToIdentifier(larR->
identify
());
59
*
m_offId
=
id
.get_identifier32().get_compact();
60
*
m_onlId
= larR->
identify
().
get_identifier32
().
get_compact
();
61
*
m_energy
= larR->
energy
();
62
*
m_time
= larR->
time
() ;
63
*
m_quality
= larR->
quality
( );
64
65
}
66
return
StatusCode::SUCCESS;
67
}
68
69
}
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
LArRawChannelFillerTool.h
StoreGateSvc.h
D3PD::BlockFillerTool< LArRawChannel >::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Definition
AddVariable.cxx:85
D3PD::LArRawChannelFillerTool::m_quality
float * m_quality
Definition
LArRawChannelFillerTool.h:57
D3PD::LArRawChannelFillerTool::m_time
float * m_time
Definition
LArRawChannelFillerTool.h:56
D3PD::LArRawChannelFillerTool::~LArRawChannelFillerTool
virtual ~LArRawChannelFillerTool()
Definition
LArRawChannelFillerTool.cxx:25
D3PD::LArRawChannelFillerTool::m_onlId
unsigned int * m_onlId
Definition
LArRawChannelFillerTool.h:54
D3PD::LArRawChannelFillerTool::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition
LArRawChannelFillerTool.h:58
D3PD::LArRawChannelFillerTool::m_energy
float * m_energy
Definition
LArRawChannelFillerTool.h:55
D3PD::LArRawChannelFillerTool::fill
virtual StatusCode fill(const LArRawChannel &p)
Fill one block — type-safe version.
Definition
LArRawChannelFillerTool.cxx:47
D3PD::LArRawChannelFillerTool::Base
D3PD::BlockFillerTool< LArRawChannel > Base
Definition
LArRawChannelFillerTool.h:24
D3PD::LArRawChannelFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition
LArRawChannelFillerTool.cxx:38
D3PD::LArRawChannelFillerTool::LArRawChannelFillerTool
LArRawChannelFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
LArRawChannelFillerTool.cxx:18
D3PD::LArRawChannelFillerTool::m_offId
unsigned int * m_offId
Definition
LArRawChannelFillerTool.h:53
D3PD::LArRawChannelFillerTool::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition
LArRawChannelFillerTool.cxx:32
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition
Identifier32.h:47
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
LArOnOffIdMapping
Definition
LArOnOffIdMapping.h:20
LArRawChannel
Liquid Argon ROD output object base class.
Definition
LArRawChannel.h:40
LArRawChannel::identify
HWIdentifier identify() const
Definition
LArRawChannel.h:154
LArRawChannel::time
int time() const
Definition
LArRawChannel.h:170
LArRawChannel::quality
uint16_t quality() const
Definition
LArRawChannel.h:174
LArRawChannel::energy
int energy() const
Definition
LArRawChannel.h:166
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
Identifier
Definition
IdentifierFieldParser.cxx:14
type
Generated on
for ATLAS Offline Software by
1.17.0