ATLAS Offline Software
Loading...
Searching...
No Matches
xAODHIEventShapeContainerCnv_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: xAODHIEventShapeContainerCnv_v1.cxx 694377 2015-09-11 13:50:57Z krasznaa $
6
7// System include(s):
8#include <stdexcept>
9
10// Gaudi/Athena include(s):
11#include "GaudiKernel/MsgStream.h"
12
13// Local include(s):
15
17#define MSGLVL MSG::DEBUG
18
20#define ATH_MSG( MSG ) \
21 do { \
22 if( log.level() <= MSGLVL ) { \
23 log << MSGLVL << MSG << endmsg; \
24 } \
25 } while( 0 )
26
28 : T_AthenaPoolTPCnvBase< xAOD::HIEventShapeContainer,
29 xAOD::HIEventShapeContainer_v1 >() {
30
31}
32
36 MsgStream& log ) {
37
38 // Greet the user:
39 ATH_MSG( "Converting xAOD::HIEventShapeContainer_v1 to current version..." );
40
41 // Clear the transient object:
42 newObj->clear();
43
44 // Simply fill the transient object with as many default xAOD::HIEventShape
45 // objects, as many there are in the old object:
46 for( size_t i = 0; i < oldObj->size(); ++i ) {
47 newObj->push_back( new xAOD::HIEventShape() );
48 }
49
50 // Tell the user what happened:
51 ATH_MSG( "Converting xAOD::HIEventShapeContainer_v1 to current version "
52 "[OK]" );
53
54 // Return gracefully:
55 return;
56}
57
62 MsgStream& log ) {
63
64 log << MSG::ERROR << "xAODHIEventShapeContainerCnv_v1::transToPers got "
65 << "called" << endmsg;
66 throw std::runtime_error( "xAODHIEventShapeContainerCnv_v1::transToPers got "
67 "called" );
68
69 return;
70}
#define endmsg
#define ATH_MSG(lvl)
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
void clear()
Erase all the elements in the collection.
virtual void persToTrans(const xAOD::HIEventShapeContainer_v1 *oldObj, xAOD::HIEventShapeContainer *newObj, MsgStream &log)
Function converting from the old type to the current one.
virtual void transToPers(const xAOD::HIEventShapeContainer *, xAOD::HIEventShapeContainer_v1 *, MsgStream &log)
Dummy function inherited from the base class.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
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.