CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FWCore/FWLite/src/RefStreamer.cc

Go to the documentation of this file.
00001 #include "DataFormats/Common/interface/RefCore.h"
00002 #include "DataFormats/Common/interface/RefCoreStreamer.h"
00003 #include "TROOT.h"
00004 #include <assert.h>
00005 #include <ostream>
00006 
00007 class TBuffer;
00008 
00009 namespace fwlite {
00010   edm::EDProductGetter const* setRefStreamer(edm::EDProductGetter const* ep) {
00011     {
00012       TClass* cl = gROOT->GetClass("edm::RefCore");
00013       TClassStreamer* st = cl->GetStreamer();
00014       if (st == 0) {
00015         cl->AdoptStreamer(new edm::RefCoreStreamer());
00016       }
00017     }
00018     {
00019       TClass* cl = gROOT->GetClass("edm::RefCoreWithIndex");
00020       TClassStreamer* st = cl->GetStreamer();
00021       if (st == 0) {
00022         cl->AdoptStreamer(new edm::RefCoreWithIndexStreamer());
00023       }
00024     }
00025     return edm::EDProductGetter::switchProductGetter(ep);
00026   }
00027 }