ATLAS Offline Software
xAODL2StandAloneMuonContainerCnv_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: xAODL2StandAloneMuonContainerCnv_v1.cxx 707606 2015-11-12 19:59:49Z 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):
17 
19 #define MSGLVL MSG::DEBUG
20 
22 #define ATH_MSG( MSG ) \
23  do { \
24  if( log.level() <= MSGLVL ) { \
25  log << MSGLVL << MSG << endmsg; \
26  } \
27  } while( 0 )
28 
30 {
31 }
32 
36  MsgStream& log ) const {
37 
38  // Greet the user:
39  ATH_MSG( "Converting xAOD::L2StandAloneMuonContainer_v1 to current version..." );
40 
41  newObj->clear();
42  for (size_t i = 0; i < oldObj->size(); i++)
43  newObj->push_back (std::make_unique<xAOD::L2StandAloneMuon>());
44 
45  // Print what happened:
46  ATH_MSG( "Converting xAOD::L2StandAloneMuonContainer_v1 to current version "
47  "[OK]" );
48 
49  return;
50 }
51 
58  MsgStream& log ) const {
59 
60  log << MSG::ERROR
61  << "Somebody called xAODL2StandAloneMuonContainer_v1::transToPers"
62  << endmsg;
63  throw std::runtime_error( "Somebody called xAODL2StandAloneMuonContainer_v1::"
64  "transToPers" );
65 
66  return;
67 }
L2StandAloneMuonContainer.h
L2StandAloneMuonContainer_v1.h
ATH_MSG
#define ATH_MSG(MSG)
Another convenience macro for printing messages in the converter.
Definition: xAODL2StandAloneMuonContainerCnv_v1.cxx:22
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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.
xAODL2StandAloneMuonContainerCnv_v1::xAODL2StandAloneMuonContainerCnv_v1
xAODL2StandAloneMuonContainerCnv_v1()
Default constructor.
Definition: xAODL2StandAloneMuonContainerCnv_v1.cxx:29
xAODL2StandAloneMuonContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::L2StandAloneMuonContainer *, xAOD::L2StandAloneMuonContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition: xAODL2StandAloneMuonContainerCnv_v1.cxx:56
xAODL2StandAloneMuonContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::L2StandAloneMuonContainer_v1 *oldObj, xAOD::L2StandAloneMuonContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition: xAODL2StandAloneMuonContainerCnv_v1.cxx:34
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAODL2StandAloneMuonContainerCnv_v1.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.