source: trunk/MagicSoft/Mars/mhist/MHFadcPix.cc@ 967

Last change on this file since 967 was 959, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
19! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
20!
21! Copyright: MAGIC Software Development, 2000-2001
22!
23!
24\* ======================================================================== */
25
26///////////////////////////////////////////////////////////////////////
27//
28// MHFadcPix
29//
30// This container stores a hostogram to display an Fadc Spekrtum.
31// The spektrum of all the values measured by the Fadcs.
32//
33///////////////////////////////////////////////////////////////////////
34
35#include "MHFadcPix.h"
36
37#include <TPad.h>
38
39ClassImp(MHFadcPix);
40
41// --------------------------------------------------------------------------
42//
43// Creates the histograms for lo and hi gain of one pixel
44//
45MHFadcPix::MHFadcPix(UInt_t pixid)
46{
47 // FIXME! Set the right axis titles and ... and ...
48 Char_t tmp1[40];
49 Char_t tmp2[40];
50
51 // if (pixid)
52 // {
53 sprintf(tmp1, "HiGain%03d", pixid);
54 sprintf(tmp2, "Hi Gain Pixel #%d", pixid);
55 // }
56 fHistHi = new TH1F(tmp1, tmp2, 256, 0, 255);
57
58 // if (pixid)
59 // {
60 sprintf(tmp1, "LoGain%03d", pixid);
61 sprintf(tmp2, "Lo Gain Pixel #%d", pixid);
62 // }
63 fHistLo = new TH1F(tmp2, tmp2, 256, 0, 255);
64}
65
66// --------------------------------------------------------------------------
67MHFadcPix::~MHFadcPix()
68{
69 delete fHistHi;
70 delete fHistLo;
71}
72
73// --------------------------------------------------------------------------
74void MHFadcPix::Draw(Option_t *)
75{
76 if (!gPad)
77 {
78 if (!gROOT->GetMakeDefCanvas())
79 return;
80 (gROOT->GetMakeDefCanvas())();
81 }
82
83 gPad->Divide(1, 2);
84
85 gPad->cd(0);
86 fHistHi->Draw();
87
88 gPad->cd(1);
89 fHistLo->Draw();
90}
Note: See TracBrowser for help on using the repository browser.