ATLAS Offline Software
Loading...
Searching...
No Matches
TrigHisto1DCnv.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#include "TrigHisto1DCnv.h"
7
8TrigHisto1DCnv::TrigHisto1DCnv(ISvcLocator* svcloc): TrigHisto1DCnvBase(svcloc) {}
10
12 MsgStream mlog(msgSvc(), "TrigHisto1DConverter" );
13 mlog << MSG::DEBUG << "TrigHisto1DCnv::createPersistent" << endmsg;
14
15 TrigHisto1DCnv_p1 converter;
16 TrigHisto1D_p1 *persObj = converter.createPersistent( transObj, mlog );
17
18 return persObj;
19}
20
22 MsgStream mlog(msgSvc(), "TrigHisto1DConverter" );
23 mlog << MSG::DEBUG << "TrigHisto1DCnv::createTransient " << endmsg;
24
25 static const pool::Guid p1_guid("C304621E-2266-4863-9B47-7C3450B00399");
26
27 TrigHisto1D *transObj = 0;
28
29 if( compareClassGuid(p1_guid) ) {
30 mlog << MSG::DEBUG << "TrigHisto1DCnv::reading p1 persistent object" << endmsg;
31 std::unique_ptr<TrigHisto1D_p1> pers_ptr( poolReadObject<TrigHisto1D_p1>() );
32 TrigHisto1DCnv_p1 converter;
33 transObj = converter.createTransient(pers_ptr.get(), mlog);
34 }
35 else {
36 throw std::runtime_error("Unsupported persistent version of Data container");
37 }
38
39 return transObj;
40}
#define endmsg
T_AthenaPoolCustomCnv< TrigHisto1D, TrigHisto1D_PERS > TrigHisto1DCnvBase
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
virtual bool compareClassGuid(const Guid &clid) const
TrigHisto1D * createTransient()
TrigHisto1DCnv(ISvcLocator *svcloc)
TrigHisto1D_PERS * createPersistent(TrigHisto1D *transObj)
The persistent partner of TrigHisto1D class.
A very basic one dimensional histogram to provide storage of HLT distributions, allowing constraints ...
Definition TrigHisto1D.h:23