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 | fNumSaturated = 0;
|
---|
72 | }
|
---|
73 |
|
---|
74 | void MExtractedSignalBlindPixel::SetUsedFADCSlices(const Byte_t first, const Byte_t num)
|
---|
75 | {
|
---|
76 | fFirst = first;
|
---|
77 | fNumFADCSamples = num;
|
---|
78 | }
|
---|
79 |
|
---|
80 |
|
---|
81 | Bool_t MExtractedSignalBlindPixel::IsValid() const
|
---|
82 | {
|
---|
83 | return fExtractedSignal >= 0 && fExtractedSignal < gkSignalInitializer;
|
---|
84 | }
|
---|
85 |
|
---|
86 | void MExtractedSignalBlindPixel::Print(Option_t *o) const
|
---|
87 | {
|
---|
88 | *fLog << " Signal: " << fExtractedSignal
|
---|
89 | << " Nr. Saturation: " << fNumSaturated
|
---|
90 | << endl;
|
---|
91 | }
|
---|