ATLAS Offline Software
Loading...
Searching...
No Matches
HLTResultCnv.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#ifndef XAOD_ANALYSIS
6
7#include "HLTResultCnv.h"
10
11HLTResultCnv::HLTResultCnv (ISvcLocator* svcloc) :
12 HLTResultCnvBase(svcloc),
13 m_TPConverter (new HLT::HLTResultCnv_p1)
14{}
15
20
21
22//create persistent
24{
25 MsgStream mlog(msgSvc(), "HLTResultConverter" );
26
27 HLTResult_PERS* persObj = m_TPConverter->createPersistent( transCont, mlog );
28
29 return persObj;
30}
31
32//create transient
34{
35 MsgStream mlog(msgSvc(), "HLTResultConverter" );
36
37 static const pool::Guid p1_guid("9567573D-F35E-4D5E-9A1A-A43B07D3CF3B");
38 static const pool::Guid p0_guid("559D6CB9-9A54-4284-A03D-9C745352281D");
39
40 if ( compareClassGuid(p1_guid) ) {
41 // using unique_ptr ensures deletion of the persistent object
42 std::unique_ptr< HLT::HLTResult_p1 > col_vect( poolReadObject< HLT::HLTResult_p1 >() );
43 return m_TPConverter->createTransient( col_vect.get(), mlog );
44 }
45
46 else if( compareClassGuid(p0_guid) ){
47 // old version from before TP separation, just return it
48 return this->poolReadObject<HLT::HLTResult>();
49 }
50
51 throw std::runtime_error("Unsupported persistent version of HLTResult");
52}
53
54#endif
HLT::HLTResult_p1 HLTResult_PERS
T_AthenaPoolCustomCnv< HLT::HLTResult, HLTResult_PERS > HLTResultCnvBase
virtual HLT::HLTResult * createTransient()
HLT::HLTResultCnv_p1 * m_TPConverter
virtual HLTResult_PERS * createPersistent(HLT::HLTResult *transCont)
HLTResultCnv(ISvcLocator *svcloc)
HLT::HLTResult is sumarising result of trigger decision evaluation (online/offline) It contains basic...
Definition HLTResult.h:51
virtual bool compareClassGuid(const Guid &clid) const
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...