ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
EventTPCnv
src
PileUpEventInfoCnv_p5.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
EventInfo/PileUpEventInfo.h
"
6
#include "
EventTPCnv/PileUpEventInfoCnv_p5.h
"
7
#include "
EventTPCnv/EventInfoCnv_p4.h
"
8
9
static
const
EventInfoCnv_p4
evInfoConv
;
10
11
void
PileUpEventInfoCnv_p5::transToPers
(
const
PileUpEventInfo
* trans,
PileUpEventInfo_p5
* pers, MsgStream &log)
const
{
12
evInfoConv
.transToPers(trans, pers, log);
13
14
pers->
m_subEvents
.clear();
15
/*
16
size_t sub_ev_n = trans->m_subEvents.size();
17
pers->m_subEvents.resize(sub_ev_n);
18
PileUpEventInfo::SubEvent::const_iterator sub_iter = trans->beginSubEvt();
19
PileUpEventInfo_p5::SubEvVect_t::iterator p_sub_iter = pers->m_subEvents.begin();
20
size_t sub_ev_n = std::distance (sub_iter, trans->endSubEvt());
21
pers->m_subEvents.resize(sub_ev_n);
22
while( sub_iter!=trans->endSubEvt() ) {
23
p_sub_iter->m_time = sub_iter->time();
24
p_sub_iter->m_index = sub_iter->index();
25
p_sub_iter->m_type = static_cast<short>(sub_iter->type());
26
evInfoConv.transToPers(sub_iter->pSubEvt, &p_sub_iter->m_subEventInfo, log);
27
p_sub_iter++; sub_iter++;
28
}
29
*/
30
}
31
32
void
PileUpEventInfoCnv_p5::persToTrans
(
const
PileUpEventInfo_p5
* pers,
PileUpEventInfo
* trans, MsgStream &log)
const
33
{
34
*trans =
PileUpEventInfo
();
35
evInfoConv
.persToTrans(pers, trans, log);
36
37
PileUpEventInfo_p5::SubEvVect_t::const_iterator p_sub_iter = pers->
m_subEvents
.begin();
38
while
( p_sub_iter != pers->
m_subEvents
.end() ) {
39
trans->
addSubEvt
(p_sub_iter->m_time,
40
//p_sub_iter->m_index,
41
static_cast<
PileUpTimeEventIndex::PileUpType
>
(p_sub_iter->m_type),
42
std::unique_ptr<EventInfo>
43
(
evInfoConv
.createTransientConst(&p_sub_iter->m_subEventInfo, log)),
44
nullptr
);
45
++p_sub_iter;
46
}
47
}
EventInfoCnv_p4.h
PileUpEventInfo
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old PileUpEventInfo
Definition
EventTPCnv.cxx:87
evInfoConv
static const EventInfoCnv_p1 evInfoConv
Definition
PileUpEventInfoCnv_p1.cxx:9
PileUpEventInfoCnv_p5.h
PileUpEventInfo.h
This class provides information about an overlaid event.
EventInfoCnv_p4
Definition
EventInfoCnv_p4.h:13
PileUpEventInfoCnv_p5::persToTrans
virtual void persToTrans(const PileUpEventInfo_p5 *persObj, PileUpEventInfo *transObj, MsgStream &log) const override
Definition
PileUpEventInfoCnv_p5.cxx:32
PileUpEventInfoCnv_p5::transToPers
virtual void transToPers(const PileUpEventInfo *transObj, PileUpEventInfo_p5 *persObj, MsgStream &log) const override
Definition
PileUpEventInfoCnv_p5.cxx:11
PileUpEventInfo_p5
Definition
PileUpEventInfo_p5.h:20
PileUpEventInfo_p5::m_subEvents
SubEvVect_t m_subEvents
Definition
PileUpEventInfo_p5.h:34
PileUpEventInfo
This class provides information about an overlaid event.
Definition
PileUpEventInfo.h:38
PileUpEventInfo::addSubEvt
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
Definition
PileUpEventInfo.h:110
PileUpTimeEventIndex::PileUpType
PileUpType
Definition
PileUpTimeEventIndex.h:14
Generated on
for ATLAS Offline Software by
1.17.0