CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamedProductStreamer.cc
Go to the documentation of this file.
3 
4 #include "TROOT.h"
5 
6 namespace edm {
7  void
8  StreamedProductStreamer::operator()(TBuffer& R__b, void *objp) {
9  if (R__b.IsReading()) {
10  cl_->ReadBuffer(R__b, objp);
11  StreamedProduct* obj = static_cast<StreamedProduct*>(objp);
12  obj->clearClassType();
13  obj->setNewClassType();
14  if(obj->present()) {
15  obj->allocateForReading();
16  obj->classRef()->Streamer(obj->prod(), R__b);
17  }
18  } else {
19  cl_->WriteBuffer(R__b, objp);
20  StreamedProduct* obj = static_cast<StreamedProduct*>(objp);
21  obj->setNewClassType();
22  if(obj->present()) {
23  assert(obj->prod() != 0);
24  obj->classRef()->Streamer(obj->prod(), R__b);
25  }
26  }
27  }
28 
29  void
31  TClass *cl = gROOT->GetClass("edm::StreamedProduct");
32  cl->AdoptStreamer(new StreamedProductStreamer());
33  }
34 }
TClassRef const & classRef() const
void operator()(TBuffer &R__b, void *objp)
float cl
Definition: Combine.cc:71
void setStreamedProductStreamer()