ATLAS Offline Software
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>
16 #include "CxxUtils/copy_bounded.h"
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,
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 }
TrackTruthCollectionAccessor::numPRDs
static unsigned char * numPRDs(SubDetHitStatistics *stat)
Definition: TrackTruthCollectionAccessor.h:48
SubDetHitStatistics::NUM_SUBDETECTORS
@ NUM_SUBDETECTORS
Definition: SubDetHitStatistics.h:74
SubDetHitStatistics
Definition: SubDetHitStatistics.h:34
Trk::SubDetHitStatistics_p0
Definition: SubDetHitStatistics_p0.h:17
copy_bounded.h
Copy a range with bounds restriction.
Trk::SubDetHitStatistics_p0::numPRDs
unsigned char numPRDs[SubDetHitStatistics::NUM_SUBDETECTORS]
Definition: SubDetHitStatistics_p0.h:20
SubDetHitStatisticsCnv_p0::transToPers
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...
Definition: SubDetHitStatisticsCnv_p0.cxx:34
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ARY_SIZE
#define ARY_SIZE(x)
Definition: SubDetHitStatisticsCnv_p0.cxx:18
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
SubDetHitStatisticsCnv_p0.h
SubDetHitStatistics.h
TrackTruthCollectionAccessor.h
CxxUtils::copy_bounded
auto copy_bounded(const InputRange &input, OutputRange &output) -> decltype(std::begin(output))
Copy a range with bounds restriction.
Definition: copy_bounded.h:102
SubDetHitStatisticsCnv_p0::persToTrans
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...
Definition: SubDetHitStatisticsCnv_p0.cxx:21
SubDetHitStatistics_p0.h