Campuses:
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
computing:contrib:root:localdoc [2009/02/19 11:13] – strait | computing: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-> | ||
for(int i = 0; i < awesomedata-> | for(int i = 0; i < awesomedata-> | ||
awesomedata-> | awesomedata-> | ||
Line 83: | Line 85: | ||
Loop(awesomedata); | Loop(awesomedata); | ||
} | } | ||
+ | |||
+ | The class " | ||
=== Use Good Names === | === Use Good Names === | ||
Line 131: | Line 135: | ||
// If you declared with ' | // If you declared with ' | ||
void IWantRandomNumbers(TRandom3 * laserfocus) | void IWantRandomNumbers(TRandom3 * laserfocus) | ||
+ | | ||
// If you simply declared the object: | // If you simply declared the object: | ||
- | // This copies the object | + | // This copies the object: the sequence of random |
+ | // numbers will not be advanced in the calling function | ||
void IWantRandomNumbers(TRandom3 laserfocus) | void IWantRandomNumbers(TRandom3 laserfocus) | ||
- | // This uses the object itself | + | |
+ | | ||
+ | // numbers *will* be advanced in the calling function | ||
void IWantRandomNumbers(TRandom3 & laserfocus) | void IWantRandomNumbers(TRandom3 & laserfocus) | ||
Line 194: | Line 201: | ||
< | < | ||
- | This has two big advantages. | + | This has two big advantages. |
====== Making Attractive Plots ====== | ====== Making Attractive Plots ====== |