ATLAS Offline Software
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 
31 {
32 }
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 }
ATH_MSG
#define ATH_MSG(MSG)
Another convenience macro for printing messages in the converter.
Definition: xAODTrigRNNOutputContainerCnv_v1.cxx:23
xAODTrigRNNOutputContainerCnv_v1.h
xAOD::TrigRNNOutput_v2
Definition: TrigRNNOutput_v2.h:24
xAODTrigRNNOutputContainerCnv_v1::persToTrans
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.
Definition: xAODTrigRNNOutputContainerCnv_v1.cxx:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAODTrigRNNOutputContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::TrigRNNOutputContainer *, xAOD::TrigRNNOutputContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition: xAODTrigRNNOutputContainerCnv_v1.cxx:64
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigRNNOutput.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.
xAODTrigRNNOutputContainerCnv_v1::xAODTrigRNNOutputContainerCnv_v1
xAODTrigRNNOutputContainerCnv_v1()
Default constructor.
Definition: xAODTrigRNNOutputContainerCnv_v1.cxx:30
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.