ATLAS Offline Software
TRT_BSErrContainerCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
10 #include "AthAllocators/DataPool.h"
11 
12 #include <iostream>
13 
14 void TRT_BSErrContainerCnv_p2::transToPers(const TRT_BSErrContainer* transCont, TRT_BSErrContainer_p2* persCont, MsgStream & /* log */)
15 {
16  for (const uint32_t id: transCont->getMissingErrorSet()) {
17  persCont->m_missingError.push_back(id);
18  }
19 
20  for (const uint32_t id: transCont->getErrorErrorSet()) {
21  persCont->m_errorError.push_back(id);
22  }
23 
24  for (const uint32_t id: transCont->getSidErrorSet()) {
25  persCont->m_sidError.push_back(id);
26  }
27 
28  }
29 
30 void TRT_BSErrContainerCnv_p2::persToTrans(const TRT_BSErrContainer_p2* persCont, TRT_BSErrContainer* transCont, MsgStream & /* log */)
31 {
32 
33  for (const uint32_t id : persCont->m_missingError) {
34  transCont->add_missing_error(id);
35  }
36 
37  for (const uint32_t id : persCont->m_errorError) {
38  transCont->add_error_error(id);
39  }
40 
41  for (const uint32_t id : persCont->m_sidError) {
42  transCont->add_sid_error(id);
43  }
44  }
45 
46 //================================================================
48  std::unique_ptr<TRT_BSErrContainer> trans(std::make_unique<TRT_BSErrContainer>());
49  persToTrans(persObj, trans.get(), log);
50  return(trans.release());
51 }
TRT_BSErrContainer::getMissingErrorSet
const std::set< uint32_t > & getMissingErrorSet(void) const
Definition: TRT_BSErrContainer.h:33
TRT_BSErrContainerCnv_p2.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TRT_BSErrContainer::add_error_error
void add_error_error(const uint32_t DTMROC_idx)
Definition: TRT_BSErrContainer.h:52
TRT_BSErrContainerCnv_p2::createTransient
virtual TRT_BSErrContainer * createTransient(const TRT_BSErrContainer_p2 *persObj, MsgStream &log)
Definition: TRT_BSErrContainerCnv_p2.cxx:47
TRT_BSErrContainer
Definition: TRT_BSErrContainer.h:20
TRT_BSErrContainer_p2.h
TRT_BSErrContainer.h
TRT_BSErrContainer::add_sid_error
void add_sid_error(const uint32_t DTMROC_idx)
Definition: TRT_BSErrContainer.h:56
TRT_BSErrContainer::add_missing_error
void add_missing_error(const uint32_t DTMROC_idx)
Definition: TRT_BSErrContainer.h:48
DataPool.h
IdentifierHash.h
TRT_BSErrContainerCnv_p2::transToPers
virtual void transToPers(const TRT_BSErrContainer *transCont, TRT_BSErrContainer_p2 *persCont, MsgStream &log)
Definition: TRT_BSErrContainerCnv_p2.cxx:14
TRT_BSErrContainerCnv_p2::persToTrans
virtual void persToTrans(const TRT_BSErrContainer_p2 *persCont, TRT_BSErrContainer *transCont, MsgStream &log)
Definition: TRT_BSErrContainerCnv_p2.cxx:30
TRT_BSErrContainer::getSidErrorSet
const std::set< uint32_t > & getSidErrorSet(void) const
Definition: TRT_BSErrContainer.h:39
TRT_BSErrContainer_p2::m_sidError
std::vector< uint32_t > m_sidError
Definition: TRT_BSErrContainer_p2.h:19
TRT_BSErrContainer_p2::m_missingError
std::vector< uint32_t > m_missingError
Definition: TRT_BSErrContainer_p2.h:17
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TRT_BSErrContainer_p2::m_errorError
std::vector< uint32_t > m_errorError
Definition: TRT_BSErrContainer_p2.h:18
TRT_BSErrContainer::getErrorErrorSet
const std::set< uint32_t > & getErrorErrorSet(void) const
Definition: TRT_BSErrContainer.h:36
TRT_BSErrContainer_p2
Definition: TRT_BSErrContainer_p2.h:13