/[PAMELA software]/PamelaLevel2/doc/examples/example3.C
ViewVC logotype

Diff of /PamelaLevel2/doc/examples/example3.C

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by pam-fi, Mon Jan 15 11:51:39 2007 UTC revision 1.4 by mocchiut, Tue Jan 16 15:26:30 2007 UTC
# Line 36  void example3(TString dir,TString list=" Line 36  void example3(TString dir,TString list="
36      // << All the trees required by the user are made friend.      // << All the trees required by the user are made friend.
37      TChain *T = event->GetPamTree(l,treelist);      TChain *T = event->GetPamTree(l,treelist);
38      // << In the following the TChain can be used similarly to a TTree.      // << In the following the TChain can be used similarly to a TTree.
39    
40        //
41        TChain *RUNT = event->GetRunTree(dir,list); // << get the run information and store it in RUNT
42    
43      //      //
44      // NB! It is still possible to read a single file and get a TTree, by means of the methods:      // NB! It is still possible to read a single file and get a TTree, by means of the methods:
45      // TTree* LoadPamTrees(TFile *f);      // TTree* LoadPamTrees(TFile *f);
# Line 51  void example3(TString dir,TString list=" Line 55  void example3(TString dir,TString list="
55          //          //
56          event->Clear();          event->Clear();
57          T->GetEntry(i);          T->GetEntry(i);
58    
59            if ( event->UpdateRunInfo(RUNT,i) ) printf(" New RUN at entry = %llu RUN ID is %u NEVENTS is %u \n",i,event->GetRunInfo()->ID,event->GetRunInfo()->NEVENTS);
60                                    
61          if(event->GetTrkLevel2()->GetNTracks() > 1)cout << " Ev "<<i << " multiple tracks: "<< event->GetTrkLevel2()->GetNTracks() << endl;          if(event->GetTrkLevel2()->GetNTracks() > 1)cout << " Ev "<<i << " multiple tracks: "<< event->GetTrkLevel2()->GetNTracks() << endl;
62                                    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23