ATLAS Offline Software
Loading...
Searching...
No Matches
LArSingleFloatConverter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5//Dear emacs, this is -*-c++-*-
12
13#ifndef LARCONDTPCNV_LARSINGLEFLOATCNV_H
14#define LARCONDTPCNV_LARSINGLEFLOATCNV_H
15
19
20template<class TransientClass>
22 public T_AthenaPoolCoolMultChanCnv<TransientClass, LArConditionsSubset<LArSingleFloatP>, LArSingleFloatSubset_p1> {
23 friend class CnvFactory<LArSingleFloatConverter<TransientClass> >;
24
25protected:
26 typedef T_AthenaPoolCoolMultChanCnv< TransientClass,
27 LArConditionsSubset < LArSingleFloatP > ,
29
30 LArSingleFloatConverter (ISvcLocator* svcloc) : cnvBase(svcloc) {};
32
35
38
39
40 private:
42};
43
44template<class TransientClass>
46 MsgStream log(this->msgSvc(), "LArSingleFloatConverter" );
47 LArSingleFloatSubset_p1* persObj = m_TPconverter.createPersistent( transObj, log );
48 return persObj;
49}
50
51template<class TransientClass>
53 static const pool::Guid p1_guid("85C3E380-4F5C-4F2B-81F0-D7C08A446800");
54 if(this->compareClassGuid(p1_guid) ) {
55 MsgStream log(this->msgSvc(), "LArSingleFloatCompleteCnv" );
58 if(this->poolToObject(this->m_i_poolToken,p).isFailure() ) { // Token is passed via pointer member
59 throw std::runtime_error("POOL read failed");
60 }
61 t=m_TPconverter.createTransient(p,log);
62 delete p;
63 return t;
64 }
65 return NULL;
66}
67
68template<class TransientClass>
71 if (p) return p;
72 throw std::runtime_error("Unsupported persistent version of LArConditionsSubset<LArSingleFloat>");
73}
74
75#endif
76
This templated class provides the POOL converter to translate a DataVector<T> to and from a CondAttrL...
Abstract factory to create the converter.
template class for use for I/O of conditions data
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat()
returns NULL if object is not a LArConditionsSubset<LArSingleFloatP>
virtual LArSingleFloatSubset_p1 * createPersistent(LArConditionsSubset< LArSingleFloatP > *transObj)
method to be implemented by the developer.
T_AthenaPoolCoolMultChanCnv< LArDAC2uAComplete, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 > cnvBase
virtual LArConditionsSubset< LArSingleFloatP > * createTransient()
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>
LArSingleFloatConverter(ISvcLocator *svcloc)
persistent class container of LArConditionsSubset for LArSingleFloat data.