Re: Plotting a tree's current entry vs. its previous entry

From: Brett Viren <bv_at_bnl.gov>
Date: Tue, 27 Sep 2011 16:27:36 -0400


Hi Philippe,

Philippe Canal <pcanal_at_fnal.gov> writes:

> The simplest solution is to do the following:
>
> TFile *offsetFile = TFile::Open("offset.root","RECREATE");
> TTree *offseter = tree->CloneTree( 1 ) ; // 1 is the offset
> offsetFile->Write();
>
> TChain *chain = new TChain(tree->GetName());
> chain->Add("offset.root");
> chain->Add(realfilename);
>
> chain->AddFriend(tree);

Thanks. I get what you are saying. This is a nice way to avoid having to duplicate the tree in two files.

In trying to implement this idea there are a few details that may be useful for the record:

In case anyone finds it useful, attached is the Python module I wrote while testing things.

-Brett.

Received on Tue Sep 27 2011 - 22:27:43 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 28 2011 - 23:50:01 CEST