ATLAS Offline Software
Loading...
Searching...
No Matches
EventStreamInfoCnv_p1.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
12#include "EventInfo/EventType.h"
13
16
18
19void EventStreamInfoCnv_p1::persToTrans(const EventStreamInfo_p1* 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
37void EventStreamInfoCnv_p1::transToPers(const EventStreamInfo* trans, EventStreamInfo_p1* pers, MsgStream &log) const {
38 pers->m_numberOfEvents = trans->getNumberOfEvents();
39 pers->m_runNumbers = trans->getRunNumbers();
41 pers->m_processingTags = trans->getProcessingTags();
42 pers->m_itemList = trans->getItemList();
43 pers->m_eventTypes.clear();
44 for (const EventType& ttype : trans->getEventTypes())
45 {
46 EventType_p1 ptype;
47 typeConv.transToPers(&ttype, &ptype, log);
48 pers->m_eventTypes.insert(std::move(ptype));
49 }
50}
static const EventTypeCnv_p1 typeConv
This file contains the class definition for the EventStreamInfoCnv_p1 class.
This file contains the class definition for the EventStreamInfo class.
Athena::TPCnvVers::Old Athena::TPCnvVers::Current EventStreamInfo
This class provides general information about an event.
virtual void persToTrans(const EventStreamInfo_p1 *persObj, EventStreamInfo *transObj, MsgStream &log) const override
virtual void transToPers(const EventStreamInfo *transObj, EventStreamInfo_p1 *persObj, MsgStream &log) const override
This class is the persistent representation of EventStreamInfo.
std::set< EventType_p1 > m_eventTypes
std::set< std::string > m_processingTags
unsigned int m_numberOfEvents
std::set< std::pair< unsigned int, std::string > > m_itemList
std::set< unsigned int > m_lumiBlockNumbers
std::set< unsigned int > m_runNumbers
This class provides the summary information stored for data written as a Event Stream.
const std::set< std::string > & getProcessingTags() const
const std::set< unsigned int > & getLumiBlockNumbers() const
void insertEventType(const EventType &event)
Insert new Event Type into a set.
void insertLumiBlockNumber(unsigned int lumiBlock)
Insert new Luminosity Block Number into a set.
const std::set< unsigned int > & getRunNumbers() const
void insertRunNumber(unsigned int run)
Insert new Run Number into a set.
void addEvent(unsigned int number=1)
Increase Event Counter.
const std::set< EventType > & getEventTypes() const
void insertProcessingTag(const std::string &process)
Insert new Processing Tag into a set.
const std::set< std::pair< CLID, std::string > > & getItemList() const
void insertItemList(CLID type, const std::string &key)
Insert new ItemList Entry into a set.
unsigned int getNumberOfEvents() const
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition EventType.h:92