ATLAS Offline Software
xAODTrigCompositeAuxContainerCnv_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 // EDM include(s):
16 
17 // Core EDM include(s):
19 
20 // Local include(s):
22 
24 #define MSGLVL MSG::DEBUG
25 
27 #define ATH_MSG( MSG ) \
28  do { \
29  if( log.level() <= MSGLVL ) { \
30  log << MSGLVL << MSG << endmsg; \
31  } \
32  } while( 0 )
33 
35 {
36 }
37 
41  MsgStream& log ) const {
42 
43  // Greet the user:
44  ATH_MSG( "Converting xAOD::TrigCompositeAuxContainer_v1 to current version..." );
45 
46  // Clear the transient object:
47  newObj->resize( 0 );
48 
49  // This line does the conversion.
50  SG::copyAuxStoreThinned( *oldObj, *newObj, nullptr );
51 
52  // Print what happened:
53  ATH_MSG( "Converting xAOD::TrigCompositeAuxContainer_v1 to current version "
54  "[OK]" );
55 
56  return;
57 }
58 
64  MsgStream& log ) const {
65 
66  log << MSG::ERROR
67  << "Somebody called xAODTrigCompositeAuxContainerCnv_v1::transToPers"
68  << endmsg;
69  throw std::runtime_error( "Somebody called xAODTrigCompositeAuxContainerCnv_v1::"
70  "transToPers" );
71 
72  return;
73 }
SG::copyAuxStoreThinned
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore &copy, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.
xAOD::TrigCompositeAuxContainer_v1
Auxiliary store for TrigComposite_v1 containers.
Definition: TrigCompositeAuxContainer_v1.h:36
TrigCompositeContainer_v1.h
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:505
xAODTrigCompositeAuxContainerCnv_v1.h
copyAuxStoreThinned.h
Helper to copy an aux store while applying thinning.
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG
#define ATH_MSG(MSG)
Another convenience macro for printing messages in the converter.
Definition: xAODTrigCompositeAuxContainerCnv_v1.cxx:27
TrigCompositeAuxContainer.h
TrigCompositeContainer.h
xAODTrigCompositeAuxContainerCnv_v1::xAODTrigCompositeAuxContainerCnv_v1
xAODTrigCompositeAuxContainerCnv_v1()
Default constructor.
Definition: xAODTrigCompositeAuxContainerCnv_v1.cxx:34
xAODTrigCompositeAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::TrigCompositeAuxContainer_v1 *oldObj, xAOD::TrigCompositeAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition: xAODTrigCompositeAuxContainerCnv_v1.cxx:39
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAOD::TrigCompositeAuxContainer_v2
Auxiliary store for TrigComposite containers.
Definition: TrigCompositeAuxContainer_v2.h:33
xAODTrigCompositeAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::TrigCompositeAuxContainer *, xAOD::TrigCompositeAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition: xAODTrigCompositeAuxContainerCnv_v1.cxx:62
TrigCompositeAuxContainer_v1.h