ATLAS Offline Software
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 
13 #include "StoreGate/StoreGateSvc.h"
15 
16 namespace D3PD {
17 
19  const std::string& name,
20  const IInterface* parent):Base(type, name,parent)
21  {
22  LArRawChannelFillerTool::book().ignore(); // Avoid coverity warnings.
23  }
24 
26  }
27 
28 
33  {
35  return StatusCode::SUCCESS;
36  }
37 
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 
48  ATH_MSG_DEBUG( " in LArRawChannelFillerTool::fill()" );
49 
50  const LArRawChannel* larR=&p;
51  if ( larR ) {
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();
61  *m_energy = larR->energy();
62  *m_time = larR->time() ;
63  *m_quality = larR->quality( );
64 
65  }
66  return StatusCode::SUCCESS;
67  }
68 
69 }
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
D3PD::LArRawChannelFillerTool::LArRawChannelFillerTool
LArRawChannelFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: LArRawChannelFillerTool.cxx:18
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArRawChannel::identify
HWIdentifier identify() const
Definition: LArRawChannel.h:154
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArRawChannel::quality
uint16_t quality() const
Definition: LArRawChannel.h:174
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
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
D3PD::LArRawChannelFillerTool::m_quality
float * m_quality
Definition: LArRawChannelFillerTool.h:57
D3PD::LArRawChannelFillerTool::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArRawChannelFillerTool.h:58
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::LArRawChannelFillerTool::book
virtual StatusCode book()
Declare tuple variables.
Definition: LArRawChannelFillerTool.cxx:38
D3PD::LArRawChannelFillerTool::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition: LArRawChannelFillerTool.cxx:32
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
LArRawChannel
Liquid Argon ROD output object base class.
Definition: LArRawChannel.h:40
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::BlockFillerTool< LArRawChannel >
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::LArRawChannelFillerTool::fill
virtual StatusCode fill(const LArRawChannel &p)
Fill one block — type-safe version.
Definition: LArRawChannelFillerTool.cxx:47
D3PD::LArRawChannelFillerTool::m_onlId
unsigned int * m_onlId
Definition: LArRawChannelFillerTool.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
D3PD::LArRawChannelFillerTool::~LArRawChannelFillerTool
virtual ~LArRawChannelFillerTool()
Definition: LArRawChannelFillerTool.cxx:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArRawChannel::time
int time() const
Definition: LArRawChannel.h:170
LArRawChannel::energy
int energy() const
Definition: LArRawChannel.h:166
D3PD::LArRawChannelFillerTool::m_offId
unsigned int * m_offId
Definition: LArRawChannelFillerTool.h:53
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
D3PD::LArRawChannelFillerTool::m_time
float * m_time
Definition: LArRawChannelFillerTool.h:56
LArRawChannelFillerTool.h
StoreGateSvc.h
D3PD::LArRawChannelFillerTool::m_energy
float * m_energy
Definition: LArRawChannelFillerTool.h:55
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20