33void write_clonesarray(
Int_t split)
37 TFile f(
"clonesarray.root",
"recreate");
38 f.SetCompressionLevel(1);
39 TTree T(
"T",
"test clonesarray");
42 T.Branch(
"tcl", &arr, 256000, split);
49 for (
Int_t ev=0; ev<10000; ev++) {
54 for (
Int_t i=0;i<nlines;i++) {
59 new(ar[i])
TLine(x1, y1, x2, y2);
67void read_clonesarray()
72 auto f =
new TFile(
"clonesarray.root");
73 auto T =
f->Get<
TTree>(
"T");
74 auto h2 =
new TH2F(
"h2",
"center of lines", 40, 0, 1, 40, 0, 1);
77 T->GetBranch(
"tcl")->SetAutoDelete(
kFALSE);
78 T->SetBranchAddress(
"tcl", &arr);
84 for (
Int_t i=0; i<nlines; i++) {
92void tree123_clonesarray(
Int_t split = 0)
95 write_clonesarray(split);
int Int_t
Signed integer 4 bytes (int).
long long Long64_t
Portable signed long integer 8 bytes.
float Float_t
Float 4 bytes (float).
externTBenchmark * gBenchmark
An array of clone (identical) objects.
void BypassStreamer(Bool_t bypass=kTRUE)
When the kBypassStreamer bit is set, the automatically generated Streamer can call directly TClass::W...
void Clear(Option_t *option="") override
Clear the clones array.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
2-D histogram with a float per channel (see TH1 documentation)
Use the TLine constructor to create a simple line.
Int_t GetEntriesFast() const
TObject * At(Int_t idx) const override
A TTree represents a columnar dataset.
virtual Int_t Fill()
Fill all branches.
void Draw(Option_t *opt) override
Default Draw method for all objects.