test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BufferedBoostIOESProducer.h
Go to the documentation of this file.
1 #ifndef CondTools_Hcal_BufferedBoostIOESProducer_h
2 #define CondTools_Hcal_BufferedBoostIOESProducer_h
3 
4 // -*- C++ -*-
5 //
6 // Package: CondTools/Hcal
7 // Class: BufferedBoostIOESProducer
8 //
16 //
17 // Original Author: Igor Volobouev
18 // Created: Sun Aug 31 22:18:44 CDT 2014
19 // $Id: BufferedBoostIOESProducer.h,v 1.0 2014/08/31 22:18:44 igv Exp $
20 //
21 //
22 
23 #include <sstream>
24 #include <memory>
25 
29 
30 #include "CondFormats/Serialization/interface/eos/portable_iarchive.hpp"
32 
33 template<class DataType, class MyRecord>
35 {
36 public:
37  typedef std::shared_ptr<DataType> ReturnType;
38 
40  {setWhatProduced(this);}
41 
42  inline virtual ~BufferedBoostIOESProducer() {}
43 
44  ReturnType produce(const MyRecord&);
45 };
46 
47 template<class DataType, class MyRecord>
50 {
52  iRecord.get(handle);
53  std::istringstream is(handle->str());
54  eos::portable_iarchive ar(is);
55  ReturnType ret(new DataType());
56  ar & *ret;
57  return ret;
58 }
59 
60 #endif // CondTools_Hcal_BufferedBoostIOESProducer_h
tuple ret
prodAgent to be discontinued
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::shared_ptr< DataType > ReturnType
tuple handle
Definition: patZpeak.py:22
BufferedBoostIOESProducer(const edm::ParameterSet &)
ReturnType produce(const MyRecord &)