ATLAS Offline Software
CaloTTOnOffIdMapCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include "CaloTTOnOffIdMapCnv.h"
12 
13 // Gaudi
14 #include "GaudiKernel/MsgStream.h"
15 #include "GaudiKernel/IToolSvc.h"
16 
17 // Athena
19 
21  :
22  // Base class constructor
24 {}
25 
27 {}
28 
29 
31 {
32  // Call base clase initialize
33  if (!AthenaPoolConverter::initialize().isSuccess()) {
34  return StatusCode::FAILURE;
35  }
36 
37  // Get the messaging service, print where you are
38  MsgStream log(msgSvc(), "CaloTTOnOffIdMapCnv");
39  log << MSG::INFO << "initialize()" << endmsg;
40 
41  return StatusCode::SUCCESS;
42 }
43 
44 
46 
47  MsgStream log(msgSvc(),"CaloTTOnOffIdMapCnv") ;
48 
49  persObj = (obj->getP()) ;
50 
51  if(persObj == 0 ) {
52  log<<MSG::ERROR<<" no persistent object from CaloTTOnOffIdMap " <<endmsg;
53  return StatusCode::FAILURE;
54  }
55 
56  log<<MSG::DEBUG<<" CaloTTOnOffId size = "<< persObj->m_v.size() <<endmsg;
57  std::cout <<" CaloTTOnOffId_P pointer " << persObj <<std::endl;
58 
59  return StatusCode::SUCCESS;
60 }
61 
63 
64  MsgStream log(msgSvc(),"CaloTTOnOffIdMapCnv") ;
65 
66  log<<MSG::DEBUG<<" CaloOnOffId size = "<< obj->m_v.size() <<endmsg;
67 
68  transObj=new CaloTTOnOffIdMap();
69  transObj->set( *obj ) ;
70 
71  return StatusCode::SUCCESS ;
72 }
CaloTTOnOffIdMapCnv::initialize
virtual StatusCode initialize()
initialization
Definition: CaloTTOnOffIdMapCnv.cxx:30
StorableConversions.h
convert to and from a SG storable
CaloTTOnOffIdMapCnv::~CaloTTOnOffIdMapCnv
virtual ~CaloTTOnOffIdMapCnv()
Definition: CaloTTOnOffIdMapCnv.cxx:26
CaloTTOnOffIdMapCnv::CaloTTOnOffIdMapCnv
CaloTTOnOffIdMapCnv(ISvcLocator *svcloc)
Definition: CaloTTOnOffIdMapCnv.cxx:20
T_AthenaPoolCustCnv
This templated class provides the converter to translate an object to/from its persistent POOL repres...
Definition: T_AthenaPoolCustCnv.h:35
AthenaPoolConverter::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition: AthenaPoolConverter.cxx:27
CaloTTOnOffIdMap
This is a StoreGate object holding the TT offline-online map.
Definition: CaloTTOnOffIdMap.h:26
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloTTOnOffIdMapCnv::persToTrans
virtual StatusCode persToTrans(CaloTTOnOffIdMap *&transObj, CaloTTOnOffId_P *obj)
Definition: CaloTTOnOffIdMapCnv.cxx:62
CaloTTOnOffIdMapCnv.h
Generated header file which defines a typedef for templated converter class.
CaloTTOnOffId_P
This is a database object holding the TT online-offline map.
Definition: CaloTTOnOffId_P.h:22
CaloTTOnOffIdMap::set
void set(const PDATA &t)
initialize from Nova
Definition: CaloTTOnOffIdMap.cxx:27
CaloTTOnOffIdMapCnv::transToPers
virtual StatusCode transToPers(CaloTTOnOffIdMap *obj, CaloTTOnOffId_P *&persObj)
Extend base-class conversion method.
Definition: CaloTTOnOffIdMapCnv.cxx:45
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
python.PyAthena.obj
obj
Definition: PyAthena.py:135
CaloTTOnOffId_P::m_v
std::vector< __t > m_v
Definition: CaloTTOnOffId_P.h:48