Changeset 4311 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 06/21/04 17:46:54 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc
r4190 r4311 28 28 // 29 29 // This is the storage container to hold informations about the extracted signal 30 // (offset) value of the calibration PIN Diode 30 // (offset) value of the calibration Blind Pixel. 31 // 32 // There is place for various blind pixels set into the camera in July. Default 33 // is one blind pixel. 31 34 // 32 35 ///////////////////////////////////////////////////////////////////////////// … … 57 60 fTitle = title ? title : "Container of the Extracted Signals"; 58 61 62 fBlindPixelIdx.Set(1); 63 fExtractedSignal.Set(1); 64 fNumSaturated.Set(1); 65 66 fPed.Set(1); 67 fPedErr.Set(1); 68 fPedRms.Set(1); 69 fPedRmsErr.Set(1); 70 59 71 Clear(); 60 72 } … … 67 79 { 68 80 69 fExtractedSignal = gkSignalInitializer; 70 71 fPed = gkSignalInitializer;; 72 fPedErr = gkSignalInitializer;; 73 fPedRms = gkSignalInitializer;; 74 fPedRmsErr = gkSignalInitializer;; 81 for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++) 82 { 83 fNumSaturated .AddAt(gkSignalInitializer,i); 84 fExtractedSignal.AddAt(gkSignalInitializer,i); 85 fPed .AddAt(gkSignalInitializer,i); 86 fPedErr .AddAt(gkSignalInitializer,i); 87 fPedRms .AddAt(gkSignalInitializer,i); 88 fPedRmsErr .AddAt(gkSignalInitializer,i); 89 } 75 90 76 fNumSaturated = 0;77 91 } 78 92 … … 84 98 85 99 86 Bool_t MExtractedSignalBlindPixel::IsValid( ) const100 Bool_t MExtractedSignalBlindPixel::IsValid( const Int_t i ) const 87 101 { 88 return fExtractedSignal >= 0 && fExtractedSignal< gkSignalInitializer;102 return fExtractedSignal.At(i) >= 0 && fExtractedSignal.At(i) < gkSignalInitializer; 89 103 } 90 104 91 105 void MExtractedSignalBlindPixel::Print(Option_t *o) const 92 106 { 93 *fLog << " Signal: " << fExtractedSignal 94 << " Nr. Saturation: " << fNumSaturated 95 << endl; 107 108 for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++) 109 { 110 111 *fLog << "Blind Pixel ID: " << fBlindPixelIdx.At(i) 112 << ": Signal: " << fExtractedSignal.At(i) 113 << " Saturated Slices: " << fNumSaturated.At(i) 114 << endl; 115 } 96 116 } -
trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h
r4274 r4311 6 6 #endif 7 7 8 #ifndef ROOT_TArrayI 8 9 #include <TArrayI.h> 10 #endif 11 12 #ifndef ROOT_TArrayF 13 #include <TArrayF.h> 14 #endif 9 15 10 16 class MExtractedSignalBlindPixel : public MParContainer … … 12 18 private: 13 19 14 Int_t fExtractedSignal; // mean value of the extracted signal 20 static const UInt_t gkNumBlindPixels; //! Current Number of blind pixels in the camera 21 22 TArrayI fBlindPixelIdx; // Array Blind Pixel IDs 23 TArrayF fExtractedSignal; // Array Extracted signals per Blind Pixel ID 24 TArrayI fNumSaturated; // Array Number of saturated slices per Blind Pixel ID 25 26 TArrayF fPed; // Array Pedestal per Blind Pixel IDs 27 TArrayF fPedErr; // Array Pedestal Error per Blind Pixel ID 28 TArrayF fPedRms; // Array Pedestal RMS per Blind Pixel ID 29 TArrayF fPedRmsErr; // Array Pedestal RMS Error per Blind Pixel ID 15 30 16 Byte_t fFirst; 17 Byte_t fNumFADCSamples; 18 Byte_t fNumSaturated; 31 Byte_t fFirst; // First FADC extraction slice 32 Byte_t fNumFADCSamples; // Number of summed FADC slices 19 33 20 Float_t fPed; 21 Float_t fPedErr; 22 Float_t fPedRms; 23 Float_t fPedRmsErr; 24 25 Int_t fBlindPixelIdx; 26 34 27 35 public: 28 36 … … 32 40 void Print(Option_t *o="") const; 33 41 42 // Getters 43 Int_t GetBlindPixelIdx ( const Int_t i=0 ) const { return fBlindPixelIdx.At(i) ; } 44 Float_t GetExtractedSignal ( const Int_t i=0 ) const { return fExtractedSignal.At(i); } 45 Int_t GetNumSaturated ( const Int_t i=0 ) const { return fNumSaturated.At(i) ; } 46 Byte_t GetNumFADCSamples () const { return fNumFADCSamples ; } 47 48 Bool_t IsValid ( const Int_t i=0 ) const; 49 50 Float_t GetPed ( const Int_t i=0 ) const { return fPed.At(i); } 51 Float_t GetPedErr ( const Int_t i=0 ) const { return fPedErr.At(i); } 52 Float_t GetPedRms ( const Int_t i=0 ) const { return fPedRms.At(i); } 53 Float_t GetPedRmsErr ( const Int_t i=0 ) const { return fPedRmsErr.At(i); } 54 34 55 // Setter 35 void SetExtractedSignal(const Int_t sig ) { fExtractedSignal = sig; }36 void SetNumSaturated( const Byte_t numsat ) { fNumSaturated = numsat; }37 56 void SetUsedFADCSlices( const Byte_t first, const Byte_t num); 38 void SetNumFADCSamples( const Byte_t num 57 void SetNumFADCSamples( const Byte_t num ) { fNumFADCSamples = num; } 39 58 40 void SetPed( const Float_t f ) { fPed = f; } 41 void SetPedErr( const Float_t f ) { fPedErr = f; } 42 void SetPedRms( const Float_t f ) { fPedRms = f; } 43 void SetPedRmsErr(const Float_t f ) { fPedRmsErr = f; } 59 void SetBlindPixelIdx ( const Int_t i, const Int_t nr=0) { 60 if (nr>fBlindPixelIdx.GetSize()-1) 61 fBlindPixelIdx.Set(nr+1); 62 fBlindPixelIdx.AddAt(i,nr); } 63 void SetExtractedSignal( const Float_t f, const Int_t nr=0 ) { 64 if (nr>fExtractedSignal.GetSize()-1) 65 fExtractedSignal.Set(nr+1); 66 fExtractedSignal.AddAt(f,nr); } 67 void SetNumSaturated ( const Int_t i, const Int_t nr=0 ) { 68 if (nr>fNumSaturated.GetSize()-1) 69 fNumSaturated.Set(nr+1); 70 fNumSaturated.AddAt(i,nr); } 71 void SetPed ( const Float_t f, const Int_t nr=0 ) { 72 if (nr>fPed.GetSize()-1) 73 fPed.Set(nr+1); 74 fPed.AddAt(f,nr); } 75 void SetPedErr ( const Float_t f, const Int_t nr=0 ) { 76 if (nr>fPedErr.GetSize()-1) 77 fPedErr.Set(nr+1); 78 fPedErr.AddAt(f,nr); } 79 void SetPedRms ( const Float_t f, const Int_t nr=0 ) { 80 if (nr>fPedRms.GetSize()-1) 81 fPedRms.Set(nr+1); 82 fPedRms.AddAt(f,nr); } 83 void SetPedRmsErr ( const Float_t f, const Int_t nr=0 ) { 84 if (nr>fPedRmsErr.GetSize()-1) 85 fPedRmsErr.Set(nr+1); 86 fPedRmsErr.AddAt(f,nr); } 44 87 45 void SetBlindPixelIdx( const Int_t i) { fBlindPixelIdx = i; } 46 47 // Getter 48 Int_t GetExtractedSignal() const { return fExtractedSignal; } 49 Byte_t GetNumFADCSamples() const { return fNumFADCSamples; } 50 Int_t GetBlindPixelIdx() const { return fBlindPixelIdx; } 51 52 Bool_t IsValid() const; 53 54 Float_t GetPed() const { return fPed; } 55 Float_t GetPedErr() const { return fPedErr; } 56 Float_t GetPedRms() const { return fPedRms; } 57 Float_t GetPedRmsErr() const { return fPedRmsErr; } 58 59 ClassDef(MExtractedSignalBlindPixel, 1) // Storage Container for Extracted Signal of the blind pixel 88 ClassDef(MExtractedSignalBlindPixel, 2) // Storage Container for extracted signal of Blind Pixel 60 89 }; 61 90
Note:
See TracChangeset
for help on using the changeset viewer.