ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODHIEventAthenaPool
src
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):
14
#include "
xAODHIEventShapeContainerCnv_v1.h
"
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
27
xAODHIEventShapeContainerCnv_v1::xAODHIEventShapeContainerCnv_v1
()
28
:
T_AthenaPoolTPCnvBase
<
xAOD
::HIEventShapeContainer,
29
xAOD
::HIEventShapeContainer_v1 >() {
30
31
}
32
33
void
xAODHIEventShapeContainerCnv_v1::
34
persToTrans
(
const
xAOD::HIEventShapeContainer_v1
* oldObj,
35
xAOD::HIEventShapeContainer
* newObj,
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
59
void
xAODHIEventShapeContainerCnv_v1::
60
transToPers
(
const
xAOD::HIEventShapeContainer
*,
61
xAOD::HIEventShapeContainer_v1
*,
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
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ATH_MSG
#define ATH_MSG(lvl)
Definition
AthMsgStreamMacros.h:38
T_AthenaPoolTPCnvBase
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
Definition
T_AthenaPoolTPConverter.h:41
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::clear
void clear()
Erase all the elements in the collection.
xAODHIEventShapeContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::HIEventShapeContainer_v1 *oldObj, xAOD::HIEventShapeContainer *newObj, MsgStream &log)
Function converting from the old type to the current one.
Definition
xAODHIEventShapeContainerCnv_v1.cxx:34
xAODHIEventShapeContainerCnv_v1::xAODHIEventShapeContainerCnv_v1
xAODHIEventShapeContainerCnv_v1()
Default constructor.
Definition
xAODHIEventShapeContainerCnv_v1.cxx:27
xAODHIEventShapeContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::HIEventShapeContainer *, xAOD::HIEventShapeContainer_v1 *, MsgStream &log)
Dummy function inherited from the base class.
Definition
xAODHIEventShapeContainerCnv_v1.cxx:60
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::HIEventShapeContainer_v1
DataVector< HIEventShape_v1 > HIEventShapeContainer_v1
Container type for event info objects.
Definition
HIEventShapeContainer_v1.h:32
xAOD::HIEventShapeContainer
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
Definition
HIEventShapeContainer.h:17
xAOD::HIEventShape
HIEventShape_v2 HIEventShape
Definition of the latest event info version.
Definition
HIEventShape.h:16
xAODHIEventShapeContainerCnv_v1.h
Generated on
for ATLAS Offline Software by
1.17.0