ATLAS Offline Software
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++-*-
13 #ifndef LARCONDTPCNV_LARSINGLEFLOATCNV_H
14 #define LARCONDTPCNV_LARSINGLEFLOATCNV_H
15 
19 
20 template<class TransientClass>
22  public T_AthenaPoolCoolMultChanCnv<TransientClass, LArConditionsSubset<LArSingleFloatP>, LArSingleFloatSubset_p1> {
23  friend class CnvFactory<LArSingleFloatConverter<TransientClass> >;
24 
25 protected:
26  typedef T_AthenaPoolCoolMultChanCnv< TransientClass,
29 
30  LArSingleFloatConverter (ISvcLocator* svcloc) : cnvBase(svcloc) {};
32 
35 
38 
39 
40  private:
42 };
43 
44 template<class TransientClass>
46  MsgStream log(this->msgSvc(), "LArSingleFloatConverter" );
47  LArSingleFloatSubset_p1* persObj = m_TPconverter.createPersistent( transObj, log );
48  return persObj;
49 }
50 
51 template<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 
68 template<class TransientClass>
70  LArConditionsSubset<LArSingleFloatP>* p=createTransientSingleFloat();
71  if (p) return p;
72  throw std::runtime_error("Unsupported persistent version of LArConditionsSubset<LArSingleFloat>");
73 }
74 
75 #endif
76 
LArSingleFloatConverter
Definition: LArSingleFloatConverter.h:22
LArSingleFloatP.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArSingleFloatConverter::createTransient
virtual LArConditionsSubset< LArSingleFloatP > * createTransient()
Throws and exception if object is not a LArConditionsSubset<LArSingleFloatP>
Definition: LArSingleFloatConverter.h:69
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
LArSingleFloatConverter::LArSingleFloatConverter
LArSingleFloatConverter(ISvcLocator *svcloc)
Definition: LArSingleFloatConverter.h:30
LArSingleFloatSubsetCnv_p1.h
T_AthenaPoolCoolMultChanCnv.h
This templated class provides the POOL converter to translate a DataVector<T> to and from a CondAttrL...
CnvFactory
Abstract factory to create the converter.
Definition: ToyConverter.h:16
LArSingleFloatConverter::m_TPconverter
LArSingleFloatSubsetCnv_p1 m_TPconverter
Definition: LArSingleFloatConverter.h:41
LArSingleFloatConverter::createPersistent
virtual LArSingleFloatSubset_p1 * createPersistent(LArConditionsSubset< LArSingleFloatP > *transObj)
method to be implemented by the developer.
Definition: LArSingleFloatConverter.h:45
LArSingleFloatConverter::cnvBase
T_AthenaPoolCoolMultChanCnv< TransientClass, LArConditionsSubset< LArSingleFloatP >, LArSingleFloatSubset_p1 > cnvBase
Definition: LArSingleFloatConverter.h:28
LArConditionsSubset
template class for use for I/O of conditions data
Definition: LArConditionsSubset.h:122
T_AthenaPoolCoolMultChanCnv
This templated class provides the POOL converter to translate a DataVector<T> to and from a CondAttrL...
Definition: T_AthenaPoolCoolMultChanCnv.h:35
LArSingleFloatSubsetCnv_p1
Definition: LArSingleFloatSubsetCnv_p1.h:21
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArSingleFloatConverter::createTransientSingleFloat
LArConditionsSubset< LArSingleFloatP > * createTransientSingleFloat()
returns NULL if object is not a LArConditionsSubset<LArSingleFloatP>
Definition: LArSingleFloatConverter.h:52
LArSingleFloatSubset_p1
persistent class container of LArConditionsSubset for LArSingleFloat data.
Definition: LArSingleFloatSubset_p1.h:30