Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //plot ROOT TH1F for each channel of the supplied array with "samples" bins
- void PlotTH1F(TFile* rootFile, double *plotArray, int channels, int samples, TString name)
- {
- int i, j;
- TString fullName;
- TH1F **histArray = new TH1F*[channels];
- for (j = 0; j < channels; j++) {
- fullName = name;
- fullName += j;
- histArray[j] = new TH1F(fullName,fullName,samples,0,samples);
- for (i = 0; i < samples; i++) {
- histArray[j]->Fill(i,plotArray[j*samples+i]);
- }
- histArray[j]->Draw();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement