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 |
|
---|
39 | ClassImp(MHFadcPix)
|
---|
40 |
|
---|
41 | MHFadcPix::MHFadcPix(UInt_t pixid)
|
---|
42 | {
|
---|
43 | //
|
---|
44 | // Creates the histograms for lo and hi gain of one pixel
|
---|
45 | //
|
---|
46 | // FIXME! Set the right axis titles and ... and ...
|
---|
47 | //
|
---|
48 | Char_t tmp1[40]="hi";
|
---|
49 | Char_t tmp2[40]="hi gain Pixel";
|
---|
50 |
|
---|
51 | if (pixid)
|
---|
52 | {
|
---|
53 | sprintf(tmp1, "%s%d", tmp1, pixid);
|
---|
54 | sprintf(tmp2, "%s %d", tmp2, pixid);
|
---|
55 | }
|
---|
56 | fHistHi = new TH1F(tmp1, tmp2, 256, 0, 255);
|
---|
57 |
|
---|
58 |
|
---|
59 | Char_t tmp3[40]="lo";
|
---|
60 | Char_t tmp4[40]="lo gain Pixel";
|
---|
61 |
|
---|
62 | if (pixid)
|
---|
63 | {
|
---|
64 | sprintf(tmp3, "%s%d", tmp3, pixid);
|
---|
65 | sprintf(tmp4, "%s %d", tmp4, pixid);
|
---|
66 | }
|
---|
67 | fHistLo = new TH1F(tmp3, tmp4, 256, 0, 255);
|
---|
68 | }
|
---|
69 |
|
---|
70 | MHFadcPix::~MHFadcPix()
|
---|
71 | {
|
---|
72 | delete fHistHi;
|
---|
73 | delete fHistLo;
|
---|
74 | }
|
---|
75 |
|
---|
76 | void MHFadcPix::Draw(Option_t *)
|
---|
77 | {
|
---|
78 | if (!gPad)
|
---|
79 | {
|
---|
80 | if (!gROOT->GetMakeDefCanvas())
|
---|
81 | return;
|
---|
82 | (gROOT->GetMakeDefCanvas())();
|
---|
83 | }
|
---|
84 |
|
---|
85 | gPad->Divide(1, 2);
|
---|
86 |
|
---|
87 | gPad->cd(0);
|
---|
88 | fHistHi->Draw();
|
---|
89 |
|
---|
90 | gPad->cd(1);
|
---|
91 | fHistLo->Draw();
|
---|
92 | }
|
---|