39 const Int_t nplanes = 10;
40 const Int_t ncounters = 100;
46 TH1F *hn[nplanes][ncounters];
47 TH1F *hs[nplanes][ncounters];
48 for (i=0;i<nplanes;i++) {
49 sprintf(dirname,
"plane%d",i);
50 cdplane[i] = cdtof->
mkdir(dirname);
53 for (j=0;j<ncounters;j++) {
54 sprintf(hname,
"h%d_%dN",i,j);
55 sprintf(htitle,
"hist for counter:%d in plane:%d North",j,i);
56 hn[i][j] =
new TH1F(hname,htitle,100,0,100);
57 sprintf(hname,
"h%d_%dS",i,j);
58 sprintf(htitle,
"hist for counter:%d in plane:%d South",j,i);
59 hs[i][j] =
new TH1F(hname,htitle,100,0,100);
66 for (i=0;i<nplanes;i++) {
68 for (j=0;j<ncounters;j++) {
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t Rndm(Int_t i=0)
Machine independent random number generator.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
1-D histogram with a float per channel (see TH1 documentation)}
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory.
This is the base class for the ROOT Random number generators.
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsiz=0)
Write memory objects to this file.
Describe directory structure in memory.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.