9#include "GaudiKernel/MsgStream.h"
20#define MSGLVL MSG::DEBUG
23#define ATH_MSG( MSG ) \
25 if( log.level() <= MSGLVL ) { \
26 log << MSGLVL << MSG << endmsg; \
32 xAOD::HIEventShapeAuxContainer_v1 >() {
42 ATH_MSG(
"Converting xAOD::HIEventShapeAuxContainer_v1 to current "
50 for(
size_t i = 0; i < oldObj->
size(); ++i ) {
53 oldInt.setStore( oldObj );
55 newInt.setStore( newObj );
65 newES->
setEt( oldES->Et() );
66 newES->
setArea( oldES->area() );
67 newES->
setRho( oldES->rho() );
87 static const std::array< const SG::AuxElement::TypelessConstAccessor*, 9 >
88 knownVars{ { &accEt, &accArea, &accRho, &accEt_cos, &accEt_sin,
89 &accEtaMin, &accEtaMax, &accLayer, &accNCells } };
92 const size_t oindex = oldES->index();
93 const size_t nindex = newES->
index();
104 for(
const auto * acc : knownVars ) {
105 if( auxid == acc->auxid() ) {
115 r.copy( auxid, newInt, nindex, oldInt, oindex, 1 );
120 ATH_MSG(
"Converting xAOD::HIEventShapeAuxContainer_v1 to current version "
133 log << MSG::ERROR <<
"xAODHIEventShapeAuxContainerCnv_v1::transToPers got "
135 throw std::runtime_error(
"xAODHIEventShapeAuxContainerCnv_v1::transToPers "
Handle mappings between names and auxid_t.
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
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.
xAODHIEventShapeAuxContainerCnv_v1()
Default constructor.
virtual void persToTrans(const xAOD::HIEventShapeAuxContainer_v1 *oldObj, xAOD::HIEventShapeAuxContainer *newObj, MsgStream &log)
Function converting from the old type to the current one.
virtual void transToPers(const xAOD::HIEventShapeAuxContainer *, xAOD::HIEventShapeAuxContainer_v1 *, MsgStream &log)
Dummy function inherited from the base class.
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.
void setEtCos(const std::vector< float > &value)
set the cosine harmonic modulation
void setEtaMin(float value)
set eta slice "left" edge
void setArea(float value)
set the area of the eta slice
void setEt(float value)
Set the reconstructed transverse energy.
void setLayer(int value)
set layer information
void setEtaMax(float value)
set eta slice "right" edge
void setNCells(int value)
set the number of cells summed in slice
void setEtSin(const std::vector< float > &value)
set the sine harmonic modulation
void setRho(float value)
set the rho value
size_t auxid_t
Identifier for a particular aux data item.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
HIEventShapeAuxContainer_v2 HIEventShapeAuxContainer
Define the latest version of the auxiliary container.
DataVector< HIEventShape_v1 > HIEventShapeContainer_v1
Container type for event info objects.
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
HIEventShape_v2 HIEventShape
Definition of the latest event info version.