40 const Int_t nplanes = 10;
41 const Int_t ncounters = 100;
47 TH1F *hn[nplanes][ncounters];
48 TH1F *hs[nplanes][ncounters];
49 for (i=0;i<nplanes;i++) {
50 sprintf(dirname,
"plane%d",i);
51 cdplane[i] = cdtof->
mkdir(dirname);
54 for (j=0;j<ncounters;j++) {
55 sprintf(hname,
"h%d_%dN",i,j);
56 sprintf(htitle,
"hist for counter:%d in plane:%d North",j,i);
57 hn[i][j] =
new TH1F(hname,htitle,100,0,100);
58 sprintf(hname,
"h%d_%dS",i,j);
59 sprintf(htitle,
"hist for counter:%d in plane:%d South",j,i);
60 hs[i][j] =
new TH1F(hname,htitle,100,0,100);
67 for (i=0;i<nplanes;i++) {
69 for (j=0;j<ncounters;j++) {
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
tomato 1-D histogram with a float per channel (see TH1 documentation)}
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
This is the base class for the ROOT Random number generators.
virtual Double_t Rndm()
Machine independent random number generator.
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.