CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CacheStreamers.cc
Go to the documentation of this file.
4 #include "TROOT.h"
5 class TBuffer;
6 
7 namespace edm {
8  void
9  BoolCacheStreamer::operator()(TBuffer &R__b, void *objp) {
10  if (R__b.IsReading()) {
11  cl_->ReadBuffer(R__b, objp);
12  BoolCache* obj = static_cast<BoolCache *>(objp);
13  *obj = false;
14  } else {
15  cl_->WriteBuffer(R__b, objp);
16  }
17  }
18 
19  void
20  ConstPtrCacheStreamer::operator()(TBuffer &R__b, void *objp) {
21  if (R__b.IsReading()) {
22  cl_->ReadBuffer(R__b, objp);
23  ConstPtrCache* obj = static_cast<ConstPtrCache *>(objp);
24  obj->ptr_=0;
25  } else {
26  cl_->WriteBuffer(R__b, objp);
27  }
28  }
29 
31  TClass *cl = gROOT->GetClass("edm::BoolCache");
32  if (cl->GetStreamer() == 0) {
33  cl->AdoptStreamer(new BoolCacheStreamer());
34  /*} else {
35  std::cout <<"ERROR: no edm::BoolCache found"<<std::endl;*/
36  }
37 
38  cl = gROOT->GetClass("edm::ConstPtrCache");
39  if (cl->GetStreamer() == 0) {
40  cl->AdoptStreamer(new ConstPtrCacheStreamer());
41  /*} else {
42  std::cout <<"ERROR: no edm::ConstPtrCache found"<<std::endl;*/
43  }
44 
45  }
46 
47 }
void operator()(TBuffer &R__b, void *objp)
void operator()(TBuffer &R__b, void *objp)
tuple obj
Example code starts here #.
Definition: VarParsing.py:655
const void * ptr_
Definition: ConstPtrCache.h:36
void setCacheStreamers()