ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetEventCnv
InDetEventAthenaPool
src
Pixel1RawDataCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetRawData/Pixel1RawData.h
"
6
7
// Persistent class and converter header file
8
#include "
InDetEventAthenaPool/InDetRawData_p1.h
"
9
#include "
Pixel1RawDataCnv_p1.h
"
10
11
// Other stuff
12
#include "Identifier/Identifier.h"
13
#include "
AthenaKernel/errorcheck.h
"
14
15
#include "
MsgUtil.h
"
16
17
void
18
Pixel1RawDataCnv_p1::persToTrans
(
const
InDetRawData_p1
* persObj,
Pixel1RawData
* transObj, MsgStream &log)
19
{
20
MSG_VERBOSE
(log,
"Pixel1RawDataCnv_p1::persToTrans called "
);
21
22
if
(!
m_isInitialized
) {
23
if
(this->
initialize
(log) != StatusCode::SUCCESS) {
24
log << MSG::FATAL <<
"Could not initialize PixelClusterOnTrackCnv_p1 "
<<
endmsg
;
25
}
26
}
27
28
// Must ask pixelID helper to contruct channel id. Special
29
// treatment is needed when reading in unsigned int and going to
30
// 64-bit id.
31
*transObj =
Pixel1RawData
(
m_pixId
->pixel_id(persObj->
m_rdoId
),
32
persObj->
m_word
);
33
}
34
35
void
36
Pixel1RawDataCnv_p1::transToPers
(
const
Pixel1RawData
* transObj,
InDetRawData_p1
* persObj, MsgStream &log)
37
{
38
MSG_VERBOSE
(log,
"Pixel1RawDataCnv_p1::transToPers called "
);
39
persObj->
m_rdoId
= transObj->
identify
().
get_compact
();
40
persObj->
m_word
= transObj->
getWord
();
41
}
42
43
StatusCode
Pixel1RawDataCnv_p1::initialize
(MsgStream &
/*log*/
) {
44
// Do not initialize again:
45
m_isInitialized
=
true
;
46
47
// get DetectorStore service
48
SmartIF<StoreGateSvc> detStore{Gaudi::svcLocator()->service(
"DetectorStore"
)};
49
CHECK
( detStore.isValid() );
50
CHECK
( detStore->retrieve(
m_pixId
,
"PixelID"
) );
51
52
return
StatusCode::SUCCESS;
53
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
InDetRawData_p1.h
MsgUtil.h
MSG_VERBOSE
#define MSG_VERBOSE(log, x)
Definition
MsgUtil.h:18
Pixel1RawDataCnv_p1.h
Pixel1RawData.h
Identifier::get_compact
value_type get_compact() const
Get the compact id.
InDetRawData_p1
Definition
InDetRawData_p1.h:10
InDetRawData_p1::m_word
unsigned int m_word
Definition
InDetRawData_p1.h:19
InDetRawData_p1::m_rdoId
Identifier32::value_type m_rdoId
Definition
InDetRawData_p1.h:18
InDetRawData::identify
virtual Identifier identify() const override final
Definition
InDetRawData.h:41
InDetRawData::getWord
unsigned int getWord() const
Definition
InDetRawData.h:47
Pixel1RawDataCnv_p1::persToTrans
virtual void persToTrans(const InDetRawData_p1 *persObj, Pixel1RawData *transObj, MsgStream &log)
Definition
Pixel1RawDataCnv_p1.cxx:18
Pixel1RawDataCnv_p1::m_isInitialized
bool m_isInitialized
Definition
Pixel1RawDataCnv_p1.h:34
Pixel1RawDataCnv_p1::initialize
StatusCode initialize(MsgStream &log)
Definition
Pixel1RawDataCnv_p1.cxx:43
Pixel1RawDataCnv_p1::transToPers
virtual void transToPers(const Pixel1RawData *transObj, InDetRawData_p1 *persObj, MsgStream &log)
Definition
Pixel1RawDataCnv_p1.cxx:36
Pixel1RawDataCnv_p1::m_pixId
const PixelID * m_pixId
Definition
Pixel1RawDataCnv_p1.h:33
Pixel1RawData
Definition
Pixel1RawData.h:23
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0