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): Markus Gaug 02/2004 <mailto:markus@ifae.es>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MExtractedSignalBlindPixel
|
---|
28 | //
|
---|
29 | // This is the storage container to hold informations about the extracted signal
|
---|
30 | // (offset) value of the calibration PIN Diode
|
---|
31 | //
|
---|
32 | /////////////////////////////////////////////////////////////////////////////
|
---|
33 | #include "MExtractedSignalBlindPixel.h"
|
---|
34 |
|
---|
35 | #include "MLog.h"
|
---|
36 | #include "MLogManip.h"
|
---|
37 |
|
---|
38 | ClassImp(MExtractedSignalBlindPixel);
|
---|
39 |
|
---|
40 | using namespace std;
|
---|
41 |
|
---|
42 | static const UInt_t gkSignalInitializer = 99999;
|
---|
43 |
|
---|
44 | // ------------------------------------------------------------------------
|
---|
45 | //
|
---|
46 | // MExtractedSignalBlindPixel holds the extracted signal
|
---|
47 | // of the FADC slices and its error.
|
---|
48 | //
|
---|
49 | // Additionally, the number of saturated Slices are stored.
|
---|
50 | //
|
---|
51 | // Default values for the extracted signals are: 99999.9
|
---|
52 | //
|
---|
53 | MExtractedSignalBlindPixel::MExtractedSignalBlindPixel(const char* name, const char* title)
|
---|
54 | {
|
---|
55 |
|
---|
56 | fName = name ? name : "MExtractedSignalBlindPixel";
|
---|
57 | fTitle = title ? title : "Container of the Extracted Signals";
|
---|
58 |
|
---|
59 | Clear();
|
---|
60 | }
|
---|
61 |
|
---|
62 | // ------------------------------------------------------------------------
|
---|
63 | //
|
---|
64 | // Invalidate values
|
---|
65 | //
|
---|
66 | void MExtractedSignalBlindPixel::Clear(Option_t *o)
|
---|
67 | {
|
---|
68 |
|
---|
69 | fExtractedSignal = gkSignalInitializer;
|
---|
70 |
|
---|
71 | fPed = gkSignalInitializer;;
|
---|
72 | fPedErr = gkSignalInitializer;;
|
---|
73 | fPedRms = gkSignalInitializer;;
|
---|
74 | fPedRmsErr = gkSignalInitializer;;
|
---|
75 |
|
---|
76 | fNumSaturated = 0;
|
---|
77 | }
|
---|
78 |
|
---|
79 | void MExtractedSignalBlindPixel::SetUsedFADCSlices(const Byte_t first, const Byte_t num)
|
---|
80 | {
|
---|
81 | fFirst = first;
|
---|
82 | fNumFADCSamples = num;
|
---|
83 | }
|
---|
84 |
|
---|
85 |
|
---|
86 | Bool_t MExtractedSignalBlindPixel::IsValid() const
|
---|
87 | {
|
---|
88 | return fExtractedSignal >= 0 && fExtractedSignal < gkSignalInitializer;
|
---|
89 | }
|
---|
90 |
|
---|
91 | void MExtractedSignalBlindPixel::Print(Option_t *o) const
|
---|
92 | {
|
---|
93 | *fLog << " Signal: " << fExtractedSignal
|
---|
94 | << " Nr. Saturation: " << fNumSaturated
|
---|
95 | << endl;
|
---|
96 | }
|
---|