/////////////////////////////////////////////////////////////////////// // // MHFadcPix // // This container stores a hostogram to display an Fadc Spekrtum. // The spektrum of all the values measured by the Fadcs. // /////////////////////////////////////////////////////////////////////// #include "MHFadcPix.h" #include ClassImp(MHFadcPix) MHFadcPix::MHFadcPix(UInt_t pixid) { // // Creates the histograms for lo and hi gain of one pixel // // FIXME! Set the right axis titles and ... and ... // Char_t tmp1[40]="hi"; Char_t tmp2[40]="hi gain Pixel"; if (pixid) { sprintf(tmp1, "%s%d", tmp1, pixid); sprintf(tmp2, "%s %d", tmp2, pixid); } fHistHi = new TH1F(tmp1, tmp2, 256, 0, 255); Char_t tmp3[40]="lo"; Char_t tmp4[40]="lo gain Pixel"; if (pixid) { sprintf(tmp3, "%s%d", tmp3, pixid); sprintf(tmp4, "%s %d", tmp4, pixid); } fHistLo = new TH1F(tmp3, tmp4, 256, 0, 255); } MHFadcPix::~MHFadcPix() { delete fHistHi; delete fHistLo; } void MHFadcPix::Draw(Option_t *) { if (!gPad) { if (!gROOT->GetMakeDefCanvas()) return; (gROOT->GetMakeDefCanvas())(); } gPad->Divide(1, 2); gPad->cd(0); fHistHi->Draw(); gPad->cd(1); fHistLo->Draw(); }