source: trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h@ 4423

Last change on this file since 4423 was 4386, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.9 KB
Line 
1#ifndef MARS_MExtractedSignalBlindPixel
2#define MARS_MExtractedSignalBlindPixel
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12#ifndef ROOT_TArrayF
13#include <TArrayF.h>
14#endif
15
16#ifndef MARS_MExtractBlindPixel
17#include <MExtractBlindPixel.h>
18#endif
19
20class MExtractedSignalBlindPixel : public MParContainer
21{
22private:
23
24 static const Int_t gkSignalInitializer; //! Initializer for variables
25
26 TArrayI fBlindPixelIdx; // Array Blind Pixel IDs
27 TArrayF fExtractedSignal; // Array Extracted signals per Blind Pixel ID
28 TArrayI fNumSaturated; // Array Number of saturated slices per Blind Pixel ID
29
30 TArrayF fPed; // Array Pedestal per Blind Pixel IDs
31 TArrayF fPedErr; // Array Pedestal Error per Blind Pixel ID
32 TArrayF fPedRms; // Array Pedestal RMS per Blind Pixel ID
33 TArrayF fPedRmsErr; // Array Pedestal RMS Error per Blind Pixel ID
34
35 Byte_t fFirst; // First FADC extraction slice
36 Byte_t fNumFADCSamples; // Number of summed FADC slices
37 Byte_t fExtractionType; // What extraction type has been chosen?
38
39public:
40
41 MExtractedSignalBlindPixel(const char* name=NULL, const char* title=NULL);
42
43 void Clear(Option_t *o="");
44 void Print(Option_t *o="") const;
45
46 // Getters
47 Int_t GetBlindPixelIdx ( const Int_t i=0 ) const { return fBlindPixelIdx.At(i) ; }
48 Float_t GetExtractedSignal ( const Int_t i=0 ) const { return fExtractedSignal.At(i) ; }
49 Int_t GetNumBlindPixels () const { return fBlindPixelIdx.GetSize(); }
50 Int_t GetNumSaturated ( const Int_t i=0 ) const { return fNumSaturated.At(i) ; }
51 Byte_t GetNumFADCSamples () const { return fNumFADCSamples ; }
52
53 Float_t GetPed ( const Int_t i=0 ) const { return fPed.At(i) ; }
54 Float_t GetPedErr ( const Int_t i=0 ) const { return fPedErr.At(i) ; }
55 Float_t GetPedRms ( const Int_t i=0 ) const { return fPedRms.At(i) ; }
56 Float_t GetPedRmsErr ( const Int_t i=0 ) const { return fPedRmsErr.At(i) ; }
57
58 Bool_t IsExtractionType ( const MExtractBlindPixel::ExtractionType_t typ );
59 Bool_t IsValid ( const Int_t i=0 ) const;
60
61 // Setter
62 void SetExtractionType( const Byte_t b=0 ) { fExtractionType = b ; }
63 void SetNumFADCSamples( const Byte_t num ) { fNumFADCSamples = num ; }
64 void SetUsedFADCSlices( const Byte_t first, const Byte_t num );
65
66 void SetBlindPixelIdx ( const Int_t i, const Int_t nr=0) {
67 if (nr>fBlindPixelIdx.GetSize()-1)
68 fBlindPixelIdx.Set(nr+1);
69 fBlindPixelIdx.AddAt(i,nr); }
70 void SetExtractedSignal( const Float_t f, const Int_t nr=0 ) {
71 if (nr>fExtractedSignal.GetSize()-1)
72 fExtractedSignal.Set(nr+1);
73 fExtractedSignal.AddAt(f,nr); }
74 void SetNumSaturated ( const Int_t i, const Int_t nr=0 ) {
75 if (nr>fNumSaturated.GetSize()-1)
76 fNumSaturated.Set(nr+1);
77 fNumSaturated.AddAt(i,nr); }
78 void SetPed ( const Float_t f, const Int_t nr=0 ) {
79 if (nr>fPed.GetSize()-1)
80 fPed.Set(nr+1);
81 fPed.AddAt(f,nr); }
82 void SetPedErr ( const Float_t f, const Int_t nr=0 ) {
83 if (nr>fPedErr.GetSize()-1)
84 fPedErr.Set(nr+1);
85 fPedErr.AddAt(f,nr); }
86 void SetPedRms ( const Float_t f, const Int_t nr=0 ) {
87 if (nr>fPedRms.GetSize()-1)
88 fPedRms.Set(nr+1);
89 fPedRms.AddAt(f,nr); }
90 void SetPedRmsErr ( const Float_t f, const Int_t nr=0 ) {
91 if (nr>fPedRmsErr.GetSize()-1)
92 fPedRmsErr.Set(nr+1);
93 fPedRmsErr.AddAt(f,nr); }
94
95 ClassDef(MExtractedSignalBlindPixel, 3) // Storage Container for extracted signal of Blind Pixel
96};
97
98#endif
99
100
101
102
103
104
105
106
Note: See TracBrowser for help on using the repository browser.