ATLAS Offline Software
Loading...
Searching...
No Matches
xAODTrigRNNOutputContainerCnv_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: xAODTrigRNNOutputContainerCnv_v1.cxx 707590 2015-11-12 19:09:03Z krasznaa $
6
7// System include(s):
8#include <stdexcept>
9
10// Gaudi/Athena include(s):
11#include "GaudiKernel/MsgStream.h"
12
13// EDM include(s):
15
16// Local include(s):
18
20#define MSGLVL MSG::DEBUG
21
23#define ATH_MSG( MSG ) \
24 do { \
25 if( log.level() <= MSGLVL ) { \
26 log << MSGLVL << MSG << endmsg; \
27 } \
28 } while( 0 )
29
33
34
38 MsgStream& log ) const {
39
40 // Greet the user:
41 ATH_MSG( "Converting xAOD::TrigRNNOutputContainer_v1 to current "
42 "version..." );
43
44 // Clear the transient object:
45 newObj->clear();
46
47 // Simply fill the transient object with as many new objects as many we have
48 // in the persistent object:
49 for( size_t i = 0; i < oldObj->size(); ++i ) {
50 newObj->push_back( new xAOD::TrigRNNOutput() );
51 }
52
53 // Print what happened:
54 ATH_MSG( "Converting xAOD::TrigRNNOutputContainer_v1 to current "
55 "version [OK]" );
56
57 return;
58}
59
66 MsgStream& log ) const {
67
68 log << MSG::ERROR
69 << "Somebody called xAODTrigRNNOutputContainerCnv_v1::transToPers"
70 << endmsg;
71 throw std::runtime_error( "Somebody called xAODTrigRNNOutputContainerCnv_v1"
72 "::transToPers" );
73
74 return;
75}
#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::TrigRNNOutputContainer *, xAOD::TrigRNNOutputContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
virtual void persToTrans(const xAOD::TrigRNNOutputContainer_v1 *oldObj, xAOD::TrigRNNOutputContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
DataVector< TrigRNNOutput_v1 > TrigRNNOutputContainer_v1
Define the RingerRings container as a simple DataVector.
TrigRNNOutput_v2 TrigRNNOutput
Define the latest version of the RingerRings class.
TrigRNNOutputContainer_v2 TrigRNNOutputContainer
Define the latest version of the TrigRNNOutputContainer class.