ATLAS Offline Software
Loading...
Searching...
No Matches
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
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}
#define endmsg
#define ATH_MSG(lvl)
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 transToPers(const xAOD::L2StandAloneMuonContainer *, xAOD::L2StandAloneMuonContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
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.
DataVector< L2StandAloneMuon_v1 > L2StandAloneMuonContainer_v1
Define the trigger calorimeter cluster container as a simple DataVector.
L2StandAloneMuonContainer_v2 L2StandAloneMuonContainer
Define the latest version of the muon SA container.