ATLAS Offline Software
TgcL1RdoCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "MuonRDO/TgcL1Rdo.h"
6 #include "GaudiKernel/MsgStream.h"
8 #include "TgcL1RdoCnv_p1.h"
9 #include "TgcL1RawDataCnv_p1.h"
10 
11 namespace {
12 
13 union Errors_u {
15  uint32_t i;
16 };
17 
18 union SRodStatus_u {
19  TgcL1Rdo::SRodStatus srodStatus;
20  uint32_t i;
21 };
22 
23 union LocalStatus_u {
24  TgcL1Rdo::LocalStatus localStatus;
25  uint32_t i;
26 };
27 
28 }
29 
30 void
31 TgcL1RdoCnv_p1::transToPers(const TgcL1Rdo* transColl, TgcL1Rdo_p1* persColl, MsgStream &log)
32 {
33  if (log.level() <= MSG::DEBUG)
34  log << MSG::DEBUG << " *** Writing out TgcL1Rdo P1" << endmsg;
35 
36  // Invoke vector converter from the base template
37  TgcL1RdoCnv_p1_basetype::transToPers(transColl, persColl, log);
38 
39  persColl->m_version = transColl->version();
40  persColl->m_id = transColl->identify();
41  persColl->m_subDetectorId = transColl->subDetectorId();
42  persColl->m_srodId = transColl->srodId();
43  persColl->m_triggerType = transColl->triggerType();
44  persColl->m_bcId = transColl->bcId();
45  persColl->m_l1Id = transColl->l1Id();
46 
47  Errors_u errors_u{};
48  errors_u.i = 0;
49  errors_u.errors = transColl->errors();
50  persColl->m_errors = errors_u.i;
51 
52  SRodStatus_u srodStatus_u{};
53  srodStatus_u.srodStatus = transColl->srodStatus();
54  persColl->m_srodStatus = srodStatus_u.i;
55 
56  LocalStatus_u localStatus_u{};
57  localStatus_u.localStatus = transColl->localStatus();
58  persColl->m_localStatus = localStatus_u.i;
59 
60  persColl->m_orbit = transColl->orbit();
61 }
62 
63 void
64 TgcL1RdoCnv_p1::persToTrans(const TgcL1Rdo_p1* persColl, TgcL1Rdo* transColl, MsgStream &log)
65 {
66  if (log.level() <= MSG::DEBUG)
67  log << MSG::DEBUG << " *** Reading TgcL1Rdo P1" << endmsg;
68 
69  // Invoke vector converter from the base template
70  TgcL1RdoCnv_p1_basetype::persToTrans(persColl, transColl, log);
71 
72  transColl->setVersion (persColl->m_version);
73  transColl->setOnlineId(persColl->m_subDetectorId,
74  persColl->m_srodId);
75  transColl->setTriggerType (persColl->m_triggerType);
76  transColl->setBcId (persColl->m_bcId);
77  transColl->setL1Id (persColl->m_l1Id);
78  transColl->setOrbit (persColl->m_orbit);
79 
80  if(persColl->m_errors!=0) {transColl->setErrors (persColl->m_errors);}
81  transColl->setSRodStatus (persColl->m_srodStatus);
82  transColl->setLocalStatus (persColl->m_localStatus);
83 }
84 
TgcL1Rdo::Errors
Definition: TgcL1Rdo.h:36
TgcL1Rdo::SRodStatus
Definition: TgcL1Rdo.h:45
TgcL1Rdo_p1::m_srodId
uint16_t m_srodId
Definition: TgcL1Rdo_p1.h:34
TgcL1Rdo::triggerType
uint16_t triggerType() const
Definition: TgcL1Rdo.h:142
TgcL1Rdo_p1::m_orbit
uint32_t m_orbit
Definition: TgcL1Rdo_p1.h:47
TgcL1Rdo::setLocalStatus
void setLocalStatus(uint32_t data)
Definition: TgcL1Rdo.h:194
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TgcL1Rdo::orbit
uint32_t orbit() const
Definition: TgcL1Rdo.h:206
TPCnvVector::persToTrans
virtual void persToTrans(const PERS *persVect, TRANS *transVect, MsgStream &log)
Converts vector of PERS::value_type objects to vector of TRANS::value_type objects,...
TgcL1Rdo_p1::m_errors
uint32_t m_errors
Definition: TgcL1Rdo_p1.h:44
TgcL1RdoCnv_p1::persToTrans
virtual void persToTrans(const TgcL1Rdo_p1 *persColl, TgcL1Rdo *transColl, MsgStream &log)
Definition: TgcL1RdoCnv_p1.cxx:64
TgcL1Rdo::setSRodStatus
void setSRodStatus(uint32_t data)
Definition: TgcL1Rdo.h:178
TgcL1Rdo::l1Id
uint16_t l1Id() const
Definition: TgcL1Rdo.h:150
TgcL1Rdo::setVersion
void setVersion(uint16_t version)
Definition: TgcL1Rdo.h:220
TgcL1Rdo.h
TgcL1Rdo::setTriggerType
void setTriggerType(uint16_t v)
Definition: TgcL1Rdo.h:127
TgcL1Rdo::identify
uint16_t identify() const
Definition: TgcL1Rdo.h:107
lumiFormat.i
int i
Definition: lumiFormat.py:85
TPCnvVector::transToPers
virtual void transToPers(const TRANS *transVect, PERS *persVect, MsgStream &log)
Converts vector of TRANS::value_type objects to vector of PERS::value_type objects,...
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TgcL1Rdo::setL1Id
void setL1Id(uint32_t v)
Definition: TgcL1Rdo.h:119
TgcL1Rdo::version
uint16_t version() const
Definition: TgcL1Rdo.h:215
TgcL1Rdo::localStatus
const LocalStatus & localStatus() const
Definition: TgcL1Rdo.h:190
TgcL1RdoCnv_p1.h
TgcL1Rdo_p1::m_id
uint16_t m_id
Definition: TgcL1Rdo_p1.h:27
TgcL1Rdo::bcId
uint16_t bcId() const
Definition: TgcL1Rdo.h:146
TgcL1Rdo_p1::m_l1Id
uint16_t m_l1Id
Definition: TgcL1Rdo_p1.h:41
TgcL1Rdo::subDetectorId
uint16_t subDetectorId() const
Definition: TgcL1Rdo.h:134
TgcL1Rdo::setOnlineId
void setOnlineId(uint16_t subDetectorId, uint16_t srodId)
Definition: TgcL1Rdo.cxx:35
TgcL1Rdo_p1::m_localStatus
uint32_t m_localStatus
Definition: TgcL1Rdo_p1.h:46
TgcL1RdoCnv_p1::transToPers
virtual void transToPers(const TgcL1Rdo *transColl, TgcL1Rdo_p1 *persColl, MsgStream &log)
Definition: TgcL1RdoCnv_p1.cxx:31
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
TgcL1RawDataCnv_p1.h
TgcL1Rdo_p1.h
TgcL1Rdo::setBcId
void setBcId(uint16_t v)
Definition: TgcL1Rdo.h:123
TgcL1Rdo_p1::m_bcId
uint16_t m_bcId
Definition: TgcL1Rdo_p1.h:40
TgcL1Rdo::setOrbit
void setOrbit(uint32_t orbit)
Definition: TgcL1Rdo.h:210
TgcL1Rdo_p1::m_triggerType
uint16_t m_triggerType
Definition: TgcL1Rdo_p1.h:37
TgcL1Rdo_p1::m_version
uint16_t m_version
Definition: TgcL1Rdo_p1.h:24
TgcL1Rdo_p1::m_subDetectorId
uint16_t m_subDetectorId
Definition: TgcL1Rdo_p1.h:33
DEBUG
#define DEBUG
Definition: page_access.h:11
TgcL1Rdo_p1::m_srodStatus
uint32_t m_srodStatus
Definition: TgcL1Rdo_p1.h:45
TgcL1Rdo::srodId
uint16_t srodId() const
Definition: TgcL1Rdo.h:138
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TgcL1Rdo::setErrors
void setErrors(uint16_t data)
Definition: TgcL1Rdo.h:162
TgcL1Rdo_p1
Definition: TgcL1Rdo_p1.h:13
TgcL1Rdo::LocalStatus
Definition: TgcL1Rdo.h:77
TgcL1Rdo::srodStatus
const SRodStatus & srodStatus() const
Definition: TgcL1Rdo.h:174
TgcL1Rdo::errors
const Errors & errors() const
Definition: TgcL1Rdo.h:158
TgcL1Rdo
Definition: TgcL1Rdo.h:22