Changeset 6302 for trunk/MagicSoft
- Timestamp:
- 02/09/05 10:04:53 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6296 r6302 21 21 -*-*- END OF LINE -*-*- 22 22 23 2005/02/09 Markus Gaug 24 25 * mjobs/MJPedestal.[h,cc] 26 * mjobs/badpixels_0_559.rc 27 - allow exclusion of bad pixels from the beginning (default is 28 Pixel 0 and 559). 29 30 23 31 2005/02/08 Markus Gaug 24 32 … … 26 34 * mcalib/MCalibrationChargeCalc.cc 27 35 - replaced GetNumExecutions()==0 condition by GetNumExecution() < 1 36 28 37 29 38 2005/02/08 Thomas Bretz -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6281 r6302 45 45 #include <TPad.h> 46 46 #include <TEnv.h> 47 #include <TH2F.h> 47 48 48 49 // mars core … … 85 86 #include "MPedCalcFromLoGain.h" 86 87 88 #include <fstream> 89 87 90 ClassImp(MJPedestal); 88 91 … … 90 93 91 94 const TString MJPedestal::fgReferenceFile = "mjobs/pedestalref.rc"; 95 const TString MJPedestal::fgBadPixelsFile = "mjobs/badpixels_0_559.rc"; 92 96 // -------------------------------------------------------------------------- 93 97 // … … 111 115 SetPathIn(""); 112 116 SetReferenceFile(); 117 SetBadPixelsFile(); 113 118 114 119 // … … 149 154 const char* MJPedestal::GetOutputFileName() const 150 155 { 151 if (fSequence.IsValid()) 152 return Form("pedest%08d.root", fSequence.GetSequence()); 153 154 if (!fRuns) 155 return ""; 156 157 return Form("%s-F0.root", (const char*)fRuns->GetRunsAsFileName()); 156 157 if (fSequence.IsValid()) 158 return Form("pedest%08d.root", fSequence.GetSequence()); 159 160 if (!fRuns) 161 return ""; 162 163 return Form("%s-F0.root", (const char*)fRuns->GetRunsAsFileName()); 158 164 } 159 165 … … 815 821 SetExtractor((MExtractor*)tenv.GetTask()); 816 822 817 fReferenceFile = GetEnv("ReferenceFile", fReferenceFile.Data()); 823 fBadPixelsFile = GetEnv("BadPixelsFile",fBadPixelsFile.Data()); 824 fReferenceFile = GetEnv("ReferenceFile",fReferenceFile.Data()); 818 825 ReadReferenceFile(); 819 826 … … 934 941 plist.AddToList(&fBadPixels); 935 942 943 // 944 // Read bad pixels from outside 945 // 946 if (!fBadPixelsFile.IsNull()) 947 { 948 *fLog << err << "Excluding: " << fBadPixelsFile << endl; 949 ifstream f(fBadPixelsFile.Data()); 950 fBadPixels.AsciiRead((istream&)f); 951 f.close(); 952 } 953 936 954 MGeomApply geomapl; 937 955 MBadPixelsMerge merge(&fBadPixels); … … 943 961 pedlogain.SetPedestalUpdate(kFALSE); 944 962 945 MHPedestalCam hpedcam; 946 hpedcam.SetRenorm(kTRUE); 963 fPedestalHist.SetRenorm(kTRUE); 947 964 948 MFillH fillped(& hpedcam, "MExtractedSignalCam", "FillPedestalCam");965 MFillH fillped(&fPedestalHist, "MExtractedSignalCam", "FillPedestalCam"); 949 966 fillped.SetBit(MFillH::kDoNotDisplay); 950 967 … … 967 984 sel.SetNumSelectEvts(0); 968 985 969 if (fExtractionType!=kFundamental )986 if (fExtractionType!=kFundamental && fExtractType!=kUseHists) 970 987 { 971 988 fExtractor->SetFilter(&sel); … … 1002 1019 } 1003 1020 1021 fExtractor->SetPedestals(&fPedestalCamIn); 1022 plist.AddToList(&fPedestalHist); 1004 1023 tlist.AddToList(fExtractor); 1005 1024 tlist.AddToList(&fillped); -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r6281 r6302 2 2 #define MARS_MJPedestal 3 3 4 #ifndef MARS_MJob 5 #include "MJob.h" 6 #endif 4 7 #ifndef MARS_MJCalib 5 8 #include "MJCalib.h" … … 7 10 #ifndef MARS_MPedestalCam 8 11 #include "MPedestalCam.h" 12 #endif 13 #ifndef MARS_MHPedestalCam 14 #include "MHPedestalCam.h" 9 15 #endif 10 16 #ifndef MARS_MBadPixelsCam … … 20 26 class MEvtLoop; 21 27 22 class MJPedestal : public MJ Calib28 class MJPedestal : public MJob, public MJCalib 23 29 { 24 30 private: 25 31 26 32 static const TString fgReferenceFile; //! default for fReferenceFile ("pedestalref.rc") 33 static const TString fgBadPixelsFile; //! default for fBadPixelsFile ("badpixels_0_559.rc") 27 34 28 35 Axis_t fPedestalMin; //! Minimum Axis value for pedestal datacheck display … … 43 50 Float_t fRefPedRmsGalacticOuter; //! Ref. line ped. RMS for galactic source - outer pixels 44 51 45 TString fReferenceFile; // File name containing the reference values 46 52 TString fReferenceFile; // File name containing the reference values 53 TString fBadPixelsFile; // File name containing the bad pixels excluded beforehand 54 47 55 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices 48 56 … … 50 58 MPedestalCam fPedestalCamOut; // Created pedestal results 51 59 MBadPixelsCam fBadPixels; // Bad Pixels 52 60 MHPedestalCam fPedestalHist; // Histogramming pedestal Camera 61 53 62 enum Display_t { kDisplayNone, kDisplayNormal, kDisplayDataCheck }; // Possible Display types 54 63 Display_t fDisplayType; // Chosen Display type … … 76 85 77 86 Bool_t CheckEnvLocal(); 78 void ReadReferenceFile();79 87 80 88 const char* GetOutputFileName() const; … … 89 97 const char* GetOutputFile() const; 90 98 99 MHPedestalCam &GetPedestalHist() { return fPedestalHist; } 100 91 101 const Bool_t IsUseData() const { return fExtractType == kUseData; } 92 102 … … 108 118 void SetExtractionWithExtractor() { fExtractionType=kWithExtractor; /*fPedestalCamOut.SetName("MPedestalExtractor");*/ } 109 119 110 void SetReferenceFile( const TString ref=fgReferenceFile) { fReferenceFile = ref; } // Only usefull to overwrite CheckEnvLocal-default 120 void SetReferenceFile( const TString ref=fgReferenceFile ) { fReferenceFile = ref; } 121 void SetBadPixelsFile( const TString ref=fgBadPixelsFile ) { fBadPixelsFile = ref; } 111 122 112 123 MExtractor *GetExtractor() const { return fExtractor; }
Note:
See TracChangeset
for help on using the changeset viewer.