ATLAS Offline Software
xAODBTaggingAuxContainerCnv_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 // Gaudi/Athena include(s):
6 #include "GaudiKernel/MsgStream.h"
7 
8 // Core EDM include(s):
10 
11 // Local include(s):
15 
17 #define MSGLVL MSG::DEBUG
18 
20 #define ATH_MSG( MSG ) \
21  do { \
22  if( log.level() <= MSGLVL ) { \
23  log << MSGLVL << MSG << endmsg; \
24  } \
25  } while( 0 )
26 
28 {
29 }
30 
34  MsgStream& log ) const {
35 
36  // Greet the user:
37  ATH_MSG( "Converting xAOD::BTaggingAuxContainer_v1 to current version..." );
38 
39  // Clear the transient object:
40  newObj->resize( 0 );
41 
42  // Copy the payload of the v1 object into the latest one by misusing
43  // the thinning code a bit...
44  SG::copyAuxStoreThinned( *oldObj, *newObj, nullptr );
45 
46  // Print what happened:
47  ATH_MSG( "Converting xAOD::BTaggingAuxContainer_v1 to current version "
48  "[OK]" );
49 
50  return;
51 }
52 
59  MsgStream& log ) const {
60 
61  log << MSG::ERROR
62  << "Somebody called xAODBTaggingAuxContainerCnv_v1::transToPers"
63  << endmsg;
64  throw std::runtime_error( "Somebody called xAODBTaggingAuxContainerCnv_v1::"
65  "transToPers" );
66 
67  return;
68 }
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::BTaggingAuxContainer_v2
Definition: BTaggingAuxContainer_v2.h:18
xAODBTaggingAuxContainerCnv_v1::transToPers
virtual void transToPers(const xAOD::BTaggingAuxContainer *, xAOD::BTaggingAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
Definition: xAODBTaggingAuxContainerCnv_v1.cxx:57
BTaggingContainer_v1.h
ATH_MSG
#define ATH_MSG(MSG)
Another convenience macro for printing messages in the converter.
Definition: xAODBTaggingAuxContainerCnv_v1.cxx:20
xAOD::AuxContainerBase::resize
virtual bool resize(size_t size) override
Resize the arrays to a given size.
Definition: AuxContainerBase.cxx:485
copyAuxStoreThinned.h
Helper to copy an aux store while applying thinning.
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
BTaggingContainer.h
xAODBTaggingAuxContainerCnv_v1::persToTrans
virtual void persToTrans(const xAOD::BTaggingAuxContainer_v1 *oldObj, xAOD::BTaggingAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Definition: xAODBTaggingAuxContainerCnv_v1.cxx:32
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xAODBTaggingAuxContainerCnv_v1.h
xAODBTaggingAuxContainerCnv_v1::xAODBTaggingAuxContainerCnv_v1
xAODBTaggingAuxContainerCnv_v1()
Default constructor.
Definition: xAODBTaggingAuxContainerCnv_v1.cxx:27
xAOD::BTaggingAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: BTaggingAuxContainer_v1.h:33