16 #include "Riostream.h"
17 #include "TApplication.h"
26 void usage(
char **args);
29 int main(
int argc,
char **argv)
31 TApplication theApp(
"App", &argc, argv);
33 TNamed *com =
new TNamed(
"named object",
"this is a test");
35 TH1F *histo =
new TH1F(
"histogram",
"this is a test histogram", 100, 0., 1.);
37 TH1F *histo2 =
new TH1F(
"histogram 2",
"this is a test histogram", 100, 0., 1.);
45 std::cout <<
"deleted the first histo after cloning" << std::endl;
51 std::cout <<
"object from object queue:"<< std::endl;
52 std::cout << output->ClassName() << std::endl;
53 std::cout << output->GetName() << std::endl;
54 if (output->InheritsFrom(TH1::Class())) {
55 histo3 =
dynamic_cast<TH1*
>(output);
56 dynamic_cast<TH1*
>(output)->Draw();
73 std::cout <<
"got buffer from buffer queue:"<< std::endl;
77 TClass* cl = mess->ReadClass();
78 std::cout <<
"Class: " << cl << std::endl;
80 std::cout <<
"Classname: " << cl->GetName() << std::endl;
81 std::cout <<
"Reading object from buffer..."<< std::endl;
83 output=mess->ReadObject(cl);
86 std::cout <<
"zero object" <<std::endl;
90 std::cout << output->ClassName() << std::endl;
91 std::cout << output->GetName() << std::endl;
92 if (output->InheritsFrom(TH1::Class()))
107 std::cout <<
"object from object queue second pass:"<< std::endl;
108 std::cout << output->ClassName() << std::endl;
109 std::cout << output->GetName() << std::endl;
110 if (output->InheritsFrom(TH1::Class()))
121 std::cout <<
"got buffer from buffer queue second time:"<< std::endl;
125 TClass* cl = mess->ReadClass();
126 std::cout <<
"Class: " << cl << std::endl;
128 std::cout <<
"Classname: " << cl->GetName() << std::endl;
129 std::cout <<
"Reading object from buffer..."<< std::endl;
131 output=mess->ReadObject(cl);
134 std::cout <<
"zero object" <<std::endl;
138 std::cout << output->ClassName() << std::endl;
139 std::cout << output->GetName() << std::endl;
140 if (output->InheritsFrom(TH1::Class()))
151 std::cout <<
"Usage: " << args[0] <<
" \n";
void AddObject(TObject *object, Bool_t clone=kFALSE)
void AddBuffer(TBuffer *buffer, Bool_t clone=kFALSE)
void AddObjectFromBuffer(TBuffer *buffer)
int main(int argc, char **argv)
void AddBufferFromObject(TObject *object)