ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_RawDataCnv_charge_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
8
9void ALFA_RawDataCnv_charge_p1::persToTrans(const ALFA_RawData_charge_p1* persObj, ALFA_RawData_charge* transObj, MsgStream &log) const {
10
11
12 log << MSG::DEBUG << "In ALFA_RawDataCnv_charge_p1:persToTrans called" << endmsg;
13
14 transObj->SetZero_PMF();
15 transObj->SetChannelNum_PMF (persObj->ChannelNumId);
16 transObj->SetPMFId_PMF (persObj->PMFId);
17 transObj->SetMBId_PMF (persObj->MBId);
18 transObj->SetEventCount_PMF (persObj->EventCount);
19 transObj->SetChargeChanVect_PMF (persObj->m_ChargeChan);
20 for (uint32_t w : persObj->m_dataWords)
21 transObj->addData(w);
22 }
23
24void ALFA_RawDataCnv_charge_p1::transToPers(const ALFA_RawData_charge* transObj, ALFA_RawData_charge_p1* persObj, MsgStream &log) const {
25
26
27 log << MSG::DEBUG << "In ALFA_RawDataCnv_p1:transToPers called" << endmsg;
28
29 persObj->ChannelNumId = transObj->GetChannelNum_PMF();
30 persObj->PMFId = transObj->GetPMFId_PMF();
31 persObj->MBId = transObj->GetMBId_PMF();
32 persObj->EventCount = transObj->GetEventCount_PMF();
33
34 persObj->m_ChargeChan.resize(64);
35
36 const std::vector<uint16_t>&v = transObj->ChargeChanVect_number();
37 for ( int i = 0; i < 64; i++ ){
38 persObj->m_ChargeChan[i] = v[i];
39 }
40
41
42 if (transObj->dataWords()!=0)
43 persObj->m_dataWords = *transObj->dataWords();
44}
#define endmsg
virtual void persToTrans(const ALFA_RawData_charge_p1 *persObj, ALFA_RawData_charge *transObj, MsgStream &log) const override
virtual void transToPers(const ALFA_RawData_charge *transObj, ALFA_RawData_charge_p1 *persObj, MsgStream &log) const override
std::vector< uint32_t > m_dataWords
std::vector< uint16_t > m_ChargeChan
void SetChannelNum_PMF(uint16_t Channel_number)
const std::vector< uint16_t > & ChargeChanVect_number() const
void SetMBId_PMF(uint16_t MB_number)
uint16_t GetMBId_PMF() const
uint32_t GetEventCount_PMF() const
void SetEventCount_PMF(uint32_t Event_number)
void addData(uint32_t dataWord)
void SetPMFId_PMF(uint16_t PMF_number)
void SetChargeChanVect_PMF(const std::vector< uint16_t > &ChargeChan)
const std::vector< uint32_t > * dataWords() const
uint16_t GetChannelNum_PMF() const
uint16_t GetPMFId_PMF() const