ATLAS Offline Software
Loading...
Searching...
No Matches
LArRawChannelCnv_p2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9// LArRawChannelCnv_p2, used for T/P separation
10// author G.Unal
11
12void LArRawChannelCnv_p2::transToPers(const LArRawChannel* trans, LArRawChannel_p2* pers, MsgStream &/*log*/) const
13{
14 union {
15 int m_quality ;
16 uint16_t m_qualProv[2];
17 } qprov{};
18
20 pers->m_energy = trans->energy();
21 pers->m_time = trans->time();
22
23 qprov.m_qualProv[0] = trans->quality();
24 qprov.m_qualProv[1] = trans->provenance();
25
26 int tmpqual=qprov.m_quality & 0x3FFFFFFF;
27 int tmpgain=trans->gain() & 0x3;
28 tmpgain<<=30;
29 pers->m_qualityandgain = tmpqual | tmpgain;
30}
31
32void LArRawChannelCnv_p2::persToTrans(const LArRawChannel_p2* pers, LArRawChannel* trans, MsgStream &/*log*/) const
33{
34 union {
35 int m_quality ;
36 uint16_t m_qualProv[2];
37 } qprov{};
38
39 qprov.m_quality = pers->m_qualityandgain & 0x3FFFFFFF;
40
42 pers->m_energy,
43 pers->m_time,
44 qprov.m_qualProv[0], // quality
45 qprov.m_qualProv[1], // provenance
46 (CaloGain::CaloGain)((pers->m_qualityandgain>>30)&0x3)
47 );
48}
49
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.
virtual void transToPers(const LArRawChannel *trans, LArRawChannel_p2 *pers, MsgStream &log) const override
virtual void persToTrans(const LArRawChannel_p2 *pers, LArRawChannel *trans, MsgStream &log) const override
persistent class for LArRawChannel, version p2.
unsigned int m_channelID
unsigned int m_qualityandgain
Liquid Argon ROD output object base class.
uint16_t provenance() const
HWIdentifier identify() const
CaloGain::CaloGain gain() const
int time() const
uint16_t quality() const
int energy() const