ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ALFA
ALFA_EventCnv
ALFA_EventTPCnv
src
ALFA_DigitCollectionCnv_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 "
ALFA_EventTPCnv/ALFA_DigitCollectionCnv_p1.h
"
6
#include "GaudiKernel/MsgStream.h"
7
8
static
const
ALFA_DigitCnv_p1
digitConv
;
9
10
void
ALFA_DigitCollectionCnv_p1::transToPers
(
const
ALFA_DigitCollection
* transObj,
ALFA_DigitCollection_p1
* persObj, MsgStream& log)
const
{
11
12
persObj->resize(transObj->
size
());
13
14
for
(
unsigned
int
i=0; i<transObj->
size
(); ++i) {
15
16
ALFA_Digit_p1
& digit = (*persObj)[i];
17
18
digitConv
.transToPers((*transObj)[i], &digit, log);
19
}
20
}
21
22
void
ALFA_DigitCollectionCnv_p1::persToTrans
(
const
ALFA_DigitCollection_p1
* persObj,
ALFA_DigitCollection
* transObj, MsgStream& log)
const
{
23
24
transObj->
reserve
(persObj->size());
25
26
for
(
unsigned
int
i=0; i<persObj->size(); ++i) {
27
28
const
ALFA_Digit_p1
* digit = &((*persObj)[i]);
29
30
transObj->
push_back
(
digitConv
.createTransientConst(digit, log));
31
}
32
}
digitConv
static const ALFA_DigitCnv_p1 digitConv
Definition
ALFA_DigitCollectionCnv_p1.cxx:8
ALFA_DigitCollectionCnv_p1.h
ALFA_DigitCnv_p1
Definition
ALFA_DigitCnv_p1.h:17
ALFA_DigitCollectionCnv_p1::persToTrans
virtual void persToTrans(const ALFA_DigitCollection_p1 *persObj, ALFA_DigitCollection *transObj, MsgStream &log) const override
Definition
ALFA_DigitCollectionCnv_p1.cxx:22
ALFA_DigitCollectionCnv_p1::transToPers
virtual void transToPers(const ALFA_DigitCollection *transObj, ALFA_DigitCollection_p1 *persObj, MsgStream &log) const override
Definition
ALFA_DigitCollectionCnv_p1.cxx:10
ALFA_DigitCollection_p1
Definition
ALFA_DigitCollection_p1.h:55
ALFA_DigitCollection
Definition
ALFA_DigitCollection.h:15
ALFA_Digit_p1
Definition
ALFA_Digit_p1.h:12
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.
Generated on
for ATLAS Offline Software by
1.17.0