ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMonConfigCnv.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
6#include "TrigMonConfigCnv.h"
8
9//---------------------------------------------------------------------------------------------
12 m_log(new MsgStream(msgSvc(), "TrigMonConfigCnv")),
14{
15}
16
17//---------------------------------------------------------------------------------------------
23
24//---------------------------------------------------------------------------------------------
25//create persistent
27{
28 (*m_log) << MSG::DEBUG << "TrigMonConfigCnv::createPersistent" << endmsg;
29
30 TrigMonConfig_PERS *persObj = m_TPConverter->createPersistent(transObj, *m_log);
31 return persObj;
32}
33
34//---------------------------------------------------------------------------------------------
35//createTransient
37{
38 (*m_log) << MSG::DEBUG << "TrigMonConfigCnv::createTransient " << endmsg;
39
40 static const pool::Guid p1_guid("E841D3CA-AB5A-4955-850A-B368DE66A987");
41 TrigMonConfig *trans_obj(0);
42
43 if(compareClassGuid(p1_guid)) {
44
45 (*m_log) << MSG::DEBUG << "TrigMonConfigCnv::reading p1 persistent object" << endmsg;
46 std::unique_ptr< TrigMonConfig_p1 > col_vect( this->poolReadObject< TrigMonConfig_p1 >() );
47 trans_obj = m_TPConverter->createTransient( col_vect.get(), *m_log);
48 }
49 else {
50 throw std::runtime_error("Unsupported persistent version of TrigMonConfig");
51 }
52
53 return trans_obj;
54}
#define endmsg
TrigMonConfig_p1 TrigMonConfig_PERS
virtual bool compareClassGuid(const Guid &clid) const
Compatibility for old converter classes that don't get passed the key.
TrigMonConfigCnv_p1 * m_TPConverter
TrigMonConfigCnv(ISvcLocator *svcloc)
TrigMonConfig * createTransient()
TrigMonConfig_PERS * createPersistent(TrigMonConfig *transObj)
This class holds encoded ids for monitoring objects and helps to map these objects to trigger configu...