ATLAS Offline Software
Loading...
Searching...
No Matches
MM_RawDataCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
5
7{
8 // Not much point calling this!
9}
10
11void Muon::MM_RawDataCnv_p1::transToPers( const Muon::MM_RawData *transObj, Muon::MM_RawData_p1 *persObj, MsgStream & )
12{
13 persObj->m_id = transObj->m_id.get_identifier32().get_compact();
14 persObj->m_channel = transObj->channel();
15 persObj->m_time = transObj->time();
16 persObj->m_charge = transObj->charge();
17}
18
20{
21 // since the persistent class used uint for the member variables and the transient one uses int,
22 // the static cast is added here explicitly
23 Muon::MM_RawData* trans = new MM_RawData( Identifier (persObj->m_id),
24 static_cast<int>(persObj->m_channel),
25 static_cast<int>(persObj->m_time),
26 static_cast<int>(persObj->m_charge),
27 9,
28 false ); // any RDO produced with this persisten version has the time and the charge in physical units; pscholer March 2022
29
30 return trans;
31}
32
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.
void transToPers(const MM_RawData *transObj, MM_RawData_p1 *persObj, MsgStream &log) override final
void persToTrans(const MM_RawData_p1 *persObj, MM_RawData *transObj, MsgStream &log) override final
virtual MM_RawData * createTransient(const MM_RawData_p1 *persObj, MsgStream &log) override final
unsigned int m_time
unsigned int m_channel
writing out channel id, time and charge
unsigned int m_charge
unsigned int m_id
FIXME!
Temporary class to hold the MM RDO.
Definition MM_RawData.h:20
int time() const
Definition MM_RawData.h:62
int channel() const
Definition MM_RawData.h:61
Identifier m_id
Definition MM_RawData.h:29
int charge() const
Definition MM_RawData.h:64