ATLAS Offline Software
TileBeamElemCnv_p1.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // TileBeamElemCnv_p1.cxx
8 // Implementation file for class TileBeamElemCnv_p1
9 // Author: Alexander Solodkov <Sanya.Solodkov@cern.ch>
10 // Date: June 2009
12 
13 #include "TileEvent/TileBeamElem.h"
15 
16 
17 void
18 TileBeamElemCnv_p1::persToTrans(const TileBeamElem_p1* persObj, TileBeamElem* transObj, MsgStream &/*log*/) const
19 {
20  std::vector<uint32_t> digits (persObj->m_digits.begin(),
21  persObj->m_digits.end());
22 
23  *transObj = TileBeamElem (HWIdentifier(Identifier32(persObj->m_channelID)),
24  std::move(digits));
25 }
26 
27 
28 void
29 TileBeamElemCnv_p1::transToPers(const TileBeamElem* transObj, TileBeamElem_p1* persObj, MsgStream &/*log*/) const
30 {
31  persObj->m_channelID = transObj->adc_HWID().get_identifier32().get_compact();
32  persObj->m_digits.assign (transObj->get_digits().begin(),
33  transObj->get_digits().end());
34 }
Identifier32
Definition: Identifier32.h:25
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
TileBeamElemCnv_p1.h
TileBeamElemCnv_p1::persToTrans
virtual void persToTrans(const TileBeamElem_p1 *persObj, TileBeamElem *transObj, MsgStream &log) const override
Method creating the transient representation TileBeamElem from its persistent representation TileBeam...
Definition: TileBeamElemCnv_p1.cxx:18
TileRawData::adc_HWID
HWIdentifier adc_HWID(void) const
Definition: TileRawData.h:53
HWIdentifier
Definition: HWIdentifier.h:13
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
TileBeamElemCnv_p1::transToPers
virtual void transToPers(const TileBeamElem *transObj, TileBeamElem_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation TileBeamElem_p1 from its transient representation TileB...
Definition: TileBeamElemCnv_p1.cxx:29
TileBeamElem::get_digits
const std::vector< uint32_t > & get_digits(void) const
Definition: TileBeamElem.h:47
TileBeamElem_p1::m_channelID
unsigned int m_channelID
Definition: TileBeamElem_p1.h:34
TileBeamElem.h
TileBeamElem_p1::m_digits
std::vector< uint16_t > m_digits
Definition: TileBeamElem_p1.h:35
TileBeamElem
Definition: TileBeamElem.h:27
TileBeamElem_p1
Definition: TileBeamElem_p1.h:21