CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
edm::ProductIDStreamer Class Reference

#include <RefCoreStreamer.h>

Inheritance diagram for edm::ProductIDStreamer:

Public Member Functions

void operator() (TBuffer &R__b, void *objp)
 
 ProductIDStreamer (EDProductGetter const *ep, bool productIDwasLong)
 
void setProductGetter (EDProductGetter const *ep)
 

Private Attributes

TClassRef cl_
 
EDProductGetter const * prodGetter_
 
bool productIDwasLong_
 

Detailed Description

Definition at line 44 of file RefCoreStreamer.h.

Constructor & Destructor Documentation

edm::ProductIDStreamer::ProductIDStreamer ( EDProductGetter const *  ep,
bool  productIDwasLong 
)
inline

Definition at line 46 of file RefCoreStreamer.h.

46  :
47  cl_("edm::ProductID"),
48  prodGetter_(ep),
49  productIDwasLong_(productIDwasLong) {}
EDProductGetter const * prodGetter_

Member Function Documentation

void edm::ProductIDStreamer::operator() ( TBuffer &  R__b,
void *  objp 
)

Definition at line 10 of file RefCoreStreamer.cc.

References cl_, ExpressReco_HICollisions_FallBack::id, VarParsing::obj, edm::ProductID::oldID(), edm::EDProductGetter::oldToNewProductID(), evf::utils::pid, prodGetter_, and productIDwasLong_.

10  {
11  if (R__b.IsReading()) {
12  UInt_t i0, i1;
13  R__b.ReadVersion(&i0, &i1, cl_);
14  ProductID pid;
15  if (productIDwasLong_) {
16  unsigned long id;
17  R__b >> id;
18  pid.oldID() = id;
19  } else {
20  unsigned int id;
21  R__b >> id;
22  pid.oldID() = id;
23  }
24  ProductID* obj = static_cast<ProductID *>(objp);
25  *obj = (prodGetter_ ? prodGetter_->oldToNewProductID(pid) : pid);
26  } else {
27  assert("ProductID streamer is obsolete" == 0);
28  }
29  }
tuple obj
Example code starts here #.
Definition: VarParsing.py:655
unsigned int UInt_t
Definition: FUTypes.h:12
EDProductGetter const * prodGetter_
ProductID oldToNewProductID(ProductID const &oldProductID) const
void edm::ProductIDStreamer::setProductGetter ( EDProductGetter const *  ep)
inline

Definition at line 51 of file RefCoreStreamer.h.

References prodGetter_.

Referenced by edm::setRefCoreStreamer().

51  {
52  prodGetter_ = ep;
53  }
EDProductGetter const * prodGetter_

Member Data Documentation

TClassRef edm::ProductIDStreamer::cl_
private

Definition at line 57 of file RefCoreStreamer.h.

Referenced by operator()().

EDProductGetter const* edm::ProductIDStreamer::prodGetter_
private

Definition at line 58 of file RefCoreStreamer.h.

Referenced by operator()(), and setProductGetter().

bool edm::ProductIDStreamer::productIDwasLong_
private

Definition at line 59 of file RefCoreStreamer.h.

Referenced by operator()().