ATLAS Offline Software
Loading...
Searching...
No Matches
SubDetHitStatisticsCnv_p0.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5// T/P converter for SubDetHitStatistics.
6
7// Andrei Gaponenko <agaponenko@lbl.gov>, 2007
8
12
14
15#include <algorithm>
17
18#define ARY_SIZE(x) (sizeof(x)/sizeof(x[0]))
19
20
22 SubDetHitStatistics* trans,
23 MsgStream& /*msg*/ ) const
24{
25 unsigned char *phits(TrackTruthCollectionAccessor::numPRDs(trans));
26 unsigned char* p =
28 pers->numPRDs + ARY_SIZE(pers->numPRDs),
29 phits,
31 std::fill (p, phits + SubDetHitStatistics::NUM_SUBDETECTORS, 0);
32}
33
36 MsgStream& /*msg*/ ) const
37{
38 const unsigned char *phits(TrackTruthCollectionAccessor::numPRDs(trans));
39 unsigned char* p =
42 pers->numPRDs,
43 pers->numPRDs + ARY_SIZE(pers->numPRDs));
44 std::fill (p, pers->numPRDs + ARY_SIZE(pers->numPRDs), 0);
45}
#define ARY_SIZE(x)
A struture to keep per-subdetector numbers of hits for truth matching.
virtual void transToPers(const SubDetHitStatistics *transObj, Trk::SubDetHitStatistics_p0 *persObj, MsgStream &msg) const override
Method creating the persistent representation SubDetHitStatistics_p0 from its transient representatio...
virtual void persToTrans(const Trk::SubDetHitStatistics_p0 *persObj, SubDetHitStatistics *transObj, MsgStream &msg) const override
Method creating the transient representation of Analysis::SubDetHitStatistics from its persistent rep...
static unsigned char * numPRDs(SubDetHitStatistics *stat)
unsigned char numPRDs[SubDetHitStatistics::NUM_SUBDETECTORS]
Copy a range with bounds restriction.
OutputIterator copy_bounded(InputIterator begi, InputIterator endi, OutputIterator bego, OutputIterator endo)
Copy a range with bounds restriction.