ATLAS Offline Software
TriggerInfoCnv_p1.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 
9 void TriggerInfoCnv_p1::transToPers(const TriggerInfo* trans, TriggerInfo_p1* pers, MsgStream &) const
10 {
11  // Deprecated, p2 is used for writing
12  pers->m_extendedLevel1ID = trans->extendedLevel1ID();
13  pers->m_level1TriggerType = trans->level1TriggerType();
14  pers->m_level2TriggerInfo = 0;
15  if (!trans->level2TriggerInfo().empty())
16  pers->m_level2TriggerInfo = trans->level2TriggerInfo()[0];
17  pers->m_eventFilterInfo = trans->eventFilterInfo();
18 }
19 
20 
21 void TriggerInfoCnv_p1::persToTrans(const TriggerInfo_p1* pers, TriggerInfo* trans, MsgStream &) const
22 {
25  // For backwards compatibility - add pers->m_level2TriggerInfo to
26  // trans vector if not zero
27  if (pers->m_level2TriggerInfo != 0) {
28  std::vector<TriggerInfo::number_type> l2info {pers->m_level2TriggerInfo};
29  trans->setLevel2TriggerInfo (std::move (l2info));
30  }
32 }
33 
34 
36 {
37  auto trans = std::make_unique<TriggerInfo>();
38  persToTrans(persObj, trans.get(), log);
39  return(trans.release());
40 }
41 
43 {
44  auto pers = std::make_unique<TriggerInfo_p1>();
45  transToPers(transObj, pers.get(), log);
46  return(pers.release());
47 }
TriggerInfoCnv_p1::transToPers
virtual void transToPers(const TriggerInfo *transObj, TriggerInfo_p1 *persObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p1.cxx:9
TriggerInfo::setLevel1TriggerType
void setLevel1TriggerType(const number_type level1TriggerType)
set level1 trigger type
Definition: TriggerInfo.cxx:173
TriggerInfo::setExtendedLevel1ID
void setExtendedLevel1ID(const number_type extendedLevel1ID)
set extended level1 ID
Definition: TriggerInfo.cxx:168
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
TriggerInfo_p1::m_eventFilterInfo
std::vector< number_type > m_eventFilterInfo
Definition: TriggerInfo_p1.h:29
TriggerInfo.h
This class contains trigger related information.
TriggerInfo_p1::m_level2TriggerInfo
number_type m_level2TriggerInfo
Definition: TriggerInfo_p1.h:28
TriggerInfoCnv_p1::persToTrans
virtual void persToTrans(const TriggerInfo_p1 *persObj, TriggerInfo *transObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p1.cxx:21
TriggerInfoCnv_p1.h
TriggerInfo::level2TriggerInfo
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
Definition: TriggerInfo.cxx:148
TriggerInfoCnv_p1::createPersistentConst
virtual TriggerInfo_p1 * createPersistentConst(const TriggerInfo *transObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p1.cxx:42
TriggerInfo_p1::m_extendedLevel1ID
number_type m_extendedLevel1ID
Definition: TriggerInfo_p1.h:26
TriggerInfo::level1TriggerType
number_type level1TriggerType() const
get level1 trigger type
Definition: TriggerInfo.cxx:138
TriggerInfoCnv_p1::createTransientConst
virtual TriggerInfo * createTransientConst(const TriggerInfo_p1 *persObj, MsgStream &log) const override
Definition: TriggerInfoCnv_p1.cxx:35
TriggerInfo
This class contains trigger related information.
Definition: TriggerInfo.h:77
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_p1
Definition: TriggerInfo_p1.h:17
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TriggerInfo_p1::m_level1TriggerType
number_type m_level1TriggerType
Definition: TriggerInfo_p1.h:27