ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMonEventCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5
9
16
17//---------------------------------------------------------------------------------------------
20 m_log(new MsgStream(msgSvc(), "TrigMonEventCollectionCnv")),
22{
23}
24
25//---------------------------------------------------------------------------------------------
31
32//---------------------------------------------------------------------------------------------
33//create persistent
35{
36 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::createPersistent" << endmsg;
37
38 TrigMonEventCollection_PERS *persObj = m_impl->m_TPConverter_tlp1.createPersistent(transObj, *m_log);
39 return persObj;
40}
41
42//---------------------------------------------------------------------------------------------
43//createTransient
45{
46 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::createTransient " << endmsg;
47
48 static const pool::Guid tlp1_guid("F224B21A-0CE8-40F1-B88B-027DA832A2A5");
49 static const pool::Guid p1_guid("9A0D41EB-9A40-42A1-8CDA-C80845FC7271");
50
51 TrigMonEventCollection *trans_obj(0);
52
53 if( compareClassGuid(tlp1_guid) ) {
54
55 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::reading tlp1 persistent object" << endmsg;
56 std::unique_ptr< TrigMonEventCollection_tlp1 > col_vect( this->poolReadObject< TrigMonEventCollection_tlp1 >() );
57 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::reading tlp1 persistent object pointer" << col_vect.get() << endmsg;
58 trans_obj = m_impl->m_TPConverter_tlp1.createTransient(col_vect.get(), *m_log);
59 }
60 else if( compareClassGuid(p1_guid) ) {
61
62 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::reading p1 persistent object" << endmsg;
63 std::unique_ptr< TrigMonEventCollection_p1 > col_vect( this->poolReadObject< TrigMonEventCollection_p1 >() );
64 (*m_log) << MSG::DEBUG << "TrigMonEventCollectionCnv::reading p1 persistent object pointer" << col_vect.get() << endmsg;
65 trans_obj = m_impl->m_TPConverter.createTransient(col_vect.get(), *m_log);
66 }
67 else {
68 throw std::runtime_error("Unsupported persistent version of TrigMonEventCollection");
69 }
70
71 return trans_obj;
72}
#define endmsg
TrigMonEventCollection_tlp1 TrigMonEventCollection_PERS
Compatibility for old converter classes that don't get passed the key.
TrigMonEventCollectionCnv_p1 m_TPConverter
TrigMonEventCollectionCnv_tlp1 m_TPConverter_tlp1
TrigMonEventCollectionCnv_impl * m_impl
TrigMonEventCollection_PERS * createPersistent(TrigMonEventCollection *transObj)
TrigMonEventCollection * createTransient()
TrigMonEventCollectionCnv(ISvcLocator *svcloc)