ATLAS Offline Software
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 
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 }
xAOD::HIEventShapeContainer_v1
DataVector< HIEventShape_v1 > HIEventShapeContainer_v1
Container type for event info objects.
Definition: HIEventShapeContainer_v1.h:32
TPConverterBase
Definition: TPConverter.h:738
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
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::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::HIEventShape_v2
Interface class for the HI reconstruction EDM.
Definition: HIEventShape_v2.h:31
ATH_MSG
#define ATH_MSG(MSG)
Convenience macro for printing messages in the converter.
Definition: xAODHIEventShapeContainerCnv_v1.cxx:20
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAODHIEventShapeContainerCnv_v1.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DataVector::clear
void clear()
Erase all the elements in the collection.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAODHIEventShapeContainerCnv_v1::xAODHIEventShapeContainerCnv_v1
xAODHIEventShapeContainerCnv_v1()
Default constructor.
Definition: xAODHIEventShapeContainerCnv_v1.cxx:27
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAOD::HIEventShapeContainer
HIEventShapeContainer_v2 HIEventShapeContainer
Define the latest version of the container.
Definition: HIEventShapeContainer.h:17
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.