ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigEvent
TrigParticleTPCnv
TrigParticleTPCnv
TrigL2BphysContainerCnv_p1.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/**********************************************************************************
6
* @Project: Trigger
7
* @Package: TrigParticleTPCnv
8
* @class : TrigL2BphysContainerCnv_p1
9
*
10
* @brief transient persistent converter for TrigL2BphysContainer
11
*
12
* @author Andrew Hamilton <Andrew.Hamilton@cern.ch> - U. Geneva
13
* @author Francesca Bucci <F.Bucci@cern.ch> - U. Geneva
14
*
15
* File and Version Information:
16
* $Id: TrigL2BphysContainerCnv_p1.h,v 1.2 2009-04-01 22:13:30 salvator Exp $
17
* $Id: TrigL2BphysContainerCnv_p1.h,v 1.3 2010-08-11 demelian Exp $
18
**********************************************************************************/
19
#ifndef TTRIGPARTICLETPCNV_RIGL2BPHYSCONTAINER_CNV_P1_H
20
#define TTRIGPARTICLETPCNV_RIGL2BPHYSCONTAINER_CNV_P1_H
21
22
#include "
AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
"
23
24
//#include "TrigParticleTPCnv/TrigL2BphysCnv_p2.h"
25
#include "
TrigParticle/TrigL2BphysContainer.h
"
26
#include "
TrigParticleTPCnv/TrigL2BphysContainer_p1.h
"
27
28
class
TrigL2BphysContainerCnv_p1
:
public
T_AthenaPoolTPPtrVectorCnv
< TrigL2BphysContainer, TrigL2BphysContainer_p1, ITPConverterFor<TrigL2Bphys> >
29
{
30
31
public
:
32
TrigL2BphysContainerCnv_p1
() {}
33
34
//this part is implemented in T_AthenaPoolTPConverter.h.
35
//It is here temporarily to override and allow some extra debugging
36
virtual
void
persToTrans
(
const
TrigL2BphysContainer_p1
* persVect,
TrigL2BphysContainer
* transVect, MsgStream &log) {
37
log << MSG::DEBUG <<
"TrigL2BphysContainerCnv::persToTrans"
<<
endmsg
;
38
if
(persVect){
39
transVect->
clear
();
40
transVect->
reserve
( persVect->size() );
41
// convert vector entries one by one
42
for
( TrigL2BphysContainer_p1::const_iterator
43
it = persVect->begin(),
44
iEnd = persVect->end();
45
it != iEnd; ++it ) {
46
TrigL2Bphys
*p =
createTransFromPStore
( &
m_elementCnv
, *it, log );
47
transVect->
push_back
( p);
48
if
(!p)
49
log << MSG::WARNING <<
"TrigL2BphysContainerCnv::persToTrans failed for an element "
<<
endmsg
;
50
}
51
}
else
{
52
log << MSG::WARNING <<
"TrigL2BphysContainerCnv::persToTrans cannot convert NULL persVect"
<<
endmsg
;
53
}
54
}
55
56
57
virtual
void
transToPers
(
const
TrigL2BphysContainer
* transVect,
TrigL2BphysContainer_p1
* persVect, MsgStream &log) {
58
persVect->clear();
59
persVect->reserve( transVect->
size
() );
60
// convert vector entries one by one
61
for
(
TrigL2BphysContainer::const_iterator
62
it = transVect->
begin
(),
63
iEnd = transVect->
end
();
64
it != iEnd;
65
++it ) {
66
TPObjRef
a
=
toPersistent
( &
m_elementCnv
, *it, log );
67
persVect->push_back(
a
);
68
if
(
a
.isNull()){
69
log << MSG::WARNING <<
"TrigL2BphysContainerCnv::transToPers failed for an element "
<< *it <<
" "
70
<<
m_elementCnv
<<
endmsg
;
71
72
}
73
}
74
}
75
76
};
//end of class definitions
77
78
#endif
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
a
static Double_t a
Definition
LArPhysWaveHECTool.cxx:38
T_AthenaPoolTPConverter.h
T_AthenaPoolTPPtrVectorCnv
TPPtrVectorCnv< TRANS, PERS, CONV > T_AthenaPoolTPPtrVectorCnv
Definition
T_AthenaPoolTPConverter.h:51
TrigL2BphysContainer.h
TrigL2BphysContainer_p1.h
DataVector< TrigL2Bphys >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
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::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::clear
void clear()
Erase all the elements in the collection.
TPPolyCnvBase< TRANS, TRANS, PERS >::createTransFromPStore
CNV::Trans_t * createTransFromPStore(CNV **cnv, const TPObjRef &ref, MsgStream &log) const
Definition
TPConverter.h:172
TPPolyCnvBase< TRANS, TRANS, PERS >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
TPObjRef
This class is an object reference used in Athena persistent data model.
Definition
TPObjRef.h:20
TPPtrVectorCnv::m_elementCnv
CONV * m_elementCnv
pointer to the TP converter used for vector elements
Definition
TPConverter.h:963
TrigL2BphysContainerCnv_p1::transToPers
virtual void transToPers(const TrigL2BphysContainer *transVect, TrigL2BphysContainer_p1 *persVect, MsgStream &log)
Definition
TrigL2BphysContainerCnv_p1.h:57
TrigL2BphysContainerCnv_p1::TrigL2BphysContainerCnv_p1
TrigL2BphysContainerCnv_p1()
Definition
TrigL2BphysContainerCnv_p1.h:32
TrigL2BphysContainerCnv_p1::persToTrans
virtual void persToTrans(const TrigL2BphysContainer_p1 *persVect, TrigL2BphysContainer *transVect, MsgStream &log)
Definition
TrigL2BphysContainerCnv_p1.h:36
TrigL2BphysContainer_p1
Definition
TrigL2BphysContainer_p1.h:25
TrigL2BphysContainer
Definition
TrigL2BphysContainer.h:33
TrigL2Bphys
Definition
TrigL2Bphys.h:43
Generated on
for ATLAS Offline Software by
1.17.0