ATLAS Offline Software
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 
9 void 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 
24 void 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 }
ALFA_RawData_charge::SetChannelNum_PMF
void SetChannelNum_PMF(uint16_t Channel_number)
Definition: ALFA_RawData_charge.cxx:44
ALFA_RawData_charge::GetMBId_PMF
uint16_t GetMBId_PMF() const
Definition: ALFA_RawData_charge.h:53
ALFA_RawData_charge::GetPMFId_PMF
uint16_t GetPMFId_PMF() const
Definition: ALFA_RawData_charge.h:51
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawData_charge_p1
Definition: ALFA_RawData_charge_p1.h:14
ALFA_RawDataCnv_charge_p1::persToTrans
virtual void persToTrans(const ALFA_RawData_charge_p1 *persObj, ALFA_RawData_charge *transObj, MsgStream &log) const override
Definition: ALFA_RawDataCnv_charge_p1.cxx:9
ALFA_RawDataCnv_charge_p1.h
ALFA_RawDataCnv_charge_p1::transToPers
virtual void transToPers(const ALFA_RawData_charge *transObj, ALFA_RawData_charge_p1 *persObj, MsgStream &log) const override
Definition: ALFA_RawDataCnv_charge_p1.cxx:24
ALFA_RawData_charge.h
ALFA_RawData_charge::SetEventCount_PMF
void SetEventCount_PMF(uint32_t Event_number)
Definition: ALFA_RawData_charge.cxx:59
ALFA_RawData_charge
Definition: ALFA_RawData_charge.h:21
lumiFormat.i
int i
Definition: lumiFormat.py:85
ALFA_RawData_charge::SetZero_PMF
void SetZero_PMF()
Definition: ALFA_RawData_charge.cxx:88
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ALFA_RawData_charge::addData
void addData(uint32_t dataWord)
Definition: ALFA_RawData_charge.cxx:82
ALFA_RawData_charge::SetPMFId_PMF
void SetPMFId_PMF(uint16_t PMF_number)
Definition: ALFA_RawData_charge.cxx:39
ALFA_RawData_charge_p1::PMFId
uint16_t PMFId
Definition: ALFA_RawData_charge_p1.h:20
ALFA_RawData_charge::dataWords
const std::vector< uint32_t > * dataWords() const
Definition: ALFA_RawData_charge.h:67
ALFA_RawData_charge::ChargeChanVect_number
const std::vector< uint16_t > & ChargeChanVect_number() const
Definition: ALFA_RawData_charge.h:64
ALFA_RawData_charge_p1::m_dataWords
std::vector< uint32_t > m_dataWords
Definition: ALFA_RawData_charge_p1.h:27
ALFA_RawData_charge_p1::MBId
uint16_t MBId
Definition: ALFA_RawData_charge_p1.h:21
ALFA_RawData_charge_p1::EventCount
uint32_t EventCount
Definition: ALFA_RawData_charge_p1.h:22
python.PyAthena.v
v
Definition: PyAthena.py:154
ALFA_RawData_charge::GetEventCount_PMF
uint32_t GetEventCount_PMF() const
Definition: ALFA_RawData_charge.h:55
ALFA_RawData_charge_p1::ChannelNumId
uint16_t ChannelNumId
Definition: ALFA_RawData_charge_p1.h:19
ALFA_RawData_charge_p1::m_ChargeChan
std::vector< uint16_t > m_ChargeChan
Definition: ALFA_RawData_charge_p1.h:23
ALFA_RawData_charge::SetChargeChanVect_PMF
void SetChargeChanVect_PMF(const std::vector< uint16_t > &ChargeChan)
Definition: ALFA_RawData_charge.cxx:71
ALFA_RawData_charge::GetChannelNum_PMF
uint16_t GetChannelNum_PMF() const
Definition: ALFA_RawData_charge.h:52
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ALFA_RawData_charge::SetMBId_PMF
void SetMBId_PMF(uint16_t MB_number)
Definition: ALFA_RawData_charge.cxx:49
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200