ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TestBeam
TBEventAthenaPool
src
TBMWPCRawContCnv.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 "
TBMWPCRawContCnv.h
"
6
7
// Gaudi
8
#include "GaudiKernel/MsgStream.h"
9
10
// Athena
11
#include "
AthenaKernel/StorableConversions.h
"
12
13
14
// Constructor - call base constructor and initialize local attributes
15
TBMWPCRawContCnv::TBMWPCRawContCnv
(ISvcLocator* svcloc)
16
:
17
// Base class constructor
18
TBMWPCRawContCnvBase
::
T_AthenaPoolCnv
(svcloc)
19
{}
20
21
// Destructor
22
TBMWPCRawContCnv::~TBMWPCRawContCnv
()
23
{}
24
25
StatusCode
TBMWPCRawContCnv::initialize
()
26
{
27
// Call base clase initialize
28
CHECK
(
AthenaPoolConverter::initialize
());
29
30
// Get the messaging service, print where you are
31
MsgStream log(msgSvc(),
"TBMWPCRawContCnv"
);
32
log << MSG::INFO <<
"initialize()"
<<
endmsg
;
33
34
return
StatusCode::SUCCESS;
35
}
36
37
38
StatusCode
TBMWPCRawContCnv::PoolToDataObject
(DataObject*& pObj,
39
const
Token
* token,
40
const
std::string& key)
41
{
42
// First call base class converter to get DataObject from
43
// pool. Then modify as appropriate
44
45
MsgStream log(msgSvc(),
"TBMWPCRawContCnv::PoolToDataObject"
);
46
47
StatusCode
sc
= TBMWPCRawContCnvBase::PoolToDataObject(pObj, token, key);
48
if
(
sc
.isFailure()) {
49
log << MSG::FATAL <<
"Unable to get object from pool"
<<
endmsg
;
50
return
StatusCode::FAILURE;
51
}
else
{
52
log << MSG::DEBUG <<
" Found DataObject "
<<
endmsg
;
53
}
54
55
// Convert DataObject pointer to TBMWPCRawCont*
56
TBMWPCRawCont
* obj=0;
57
SG::fromStorable
(pObj, obj );
58
if
(!obj) {
59
log << MSG::ERROR <<
" failed to cast to TBMWPCRawCont "
<<
endmsg
;
60
return
StatusCode::FAILURE;
61
}
62
63
return
StatusCode::SUCCESS;
64
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
StorableConversions.h
convert to and from a SG storable
TBMWPCRawContCnv.h
TBMWPCRawContCnvBase
T_AthenaPoolCnv< TBMWPCRawCont > TBMWPCRawContCnvBase
Definition
TBMWPCRawContCnv.h:11
AthenaPoolConverter::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations:
Definition
AthenaPoolConverter.cxx:29
TBMWPCRawContCnv::~TBMWPCRawContCnv
virtual ~TBMWPCRawContCnv()
Definition
TBMWPCRawContCnv.cxx:22
TBMWPCRawContCnv::TBMWPCRawContCnv
TBMWPCRawContCnv(ISvcLocator *svcloc)
Definition
TBMWPCRawContCnv.cxx:15
TBMWPCRawContCnv::PoolToDataObject
virtual StatusCode PoolToDataObject(DataObject *&pObj, const Token *token, const std::string &key) override
Extend base-class conversion method to modify when reading in.
Definition
TBMWPCRawContCnv.cxx:38
TBMWPCRawContCnv::initialize
virtual StatusCode initialize() override
initialization
Definition
TBMWPCRawContCnv.cxx:25
TBMWPCRawCont
"TBEvent/TBMWPCRawCont.h"
Definition
TBMWPCRawCont.h:18
T_AthenaPoolCnv
This templated class provides the converter to translate an object to/from its persistent POOL repres...
Definition
T_AthenaPoolCnv.h:61
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
SG::fromStorable
bool fromStorable(DataObject *pDObj, T *&pTrans, bool quiet=false, IRegisterTransient *irt=0, bool isConst=true)
Definition
StorableConversions.h:169
Generated on
for ATLAS Offline Software by
1.17.0