Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DataFormats
Streamer
src
StreamedProductStreamer.cc
Go to the documentation of this file.
1
#include "
DataFormats/Streamer/interface/StreamedProductStreamer.h
"
2
#include "
DataFormats/Streamer/interface/StreamedProducts.h
"
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
30
setStreamedProductStreamer
() {
31
TClass *
cl
= gROOT->GetClass(
"edm::StreamedProduct"
);
32
cl->AdoptStreamer(
new
StreamedProductStreamer
());
33
}
34
}
edm::StreamedProductStreamer::cl_
TClassRef cl_
Definition:
StreamedProductStreamer.h:14
StreamedProductStreamer.h
edm::StreamedProduct::setNewClassType
void setNewClassType()
Definition:
StreamedProducts.cc:27
getGTfromDQMFile.obj
tuple obj
Definition:
getGTfromDQMFile.py:31
edm::StreamedProduct::prod
void * prod()
Definition:
StreamedProducts.h:47
edm::StreamedProduct::classRef
TClassRef const & classRef() const
Definition:
StreamedProducts.h:48
edm::StreamedProductStreamer::operator()
void operator()(TBuffer &R__b, void *objp)
Definition:
StreamedProductStreamer.cc:8
cl
float cl
Definition:
Combine.cc:71
edm::StreamedProduct::present
bool present() const
Definition:
StreamedProducts.h:45
edm::setStreamedProductStreamer
void setStreamedProductStreamer()
Definition:
StreamedProductStreamer.cc:30
edm::StreamedProduct
Definition:
StreamedProducts.h:32
StreamedProducts.h
edm::StreamedProduct::clearClassType
void clearClassType()
Definition:
StreamedProducts.cc:32
edm::StreamedProductStreamer
Definition:
StreamedProductStreamer.h:7
edm::StreamedProduct::allocateForReading
void allocateForReading()
Definition:
StreamedProducts.cc:21
Generated for CMSSW Reference Manual by
1.8.5