ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMonEventCnv.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
6#include "TrigMonEventCnv.h"
8
9//---------------------------------------------------------------------------------------------
12 m_log(new MsgStream(msgSvc(), "TrigMonEventCnv")),
14{
15}
16
17//---------------------------------------------------------------------------------------------
23
24//---------------------------------------------------------------------------------------------
25//create persistent
27{
28 (*m_log) << MSG::DEBUG << "TrigMonEventCnv::createPersistent" << endmsg;
29
30 TrigMonEvent_PERS *persObj = m_TPConverter->createPersistent(transObj, *m_log);
31 return persObj;
32}
33
34//---------------------------------------------------------------------------------------------
35//createTransient
37{
38 (*m_log) << MSG::DEBUG << "TrigMonEventCnv::createTransient " << endmsg;
39
40 static const pool::Guid p1_guid("AECD5837-E8DA-4FF3-8601-44B4C17355ED");
41 TrigMonEvent *trans_obj(0);
42
43 if( compareClassGuid(p1_guid) ) {
44
45 (*m_log) << MSG::DEBUG << "TrigMonEventCnv::reading p1 persistent object" << endmsg;
46 std::unique_ptr< TrigMonEvent_p1 > col_vect( this->poolReadObject< TrigMonEvent_p1 >());
47 trans_obj = m_TPConverter->createTransient( col_vect.get(), *m_log);
48 }
49 else {
50 throw std::runtime_error("Unsupported persistent version of TrigMonEvent");
51 }
52
53 return trans_obj;
54}
#define endmsg
TrigMonEvent_p1 TrigMonEvent_PERS
virtual bool compareClassGuid(const Guid &clid) const
Compatibility for old converter classes that don't get passed the key.
MsgStream * m_log
TrigMonEvent_PERS * createPersistent(TrigMonEvent *transObj)
TrigMonEventCnv(ISvcLocator *svcloc)
virtual ~TrigMonEventCnv()
TrigMonEventCnv_p1 * m_TPConverter
TrigMonEvent * createTransient()