11#include "GaudiKernel/MsgStream.h"
22#define MSGLVL MSG::DEBUG
25#define ATH_MSG( MSG ) \
27 if( log.level() <= MSGLVL ) { \
28 log << MSGLVL << MSG << endmsg; \
39 MsgStream& log )
const {
42 ATH_MSG(
"Converting xAOD::RODHeaderAuxContainer_v1 to current "
50 for(
size_t i = 0; i < oldObj->
size(); ++i ) {
53 oldInt.setStore( oldObj );
55 newInt.setStore( newObj );
65 newRH->
initialize( oldRH->version(), oldRH->sourceId(), oldRH->run(),
66 oldRH->lvl1Id(), oldRH->bcid(), oldRH->trigType(),
67 oldRH->detType(), oldRH->statusWords(),
68 oldRH->payloadSize() );
79 accStatusWords(
"statusWords" );
81 accPayloadSize(
"payloadSize" );
82 static const std::array< const SG::AuxElement::TypelessConstAccessor*, 9 >
83 knownVars{ { &accVersion, &accSourceId, &accRun, &accLvl1Id, &accBcid,
84 &accTrigType, &accDetType, &accStatusWords, &accPayloadSize } };
87 const size_t oindex = oldRH->index();
88 const size_t nindex = newRH->
index();
99 for(
const auto * acc : knownVars ) {
100 if( auxid == acc->auxid() ) {
110 r.copy( auxid, newInt, nindex, oldInt, oindex, 1 );
115 ATH_MSG(
"Converting xAOD::RODHeaderAuxContainer_v1 to current version "
126 MsgStream& log )
const {
128 log << MSG::ERROR <<
"xAODRODHeaderAuxContainerCnv_v1::transToPers got "
130 throw std::runtime_error(
"xAODRODHeaderAuxContainerCnv_v1::transToPers "
Handle mappings between names and auxid_t.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ConstAuxElement::TypelessConstAccessor TypelessConstAccessor
size_t index() const
Return the index of this element within its container.
Handle mappings between names and auxid_t.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
virtual bool resize(size_t size) override
Resize the arrays to a given size.
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this container.
virtual size_t size() const override
Get the size of the container.
size_t auxid_t
Identifier for a particular aux data item.
RODHeaderContainer_v2 RODHeaderContainer
Define the latest version of the RODHeader container.
RODHeaderAuxContainer_v2 RODHeaderAuxContainer
Define the latest version of the RODHeader auxiliary container.
RODHeader_v2 RODHeader
Define the latest version of the RODHeader class.
DataVector< xAOD::RODHeader_v1 > RODHeaderContainer_v1
Define the RODHeader as a simple DataVector.