Question on Draw() when having a TTree ntupel

Dear ROOTers

I have a for me very important question!
i should use a TTree ntuple created by someone else to draw and analyze data.

the TTree consits 2 variables:

Int_t gmtDwdt[12];
Int_t dttf_trPtPck[40]; //[dttf_trSize]

the print makro does the following:

// Name of ROOT file coming from L1Analyzer
char file[100] = “file.root”;

// Getting the ntuple TTree
TFile *f = new TFile(file);
TTree h1 = (TTree)f->Get(“h1”);


h1->Draw("(gmtDwdt/(1<<8))&0x1f-dttf_trPtPck" ,"","")



now my question:
for further analysis i would need NOT to use the Draw function but to loop over the variables and print entry against entry in 2d and/or 1d histograms. I have no idea how to do this because i need to shift the gmtDwdt variable bitwise and this makes everything very complicated for me!
Any suggestions are really welcome!

thanks in advance

For a complex analysis producing several histograms and having complex cuts, I recommend using a TSelector. You can generate automatically the C++ skeleton with

h1->MakeSelector("h1"); This will generate h1.h and h1.C. In h1::Begin create your histogram(s).
In h1::Process, make your selections and fill your histogram(s).
see $ROOTSYS/tutorials/tree/h1analysis.C