ATLAS Offline Software
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 //---------------------------------------------------------------------------------------------
10 TrigMonConfigCnv::TrigMonConfigCnv(ISvcLocator* svcloc) :
12  m_log(new MsgStream(msgSvc(), "TrigMonConfigCnv")),
13  m_TPConverter (new TrigMonConfigCnv_p1)
14 {
15 }
16 
17 //---------------------------------------------------------------------------------------------
19 {
20  delete m_log;
21  delete m_TPConverter;
22 }
23 
24 //---------------------------------------------------------------------------------------------
25 //create persistent
27 {
28  (*m_log) << MSG::DEBUG << "TrigMonConfigCnv::createPersistent" << endmsg;
29 
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 }
TrigMonConfigCnv_p1.h
TrigMonConfigCnv.h
TrigMonConfigCnv::createTransient
TrigMonConfig * createTransient()
Definition: TrigMonConfigCnv.cxx:36
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigMonConfigCnv::~TrigMonConfigCnv
virtual ~TrigMonConfigCnv()
Definition: TrigMonConfigCnv.cxx:18
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigMonConfigCnv::TrigMonConfigCnv
TrigMonConfigCnv(ISvcLocator *svcloc)
Definition: TrigMonConfigCnv.cxx:10
TrigMonConfigCnv_p1
Definition: TrigMonConfigCnv_p1.h:22
TrigMonConfigCnv::m_TPConverter
TrigMonConfigCnv_p1 * m_TPConverter
Definition: TrigMonConfigCnv.h:35
TrigMonConfig
This class holds encoded ids for monitoring objects and helps to map these objects to trigger configu...
Definition: TrigMonConfig.h:29
TrigMonConfig_p1
Definition: TrigMonConfig_p1.h:23
TrigMonConfigCnv::createPersistent
TrigMonConfig_PERS * createPersistent(TrigMonConfig *transObj)
Definition: TrigMonConfigCnv.cxx:26
DEBUG
#define DEBUG
Definition: page_access.h:11
T_AthenaPoolCustCnv< TrigMonConfig, TrigMonConfig_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
TrigMonConfigCnv::m_log
MsgStream * m_log
Definition: TrigMonConfigCnv.h:34