#include <RawDataMucMcHitCnv.hpp>
Definition at line 11 of file RawDataMucMcHitCnv.hpp.
◆ RawDataMucMcHitCnv()
| RawDataMucMcHitCnv::RawDataMucMcHitCnv |
( |
ISvcLocator * | svc | ) |
|
|
inline |
Definition at line 17 of file RawDataMucMcHitCnv.hpp.
RawDataBaseCnv(long storageType, const CLID &clid, ISvcLocator *svc)
static const CLID & classID()
◆ classID()
| const CLID & RawDataMucMcHitCnv::classID |
( |
| ) |
|
|
inlinestatic |
◆ createObj()
| StatusCode RawDataMucMcHitCnv::createObj |
( |
IOpaqueAddress * | pAddr, |
|
|
DataObject *& | pObj ) |
|
inline |
Definition at line 21 of file RawDataMucMcHitCnv.hpp.
21 {
22
23
24
26 pObj = mucMcHitCol;
27
29 if ( evt == NULL )
30 {
31
32 return StatusCode::FAILURE;
33 }
34
36
37 MucMcHit* mucMcHit;
38 MucTruth_t m_MucTruth;
39
40 std::vector<uint32_t>::const_iterator
iter = evt->
getMucTruth().begin();
41 std::vector<uint32_t>::const_iterator eiter = evt->
getMucTruth().end();
42
43 for (
int mucMcHitId = 0;
iter != eiter; mucMcHitId++ )
44 {
45
46 m_mucMcHitBuilder.unPack(
iter, eiter, m_MucTruth );
47
50
51 mucMcHit =
new MucMcHit( ident, m_MucTruth.
trackIndex % 1000,
52 m_MucTruth.
x / ( m_mucMcHitBuilder.m_xCoeff * 1.0 ),
53 m_MucTruth.
y / ( m_mucMcHitBuilder.m_yCoeff * 1.0 ),
54 m_MucTruth.
z / ( m_mucMcHitBuilder.m_zCoeff * 1.0 ),
55 m_MucTruth.
px / ( m_mucMcHitBuilder.m_pxCoeff * 1.0 ),
56 m_MucTruth.
py / ( m_mucMcHitBuilder.m_pyCoeff * 1.0 ),
57 m_MucTruth.
pz / ( m_mucMcHitBuilder.m_pzCoeff * 1.0 ) );
58
59 mucMcHitCol->push_back( mucMcHit );
60 }
61
62 return StatusCode::SUCCESS;
63 }
ObjectVector< MucMcHit > MucMcHitCol
static Identifier channel_id(int barrel_ec, int segment, int layer, int channel)
For a single crystal.
const int_vector & getMucTruth() const
IRawDataInputSvc * m_inputSvc
◆ createRep()
| StatusCode RawDataMucMcHitCnv::createRep |
( |
DataObject * | pObj, |
|
|
IOpaqueAddress *& | pAddr ) |
|
inline |
Definition at line 65 of file RawDataMucMcHitCnv.hpp.
65 {
66
67
68
70
71 if ( re == 0 )
72 {
73
74 return StatusCode::FAILURE;
75 }
76
78
79 if ( mcHitCol == 0 )
80 {
81
82 return StatusCode::FAILURE;
83 }
84
85 StatusCode sc = m_mucMcHitBuilder.pack( mcHitCol, re );
86
87 return sc;
88 }
eformat::write::FullEventFragment WriteRawEvent
IRawDataCnvSvc * m_cnvSvc
_EXTERN_ std::string MucMcHitCol
The documentation for this class was generated from the following file: