source: tags/Mars-V0.8.5/mpedestal/MPedestalPix.cc

Last change on this file was 4404, checked in by fgoebel, 20 years ago
*** empty log message ***
File size: 3.1 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): Thomas Bretz 12/2000 <mailto:tbretz@uni-sw.gwdg.de>
19! Markus Gaug 04/2004 <mailto:markus@ifae.es>
20! Florian Goebel 06/2004 <mailto:fgoebel@mppmu.mpg.de>
21!
22! Copyright: MAGIC Software Development, 2000-2004
23!
24!
25\* ======================================================================== */
26
27/////////////////////////////////////////////////////////////////////////////
28// //
29// MPedestalPix //
30// //
31// This is the storage container to hold informations about the pedestal //
32// (offset) value of one Pixel (PMT). //
33// //
34// version 2: //
35// ---------- //
36// added: //
37// fPedestalABoffset difference between pedestal mean of odd slices and //
38// the total pedestal mean (fPedestal) //
39// fNumEvents number of times, the Process was executed //
40// (to estimate the error of pedestal) //
41// //
42/////////////////////////////////////////////////////////////////////////////
43#include "MPedestalPix.h"
44
45#include "MLog.h"
46#include "MLogManip.h"
47
48ClassImp(MPedestalPix);
49
50using namespace std;
51
52MPedestalPix::MPedestalPix()
53 : fValid(kTRUE)
54{
55 Clear();
56}
57
58
59// ------------------------------------------------------------------------
60//
61// Invalidate values
62//
63void MPedestalPix::Clear(Option_t *o)
64{
65 fPedestal = -1.;
66 fPedestalRms = -1.;
67 fPedestalABoffset = -1.;
68 fNumEvents = 0;
69}
70
71void MPedestalPix::InitUseHists()
72{
73
74 fPedestal = 0.;
75 fPedestalRms = 0.;
76 fPedestalABoffset = 0.;
77 fNumEvents = 0;
78}
79
80
81void MPedestalPix::Set(Float_t m, Float_t r, Float_t offs, UInt_t n)
82{
83 fPedestal = m;
84 fPedestalRms = r;
85 fPedestalABoffset = offs;
86 fNumEvents = n;
87}
88
89
90Bool_t MPedestalPix::IsValid() const
91{
92
93 if (!fValid)
94 return kFALSE;
95
96 return fPedestal>=0||fPedestalRms>=0;
97}
Note: See TracBrowser for help on using the repository browser.