ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ZDC
ZdcCnv
ZdcEventTPCnv
src
ZdcRawChannelCollectionCnv_p1.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
#include "
ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h
"
6
#include "GaudiKernel/MsgStream.h"
7
8
static
const
ZdcRawChannelCnv_p1
rawchannelConv
;
9
10
void
ZdcRawChannelCollectionCnv_p1::transToPers
(
const
ZdcRawChannelCollection
* transObj,
ZdcRawChannelCollection_p1
* persObj, MsgStream& log)
const
{
11
12
persObj->resize(transObj->
size
());
13
14
for
(
unsigned
int
i=0; i<transObj->
size
(); ++i) {
15
16
ZdcRawChannel_p1
& rawchannel = (*persObj)[i];
17
18
rawchannelConv
.transToPers((*transObj)[i], &rawchannel, log);
19
}
20
}
21
22
void
ZdcRawChannelCollectionCnv_p1::persToTrans
(
const
ZdcRawChannelCollection_p1
* persObj,
ZdcRawChannelCollection
* transObj, MsgStream& log)
const
{
23
24
//log << MSG::INFO << " size = " << persObj->size() << endmsg;
25
26
transObj->
reserve
(persObj->size());
27
28
for
(
unsigned
int
i=0; i<persObj->size(); ++i) {
29
30
//log << MSG::INFO << " i = " << i << endmsg;
31
const
ZdcRawChannel_p1
* rawchannel = &((*persObj)[i]);
32
33
transObj->
push_back
(
rawchannelConv
.createTransientConst(rawchannel,log));
34
}
35
}
rawchannelConv
static const ZdcRawChannelCnv_p1 rawchannelConv
Definition
ZdcRawChannelCollectionCnv_p1.cxx:8
ZdcRawChannelCollectionCnv_p1.h
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
ZdcRawChannelCnv_p1
Definition
ZdcRawChannelCnv_p1.h:26
ZdcRawChannelCollectionCnv_p1::persToTrans
virtual void persToTrans(const ZdcRawChannelCollection_p1 *persObj, ZdcRawChannelCollection *transObj, MsgStream &log) const override
Definition
ZdcRawChannelCollectionCnv_p1.cxx:22
ZdcRawChannelCollectionCnv_p1::transToPers
virtual void transToPers(const ZdcRawChannelCollection *transObj, ZdcRawChannelCollection_p1 *persObj, MsgStream &log) const override
Definition
ZdcRawChannelCollectionCnv_p1.cxx:10
ZdcRawChannelCollection_p1
Definition
ZdcRawChannelCollection_p1.h:19
ZdcRawChannelCollection
Definition
ZdcRawChannelCollection.h:20
ZdcRawChannel_p1
Definition
ZdcRawChannel_p1.h:20
Generated on
for ATLAS Offline Software by
1.17.0