ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
EventTPCnv
src
EventStreamInfoCnv_p2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
10
11
#include "
EventInfo/EventStreamInfo.h
"
12
#include "
EventInfo/EventType.h
"
13
14
#include "
EventTPCnv/EventStreamInfoCnv_p2.h
"
15
#include "
EventTPCnv/EventTypeCnv_p1.h
"
16
17
static
const
EventTypeCnv_p1
typeConv
;
18
19
void
EventStreamInfoCnv_p2::persToTrans
(
const
EventStreamInfo_p2
* pers,
EventStreamInfo
* trans, MsgStream &log)
const
{
20
*trans =
EventStreamInfo
();
21
trans->
addEvent
(pers->
m_numberOfEvents
);
22
for
(
unsigned
int
rn : pers->
m_runNumbers
)
23
trans->
insertRunNumber
(rn);
24
for
(
unsigned
int
lbn : pers->
m_lumiBlockNumbers
)
25
trans->
insertLumiBlockNumber
(lbn);
26
for
(
const
std::string& tag : pers->
m_processingTags
)
27
trans->
insertProcessingTag
(tag);
28
for
(
const
std::pair<CLID, std::string>& p : pers->
m_itemList
)
29
trans->
insertItemList
(p.first, p.second);
30
for
(
const
EventType_p1
& ptype : pers->
m_eventTypes
)
31
{
32
std::unique_ptr<EventType> p (
typeConv
.createTransientConst(&ptype, log));
33
trans->
insertEventType
(*p);
34
}
35
}
36
37
void
EventStreamInfoCnv_p2::transToPers
(
const
EventStreamInfo
* trans,
EventStreamInfo_p2
* pers, MsgStream &log)
const
{
38
pers->
m_numberOfEvents
= trans->
getNumberOfEvents
();
39
40
pers->
m_runNumbers
.assign (trans->
getRunNumbers
().begin(),
41
trans->
getRunNumbers
().end());
42
43
pers->
m_lumiBlockNumbers
.assign (trans->
getLumiBlockNumbers
().begin(),
44
trans->
getLumiBlockNumbers
().end());
45
46
pers->
m_processingTags
.assign (trans->
getProcessingTags
().begin(),
47
trans->
getProcessingTags
().end());
48
49
pers->
m_itemList
.assign (trans->
getItemList
().begin(),
50
trans->
getItemList
().end());
51
52
pers->
m_eventTypes
.reserve(trans->
getEventTypes
().size());
53
pers->
m_eventTypes
.clear();
54
for
(
const
EventType
& ttype : trans->
getEventTypes
()) {
55
EventType_p1
ptype;
56
typeConv
.transToPers(&ttype, &ptype, log);
57
pers->
m_eventTypes
.push_back(std::move(ptype));
58
}
59
}
typeConv
static const EventTypeCnv_p1 typeConv
Definition
EventInfoCnv_p1.cxx:17
EventStreamInfoCnv_p2.h
This file contains the class definition for the EventStreamInfoCnv_p2 class.
EventStreamInfo.h
This file contains the class definition for the EventStreamInfo class.
EventStreamInfo
Athena::TPCnvVers::Old Athena::TPCnvVers::Current EventStreamInfo
Definition
EventTPCnv.cxx:67
EventTypeCnv_p1.h
EventType.h
This class provides general information about an event.
EventStreamInfoCnv_p2::persToTrans
virtual void persToTrans(const EventStreamInfo_p2 *persObj, EventStreamInfo *transObj, MsgStream &log) const override
Definition
EventStreamInfoCnv_p2.cxx:19
EventStreamInfoCnv_p2::transToPers
virtual void transToPers(const EventStreamInfo *transObj, EventStreamInfo_p2 *persObj, MsgStream &log) const override
Definition
EventStreamInfoCnv_p2.cxx:37
EventStreamInfo_p2
This class is the persistent representation of EventStreamInfo.
Definition
EventStreamInfo_p2.h:22
EventStreamInfo_p2::m_eventTypes
std::vector< EventType_p1 > m_eventTypes
Definition
EventStreamInfo_p2.h:44
EventStreamInfo_p2::m_numberOfEvents
unsigned int m_numberOfEvents
Definition
EventStreamInfo_p2.h:39
EventStreamInfo_p2::m_lumiBlockNumbers
std::vector< unsigned int > m_lumiBlockNumbers
Definition
EventStreamInfo_p2.h:41
EventStreamInfo_p2::m_processingTags
std::vector< std::string > m_processingTags
Definition
EventStreamInfo_p2.h:42
EventStreamInfo_p2::m_runNumbers
std::vector< unsigned int > m_runNumbers
Definition
EventStreamInfo_p2.h:40
EventStreamInfo_p2::m_itemList
std::vector< std::pair< unsigned int, std::string > > m_itemList
Definition
EventStreamInfo_p2.h:43
EventStreamInfo
This class provides the summary information stored for data written as a Event Stream.
Definition
EventStreamInfo.h:28
EventStreamInfo::getProcessingTags
const std::set< std::string > & getProcessingTags() const
Definition
EventStreamInfo.cxx:35
EventStreamInfo::getLumiBlockNumbers
const std::set< unsigned int > & getLumiBlockNumbers() const
Definition
EventStreamInfo.cxx:29
EventStreamInfo::insertEventType
void insertEventType(const EventType &event)
Insert new Event Type into a set.
Definition
EventStreamInfo.cxx:88
EventStreamInfo::insertLumiBlockNumber
void insertLumiBlockNumber(unsigned int lumiBlock)
Insert new Luminosity Block Number into a set.
Definition
EventStreamInfo.cxx:70
EventStreamInfo::getRunNumbers
const std::set< unsigned int > & getRunNumbers() const
Definition
EventStreamInfo.cxx:23
EventStreamInfo::insertRunNumber
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
Definition
EventStreamInfo.cxx:64
EventStreamInfo::addEvent
void addEvent(unsigned int number=1)
Increase Event Counter.
Definition
EventStreamInfo.cxx:53
EventStreamInfo::getEventTypes
const std::set< EventType > & getEventTypes() const
Definition
EventStreamInfo.cxx:47
EventStreamInfo::insertProcessingTag
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
Definition
EventStreamInfo.cxx:76
EventStreamInfo::getItemList
const std::set< std::pair< CLID, std::string > > & getItemList() const
Definition
EventStreamInfo.cxx:41
EventStreamInfo::insertItemList
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
Definition
EventStreamInfo.cxx:82
EventStreamInfo::getNumberOfEvents
unsigned int getNumberOfEvents() const
Definition
EventStreamInfo.cxx:17
EventTypeCnv_p1
Definition
EventTypeCnv_p1.h:13
EventType_p1
Definition
EventType_p1.h:17
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition
EventType.h:92
Generated on
for ATLAS Offline Software by
1.17.0