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::RefCoreWithIndexStreamer Class Reference

#include <RefCoreStreamer.h>

Inheritance diagram for edm::RefCoreWithIndexStreamer:

Public Member Functions

TClassStreamer * Generate () const
 
void operator() (TBuffer &R__b, void *objp)
 
 RefCoreWithIndexStreamer ()
 

Private Attributes

TClassRef cl_
 

Detailed Description

Definition at line 24 of file RefCoreStreamer.h.

Constructor & Destructor Documentation

edm::RefCoreWithIndexStreamer::RefCoreWithIndexStreamer ( )
inlineexplicit

Definition at line 26 of file RefCoreStreamer.h.

Referenced by Generate().

26 : cl_("edm::RefCoreWithIndex"){}

Member Function Documentation

TClassStreamer * edm::RefCoreWithIndexStreamer::Generate ( ) const

Definition at line 72 of file RefCoreStreamer.cc.

References RefCoreWithIndexStreamer().

72  {
73  return new RefCoreWithIndexStreamer(*this);
74  }
void edm::RefCoreWithIndexStreamer::operator() ( TBuffer &  R__b,
void *  objp 
)

Definition at line 43 of file RefCoreStreamer.cc.

References cl_, Exception, edm::RefCoreWithIndex::id(), edm::RefCoreWithIndex::index(), edm::errors::InvalidReference, edm::RefCoreWithIndex::isTransient(), getGTfromDQMFile::obj, and edm::ProductID::processIndex().

43  {
44  if (R__b.IsReading()) {
45  cl_->ReadBuffer(R__b, objp);
46  } else {
47  //If transient, throw
48  RefCoreWithIndex* obj = static_cast<RefCoreWithIndex*>(objp);
49  if (obj->isTransient()) {
50  throw Exception(errors::InvalidReference,"Inconsistency")
51  << "RefCoreStreamer: transient Ref or Ptr cannot be made persistent.";
52  }
53 #if 1
54  R__b << cl_->GetClassVersion();
55 #else
56  R__b.WriteVersion(cl_, kFALSE);
57 #endif
58  //Must match the order the data appears in the class declaration
59  const ProductID& id = obj->id();
60  R__b << id.processIndex();
61  R__b << id.productIndex();
62  R__b << obj->index();
63  }
64  }

Member Data Documentation

TClassRef edm::RefCoreWithIndexStreamer::cl_
private

Definition at line 32 of file RefCoreStreamer.h.

Referenced by operator()().