CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::ProductIDStreamer Class Reference

#include <RefCoreStreamer.h>

List of all members.

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 40 of file RefCoreStreamer.h.


Constructor & Destructor Documentation

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

Definition at line 42 of file RefCoreStreamer.h.

                                                                        :
    cl_("edm::ProductID"),
    prodGetter_(ep),
    productIDwasLong_(productIDwasLong) {}

Member Function Documentation

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

Definition at line 11 of file RefCoreStreamer.cc.

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

                                                         {
    if (R__b.IsReading()) {
      UInt_t i0, i1;
      R__b.ReadVersion(&i0, &i1, cl_);
      ProductID pid;
      if (productIDwasLong_) {
        unsigned long id;
        R__b >> id;
        pid.oldID() = id;
      } else {
        unsigned int id;
        R__b >> id;
        pid.oldID() = id;
      }
      ProductID* obj = static_cast<ProductID *>(objp);
      *obj = (prodGetter_ ? prodGetter_->oldToNewProductID(pid) : pid);
    } else {
      assert("ProductID streamer is obsolete" == 0);
    }
  }
void edm::ProductIDStreamer::setProductGetter ( EDProductGetter const *  ep) [inline]

Definition at line 47 of file RefCoreStreamer.h.

References prodGetter_.

Referenced by edm::setRefCoreStreamer().

                                                     {
        prodGetter_ = ep;
    }

Member Data Documentation

TClassRef edm::ProductIDStreamer::cl_ [private]

Definition at line 53 of file RefCoreStreamer.h.

Referenced by operator()().

Definition at line 54 of file RefCoreStreamer.h.

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

Definition at line 55 of file RefCoreStreamer.h.

Referenced by operator()().