ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
16namespace 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
27
28
33 {
34 CHECK( m_cablingKey.initialize() );
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}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual StatusCode fill(const LArRawChannel &p)
Fill one block — type-safe version.
D3PD::BlockFillerTool< LArRawChannel > Base
virtual StatusCode book()
Declare tuple variables.
LArRawChannelFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
StatusCode initialize()
Standard Gaudi initialize method.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Liquid Argon ROD output object base class.
HWIdentifier identify() const
int time() const
uint16_t quality() const
int energy() const
Block filler tool for noisy FEB information.