Go to the U of M home page
School of Physics & Astronomy
School of Physics and Astronomy Wiki

User Tools


computing:contrib:root:localdoc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:contrib:root:localdoc [2009/02/19 14:35] eggertcomputing:contrib:root:localdoc [2009/06/01 15:47] (current) – more strait
Line 71: Line 71:
   void Loop(TTree * awesomedata)   void Loop(TTree * awesomedata)
   {   {
 +    yourdataobject * onedatum = 0;
 +    awesomedata->SetBranchAddress("yourdataobject", &onedatum);
     for(int i = 0; i < awesomedata->GetEntries(); i++){     for(int i = 0; i < awesomedata->GetEntries(); i++){
       awesomedata->GetEntry(i);       awesomedata->GetEntry(i);
Line 83: Line 85:
     Loop(awesomedata);     Loop(awesomedata);
   }   }
 +
 +The class "yourdataobject" needs only contain the data and not any functions.
  
 === Use Good Names === === Use Good Names ===
computing/contrib/root/localdoc.1235075747.txt.gz · Last modified: 2009/02/19 14:35 (external edit)