ATLAS Offline Software
xAODTrackCaloClusterAuxContainerCnv_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <stdexcept>
7 
8 // Gaudi/Athena include(s):
9 #include "GaudiKernel/MsgStream.h"
10 
11 // Core EDM include(s):
13 
14 // Local include(s):
18 
19 
21 {
22 }
23 
27  MsgStream& /*log*/ ) const {
28 
29  // Clear the transient object:
30  newObj->resize( 0 );
31 
32  // Copy the payload of the v1 object into the latest one by misusing
33  // the thinning code a bit...
34  SG::copyAuxStoreThinned( *oldObj, *newObj, nullptr );
35 
36  // Set up interface containers on top of them:
37 
38  //The old uses v_
40  for( size_t i = 0; i < oldObj->size(); ++i ) {
41  oldInt.push_back( new xAOD::TrackCaloCluster_v1() );
42  }
43  oldInt.setStore( oldObj );
44 
46  for( size_t i = 0; i < newObj->size(); ++i ) {
47  newInt.push_back( new xAOD::TrackCaloCluster() );
48  }
49  newInt.setStore( newObj );
50 
51  return;
52 }
53 
59  MsgStream& log ) const {
60 
61  log << MSG::ERROR
62  << "Somebody called xAODTrackCaloClusterAuxContainerCnv_v1::transToPers"
63  << endmsg;
64  throw std::runtime_error( "Somebody called xAODTrackCaloClusterAuxContainerCnv_v1::"
65  "transToPers" );
66  return;
67 }
SG::copyAuxStoreThinned
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore &copy, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.
TrackCaloClusterContainer_v1.h
xAOD::TrackCaloCluster_v1
Class describing a TrackCaloCluster.
Definition: TrackCaloCluster_v1.h:25
TrackCaloClusterContainer.h
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:485
xAOD::AuxContainerBase::size
virtual size_t size() const override
Get the size of the container.
Definition: AuxContainerBase.cxx:410
copyAuxStoreThinned.h
Helper to copy an aux store while applying thinning.
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAOD::TrackCaloClusterAuxContainer_v1
This class is meant to implement the TrackCaloCluster EDM.
Definition: TrackCaloClusterAuxContainer_v1.h:28
xAODTrackCaloClusterAuxContainerCnv_v1.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
xAODTrackCaloClusterAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::TrackCaloClusterAuxContainer *, xAOD::TrackCaloClusterAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition: xAODTrackCaloClusterAuxContainerCnv_v1.cxx:57
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAODTrackCaloClusterAuxContainerCnv_v1::xAODTrackCaloClusterAuxContainerCnv_v1
xAODTrackCaloClusterAuxContainerCnv_v1()
Default constructor.
Definition: xAODTrackCaloClusterAuxContainerCnv_v1.cxx:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAODTrackCaloClusterAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::TrackCaloClusterAuxContainer_v1 *oldObj, xAOD::TrackCaloClusterAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition: xAODTrackCaloClusterAuxContainerCnv_v1.cxx:25