ATLAS Offline Software
LArTTCellMapCnv.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 #include "LArTTCellMapCnv.h"
6 
7 
8 // Gaudi
9 #include "GaudiKernel/MsgStream.h"
10 #include "GaudiKernel/IToolSvc.h"
11 
12 // Athena
14 
16  :
17  // Base class constructor
19 {}
20 
22 {}
23 
24 
26 {
27  // Call base clase initialize
28  if (!AthenaPoolConverter::initialize().isSuccess()) {
29  return StatusCode::FAILURE;
30  }
31 
32  // Get the messaging service, print where you are
33  MsgStream log(msgSvc(), "LArTTCellMapCnv");
34  log << MSG::INFO << "initialize()" << endmsg;
35 
36  return StatusCode::SUCCESS;
37 }
38 
39 
41 
42  MsgStream log(msgSvc(),"LArTTCellMapCnv") ;
43 
44  persObj = (obj->getP()) ;
45 
46  if(persObj == 0 ) {
47  log<<MSG::ERROR<<" no persistent object from LArTTCellMap " <<endmsg;
48  return StatusCode::FAILURE;
49  }
50 
51  log<<MSG::DEBUG<<" LArTTCell size = "<< persObj->m_v.size() <<endmsg;
52  std::cout <<" LArTTCell_P pointer " << persObj <<std::endl;
53 
54  return StatusCode::SUCCESS;
55 }
56 
58 
59  MsgStream log(msgSvc(),"LArTTCellMapCnv") ;
60 
61  log<<MSG::DEBUG<<" LArTTCell size = "<< obj->m_v.size() <<endmsg;
62 
63  transObj=new LArTTCellMap();
64  transObj->set( *obj ) ;
65 
66  return StatusCode::SUCCESS ;
67 }
LArTTCellMap::set
void set(const PDATA &t)
initialize from Nova
Definition: LArTTCellMap.cxx:29
StorableConversions.h
convert to and from a SG storable
LArTTCellMapCnv::~LArTTCellMapCnv
virtual ~LArTTCellMapCnv()
Definition: LArTTCellMapCnv.cxx:21
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
LArTTCellMapCnv.h
LArTTCellMapCnv::persToTrans
virtual StatusCode persToTrans(LArTTCellMap *&transObj, LArTTCell_P *obj)
Definition: LArTTCellMapCnv.cxx:57
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
LArTTCellMapCnv::transToPers
virtual StatusCode transToPers(LArTTCellMap *obj, LArTTCell_P *&persObj)
Extend base-class conversion method.
Definition: LArTTCellMapCnv.cxx:40
LArTTCell_P
This is a database object holding the offline TT-cell map.
Definition: LArTTCell_P.h:23
LArTTCellMap
This is a StoreGate object holding the offline TT-cell map.
Definition: LArTTCellMap.h:29
LArTTCellMapCnv::initialize
virtual StatusCode initialize()
initialization
Definition: LArTTCellMapCnv.cxx:25
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArTTCell_P::m_v
std::vector< __t > m_v
Definition: LArTTCell_P.h:54
python.PyAthena.obj
obj
Definition: PyAthena.py:135
LArTTCellMapCnv::LArTTCellMapCnv
LArTTCellMapCnv(ISvcLocator *svcloc)
Definition: LArTTCellMapCnv.cxx:15