ATLAS Offline Software
ALFA_RawDataCnv_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_p1::persToTrans(const ALFA_RawData_p1* persObj, ALFA_RawData* transObj, MsgStream &log) const {
10 
11 
12  log << MSG::DEBUG << "In ALFA_RawDataCnv_p1:persToTrans called" << endmsg;
13 
14  transObj->SetZero_PMF();
15  transObj->SetWordId_PMF (persObj->WordId);
16  transObj->SetPMFId_PMF (persObj->PMFId);
17  transObj->SetMBId_PMF (persObj->MBId);
18  transObj->SetEventCount_PMF (persObj->EventCount);
19  transObj->SetMarocChan_PMF (persObj->m_MarocChan);
20  for (uint32_t w : persObj->m_dataWords)
21  transObj->addData (w);
22  transObj->Set_error_bit17 (persObj->m_error_bit17);
23 
24 
25  }
26 
27 void ALFA_RawDataCnv_p1::transToPers(const ALFA_RawData* transObj, ALFA_RawData_p1* persObj, MsgStream &log) const {
28 
29 
30  log << MSG::DEBUG << "In ALFA_RawDataCnv_p1:transToPers called" << endmsg;
31 
32  persObj->WordId = transObj->GetWordId_PMF();
33  persObj->PMFId = transObj->GetPMFId_PMF();
34  persObj->MBId = transObj->GetMBId_PMF();
35  persObj->EventCount = transObj->GetEventCount_PMF();
36  persObj->m_error_bit17 = transObj->Get_error_bit17();
37 
38  persObj->m_MarocChan.resize(16);
39 
40  const std::vector<uint16_t>& v = transObj->HitChan();
41  for ( int i = 0; i < 16; i++ ){
42  persObj->m_MarocChan[i] = v[i];
43  }
44 
45 
46  if (transObj->dataWords()!=nullptr)
47  persObj->m_dataWords = *transObj->dataWords();
48 }
ALFA_RawData::GetEventCount_PMF
uint32_t GetEventCount_PMF() const
Definition: ALFA_RawData.h:53
ALFA_RawData::GetMBId_PMF
uint16_t GetMBId_PMF() const
Definition: ALFA_RawData.h:52
ALFA_RawData::Set_error_bit17
void Set_error_bit17(bool bit)
Definition: ALFA_RawData.cxx:81
ALFA_RawData::HitChan
const std::vector< uint16_t > & HitChan() const
Definition: ALFA_RawData.h:64
ALFA_RawData::SetPMFId_PMF
void SetPMFId_PMF(uint16_t PMF_number)
Definition: ALFA_RawData.cxx:49
ALFA_RawData::addData
void addData(uint32_t dataWord)
Definition: ALFA_RawData.cxx:76
ALFA_RawData_p1
Definition: ALFA_RawData_p1.h:14
ALFA_RawData::dataWords
const std::vector< uint32_t > * dataWords() const
Definition: ALFA_RawData.h:67
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawData_p1::m_dataWords
std::vector< uint32_t > m_dataWords
Definition: ALFA_RawData_p1.h:29
ALFA_RawData_p1::m_error_bit17
bool m_error_bit17
Definition: ALFA_RawData_p1.h:25
ALFA_RawData_p1::EventCount
uint32_t EventCount
Definition: ALFA_RawData_p1.h:22
ALFA_RawData_p1::MBId
uint16_t MBId
Definition: ALFA_RawData_p1.h:21
ALFA_RawData::SetMBId_PMF
void SetMBId_PMF(uint16_t MB_number)
Definition: ALFA_RawData.cxx:54
ALFA_RawData_p1::PMFId
uint16_t PMFId
Definition: ALFA_RawData_p1.h:20
ALFA_RawData::GetWordId_PMF
uint16_t GetWordId_PMF() const
Definition: ALFA_RawData.h:50
ALFA_RawData
Definition: ALFA_RawData.h:21
ALFA_RawDataCnv_p1::persToTrans
virtual void persToTrans(const ALFA_RawData_p1 *persObj, ALFA_RawData *transObj, MsgStream &log) const override
Definition: ALFA_RawDataCnv_p1.cxx:9
ALFA_RawData.h
ALFA_RawData::SetMarocChan_PMF
void SetMarocChan_PMF(const std::vector< uint16_t > &MarocChan)
Definition: ALFA_RawData.cxx:65
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ALFA_RawData_p1::m_MarocChan
std::vector< uint16_t > m_MarocChan
Definition: ALFA_RawData_p1.h:23
ALFA_RawData::Get_error_bit17
bool Get_error_bit17() const
Definition: ALFA_RawData.h:61
ALFA_RawData::GetPMFId_PMF
uint16_t GetPMFId_PMF() const
Definition: ALFA_RawData.h:51
ALFA_RawData_p1::WordId
uint16_t WordId
Definition: ALFA_RawData_p1.h:19
ALFA_RawData::SetWordId_PMF
void SetWordId_PMF(uint16_t Word_number)
Definition: ALFA_RawData.cxx:44
ALFA_RawData::SetEventCount_PMF
void SetEventCount_PMF(uint32_t Event_number)
Definition: ALFA_RawData.cxx:59
python.PyAthena.v
v
Definition: PyAthena.py:154
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ALFA_RawData::SetZero_PMF
void SetZero_PMF()
Definition: ALFA_RawData.cxx:87
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
ALFA_RawDataCnv_p1::transToPers
virtual void transToPers(const ALFA_RawData *transObj, ALFA_RawData_p1 *persObj, MsgStream &log) const override
Definition: ALFA_RawDataCnv_p1.cxx:27
ALFA_RawDataCnv_p1.h