Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:25

0001 #ifndef FWCore_FWLite_setRefStreamer_h
0002 #define FWCore_FWLite_setRefStreamer_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWLite
0006 // Class  :     setRefStreamer
0007 //
0008 /**\class setRefStreamer setRefStreamer.h FWCore/FWLite/interface/setRefStreamer.h
0009 
0010  Description: Allows one to set the EDProductGetter used by the Ref's and returns the old getter
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Tue May 15 11:25:51 EDT 2007
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 
0025 // forward declarations
0026 namespace edm {
0027   class EDProductGetter;
0028 }
0029 
0030 namespace fwlite {
0031   edm::EDProductGetter const* setRefStreamer(edm::EDProductGetter const* ep);
0032 
0033   class GetterOperate {
0034   public:
0035     GetterOperate(edm::EDProductGetter const* iEP) : old_(nullptr) { old_ = setRefStreamer(iEP); }
0036     ~GetterOperate() { setRefStreamer(old_); }
0037 
0038   private:
0039     edm::EDProductGetter const* old_;
0040   };
0041 }  // namespace fwlite
0042 
0043 #endif