ATLAS Offline Software
TriggerInfoCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
8 void TriggerInfoCnv_p2::transToPers(const TriggerInfo* trans, TriggerInfo_p2* pers, MsgStream &) const {
9 
10  pers->m_statusElement = trans->statusElement();
11  pers->m_extendedLevel1ID = trans->extendedLevel1ID();
12  pers->m_level1TriggerType = trans->level1TriggerType();
13  pers->m_level1TriggerInfo = trans->level1TriggerInfo();
14  pers->m_level2TriggerInfo = trans->level2TriggerInfo();
15  pers->m_eventFilterInfo = trans->eventFilterInfo();
16  size_t sz = trans->streamTags().size();
17  pers->m_streamTags.resize(sz);
18  for (unsigned int i = 0; i < sz; ++i) {
19  const TriggerInfo::StreamTag& st = trans->streamTags()[i];
20  pers->m_streamTags[i].m_name = st.name();
21  pers->m_streamTags[i].m_type = st.type();
22  pers->m_streamTags[i].m_obeysLumiblock = st.obeysLumiblock();
23  }
24 
25 }
26 
27 void TriggerInfoCnv_p2::persToTrans(const TriggerInfo_p2* pers, TriggerInfo* trans, MsgStream &) const {
28 
29  trans->setStatusElement (pers->m_statusElement);
35  std::vector<TriggerInfo::StreamTag> st;
36  st.reserve(pers->m_streamTags.size());
37  for (unsigned int i = 0; i < pers->m_streamTags.size(); ++i) {
38  st.emplace_back (pers->m_streamTags[i].m_name,
39  pers->m_streamTags[i].m_type,
40  pers->m_streamTags[i].m_obeysLumiblock);
41  }
42  trans->setStreamTags (std::move (st));
43 }
44 
46 {
47  auto trans = std::make_unique<TriggerInfo>();
48  persToTrans(persObj, trans.get(), log);
49  return(trans.release());
50 }
TriggerInfo_p2
Definition: TriggerInfo_p2.h:18
TriggerInfo::setLevel1TriggerType
void setLevel1TriggerType(const number_type level1TriggerType)
set level1 trigger type
Definition: TriggerInfo.cxx:173
TriggerInfo::streamTags
const std::vector< StreamTag > & streamTags() const
get stream tags
Definition: TriggerInfo.cxx:158
TriggerInfo_p2::m_streamTags
std::vector< StreamTag_p2 > m_streamTags
Definition: TriggerInfo_p2.h:37
TriggerInfo::StreamTag::name
const std::string & name() const
Definition: TriggerInfo.cxx:50
fitman.sz
sz
Definition: fitman.py:527
TriggerInfo::setExtendedLevel1ID
void setExtendedLevel1ID(const number_type extendedLevel1ID)
set extended level1 ID
Definition: TriggerInfo.cxx:168
TriggerInfo::StreamTag::obeysLumiblock
bool obeysLumiblock() const
Definition: TriggerInfo.cxx:60
TriggerInfo_p2::m_statusElement
number_type m_statusElement
Definition: TriggerInfo_p2.h:31
TriggerInfo::setLevel2TriggerInfo
void setLevel2TriggerInfo(const std::vector< number_type > &level2TriggerInfo)
set level2 trigger info
Definition: TriggerInfo.cxx:188
TriggerInfo::setEventFilterInfo
void setEventFilterInfo(const std::vector< number_type > &eventFilterInfo)
set event filter trigger info
Definition: TriggerInfo.cxx:198
TriggerInfoCnv_p2::createTransientConst
virtual TriggerInfo * createTransientConst(const TriggerInfo_p2 *persObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p2.cxx:45
TriggerInfo.h
This class contains trigger related information.
TriggerInfo::level1TriggerInfo
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
Definition: TriggerInfo.cxx:143
TriggerInfo::setStatusElement
void setStatusElement(const number_type statusElement)
set status element
Definition: TriggerInfo.cxx:163
TriggerInfo::StreamTag
Definition: TriggerInfo.h:87
TriggerInfoCnv_p2::persToTrans
virtual void persToTrans(const TriggerInfo_p2 *persObj, TriggerInfo *transObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p2.cxx:27
TriggerInfo::StreamTag::type
const std::string & type() const
Definition: TriggerInfo.cxx:55
lumiFormat.i
int i
Definition: lumiFormat.py:85
TriggerInfo_p2::m_level1TriggerType
number_type m_level1TriggerType
Definition: TriggerInfo_p2.h:33
TriggerInfo::level2TriggerInfo
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
Definition: TriggerInfo.cxx:148
TriggerInfo::setStreamTags
void setStreamTags(const std::vector< StreamTag > &streamTags)
Definition: TriggerInfo.cxx:208
TriggerInfoCnv_p2.h
TriggerInfo::level1TriggerType
number_type level1TriggerType() const
get level1 trigger type
Definition: TriggerInfo.cxx:138
TriggerInfo_p2::m_extendedLevel1ID
number_type m_extendedLevel1ID
Definition: TriggerInfo_p2.h:32
TriggerInfo
This class contains trigger related information.
Definition: TriggerInfo.h:77
TriggerInfo_p2::m_level2TriggerInfo
std::vector< number_type > m_level2TriggerInfo
Definition: TriggerInfo_p2.h:35
TriggerInfo_p2::m_eventFilterInfo
std::vector< number_type > m_eventFilterInfo
Definition: TriggerInfo_p2.h:36
TriggerInfoCnv_p2::transToPers
virtual void transToPers(const TriggerInfo *transObj, TriggerInfo_p2 *persObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p2.cxx:8
TriggerInfo::extendedLevel1ID
number_type extendedLevel1ID() const
get extended level1 ID
Definition: TriggerInfo.cxx:133
TriggerInfo::eventFilterInfo
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
Definition: TriggerInfo.cxx:153
TriggerInfo::setLevel1TriggerInfo
void setLevel1TriggerInfo(const std::vector< number_type > &level1TriggerInfo)
set level1 trigger info
Definition: TriggerInfo.cxx:178
TriggerInfo_p2::m_level1TriggerInfo
std::vector< number_type > m_level1TriggerInfo
Definition: TriggerInfo_p2.h:34
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TriggerInfo::statusElement
number_type statusElement() const
get status element
Definition: TriggerInfo.cxx:128