Changeset 4386 for trunk/MagicSoft/Mars/msignal
- Timestamp:
- 07/15/04 11:20:42 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.cc
r4381 r4386 81 81 // - fNSBFilterLimit to fgNSBFilterLimit 82 82 // - fResolution to fgResolution 83 // - fExtractionType to kAmplitude83 // - fExtractionType to 0. 84 84 // 85 85 // Calls: … … 103 103 SetFirst(); 104 104 SetLast(); 105 106 SetExtractionType();107 105 108 106 Clear(); … … 138 136 // - fModified to kFALSE 139 137 // - fBlindPixelIdx to 0 138 // - fExtractionType to 0 140 139 // 141 140 // Calls: … … 150 149 { 151 150 152 fModified = kFALSE; 151 fModified = kFALSE; 152 fExtractionType = 0; 153 153 154 154 fBlindPixelIdx.Set(0); … … 245 245 { 246 246 fModified = kTRUE; 247 SetExtractionType(kAmplitude); 247 248 SetRange(fFirst,fLast); 248 249 for (Int_t i=0;i<3;i++) … … 256 257 fBlindPixel->SetBlindPixelIdx(fBlindPixelIdx.At(0)); 257 258 SetExtractionType(kIntegral); 259 SetExtractionType(kFilter); 258 260 } 259 261 260 fBlindPixel->Set UsedFADCSlices(fHiGainFirst, fHiGainLast);261 262 fBlindPixel->SetExtractionType(fExtractionType); 263 262 264 for (Int_t i=0;i<fBlindPixelIdx.GetSize();i++) 263 265 { … … 293 295 } 294 296 295 Int_t lastdesired = (Int_t)fHiGainLast; 296 lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1; 297 const Int_t lastdesired = (Int_t)fHiGainLast; 297 298 298 299 if (lastdesired > lastavailable) … … 311 312 << Form("%s%2i",": Will reduce upper limit by ",diff) 312 313 << endl; 313 fHiGainLast = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1; 314 diff = (Int_t)fRunHeader->GetNumSamplesLoGain() - 1; 314 diff = (Int_t)fRunHeader->GetNumSamplesLoGain(); 315 315 } 316 316 317 fHiGainLast = (Int_t)fRunHeader->GetNumSamplesHiGain() - 1; 317 318 fHiLoLast = diff; 318 319 } … … 334 335 << " to (including) " 335 336 << Form("%s%2i",fHiLoLast ? "Low Gain slice " : " High Gain slice ", 336 fHiLoLast ? (Int_t)fHiLoLast : (Int_t)fHiGainLast )337 fHiLoLast ? (Int_t)fHiLoLast-1 : (Int_t)fHiGainLast ) 337 338 << endl; 339 340 341 fBlindPixel->SetUsedFADCSlices(fHiGainFirst, range); 338 342 339 343 return kTRUE; … … 380 384 sat++; 381 385 } 386 382 387 sum = (Float_t)summ; 383 388 } … … 437 442 438 443 p = logain + fHiLoFirst; 439 end = logain + fHiLoLast + 1;444 end = logain + fHiLoLast; 440 445 441 446 while (p<end) … … 700 705 } 701 706 707 // ------------------------------------------------------------------------------------ 708 // 709 // Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter 710 // The flags kIntegral and kFilter may be set both. 711 // 712 Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ ) 713 { 714 715 return TESTBIT( fExtractionType, typ ); 716 717 } 718 702 719 // -------------------------------------------------------------------------- 703 720 // 704 721 // Sets the extraction type. Available are: kAmplitude and kIntegral 705 722 // 706 Bool_t MExtractBlindPixel::IsExtractionType( const ExtractionType_t typ )707 {708 709 return TESTBIT( fExtractionType, typ );710 711 }712 713 // --------------------------------------------------------------------------714 //715 // Sets the extraction type. Available are: kAmplitude and kIntegral716 //717 723 void MExtractBlindPixel::SetExtractionType( const ExtractionType_t typ ) 718 724 { 719 720 fExtractionType = 0;721 725 SETBIT( fExtractionType, typ ); 722 723 } 726 } -
trunk/MagicSoft/Mars/msignal/MExtractBlindPixel.h
r4385 r4386 46 46 47 47 public: 48 enum ExtractionType_t { kAmplitude, kIntegral };48 enum ExtractionType_t { kAmplitude, kIntegral, kFilter }; 49 49 50 50 -
trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.cc
r4374 r4386 44 44 using namespace std; 45 45 46 static const Int_t gkSignalInitializer = 99999; 47 46 const Int_t MExtractedSignalBlindPixel::gkSignalInitializer = 99999; 48 47 // ------------------------------------------------------------------------ 49 48 // … … 54 53 // - the dimenstion of fNumSaturated to 1 55 54 // - the dimenstion of fPed. to 1; 56 // - the dimenstion of fPedErr. to 1; )55 // - the dimenstion of fPedErr. to 1; 57 56 // - the dimenstion of fPedRms. to 1; 58 57 // - the dimenstion of fPedRmsErr. to 1; … … 131 130 } 132 131 } 132 133 // ------------------------------------------------------------------------------------ 134 // 135 // Returns true if the extraction type. Available are: kAmplitude, kIntegral and kFilter 136 // The flags kIntegral and kFilter may be set both. 137 // 138 Bool_t MExtractedSignalBlindPixel::IsExtractionType( const MExtractBlindPixel::ExtractionType_t typ ) 139 { 140 141 return TESTBIT( fExtractionType, typ ); 142 143 } -
trunk/MagicSoft/Mars/msignal/MExtractedSignalBlindPixel.h
r4373 r4386 14 14 #endif 15 15 16 #ifndef MARS_MExtractBlindPixel 17 #include <MExtractBlindPixel.h> 18 #endif 19 16 20 class MExtractedSignalBlindPixel : public MParContainer 17 21 { 18 22 private: 19 23 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 24 static const Int_t gkSignalInitializer; //! Initializer for variables 30 25 31 Byte_t fFirst; // First FADC extraction slice 32 Byte_t fNumFADCSamples; // Number of summed FADC slices 33 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? 34 38 35 39 public: … … 47 51 Byte_t GetNumFADCSamples () const { return fNumFADCSamples ; } 48 52 49 Float_t GetPed ( const Int_t i=0 ) const { return fPed.At(i);}50 Float_t GetPedErr ( const Int_t i=0 ) const { return fPedErr.At(i);}51 Float_t GetPedRms ( const Int_t i=0 ) const { return fPedRms.At(i);}52 Float_t GetPedRmsErr ( const Int_t i=0 ) const { return fPedRmsErr.At(i); }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) ; } 53 57 54 Bool_t IsValid ( const Int_t i=0 ) const; 58 Bool_t IsExtractionType ( const MExtractBlindPixel::ExtractionType_t typ ); 59 Bool_t IsValid ( const Int_t i=0 ) const; 55 60 56 61 // Setter 57 void SetUsedFADCSlices( const Byte_t first, const Byte_t num); 58 void SetNumFADCSamples( const Byte_t num ) { fNumFADCSamples = num; } 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 ); 59 65 60 66 void SetBlindPixelIdx ( const Int_t i, const Int_t nr=0) { … … 87 93 fPedRmsErr.AddAt(f,nr); } 88 94 89 ClassDef(MExtractedSignalBlindPixel, 2) // Storage Container for extracted signal of Blind Pixel95 ClassDef(MExtractedSignalBlindPixel, 3) // Storage Container for extracted signal of Blind Pixel 90 96 }; 91 97
Note:
See TracChangeset
for help on using the changeset viewer.