- Timestamp:
- 02/10/05 02:09:10 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6330 r6331 46 46 Pixel 0 and 559). 47 47 - removed some obsolete includes 48 - took out data member fPedestalHist from MJPedestal.h which removes 49 the crash, however I don't understand why it caused the crash!!! 50 There seem to be problems with memory usage either in callisto.cc 51 or in this class!! 52 (valgrind shows several memory leaks in the TG... classes). 48 53 49 54 * mjobs/MJCalibration.cc -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6324 r6331 102 102 MJPedestal::MJPedestal(const char *name, const char *title) 103 103 : fExtractor(NULL), fDisplayType(kDisplayDataCheck), 104 fExtractType(kUsePedRun), fExtractionType(kFundamental) 104 fExtractType(kUsePedRun), fExtractionType(kFundamental), fIsUseHists(kFALSE) 105 105 { 106 106 fName = name ? name : "MJPedestal"; … … 277 277 disp1.SetCamError (fPedestalCamOut, 3); 278 278 279 if (f ExtractType == kUseHists)279 if (fIsUseHists) 280 280 { 281 281 disp2.SetCamContent(calpedcam, 0); … … 357 357 // Display data 358 358 // 359 if (fDisplayType != kDisplayDataCheck && fExtractType != kUseHists && fExtractionType==kFundamental/*fExtractorResolution*/)359 if (fDisplayType != kDisplayDataCheck && !fIsUseHists && fExtractionType==kFundamental/*fExtractorResolution*/) 360 360 { 361 361 TCanvas &c3 = fDisplay->AddTab("Pedestals"); … … 367 367 } 368 368 369 if (f ExtractType == kUseHists)369 if (fIsUseHists) 370 370 { 371 371 … … 796 796 if (HasEnv("UseHists")) 797 797 if (GetEnv("UseHists",kFALSE)) 798 f ExtractType = kUseHists;798 fIsUseHists = kTRUE; 799 799 800 800 SetNoStorage(GetEnv("DisableOutput", IsNoStorage())); … … 956 956 MPedCalcFromLoGain pedlogain; 957 957 pedlogain.SetPedestalUpdate(kFALSE); 958 959 fPedestalHist.SetRenorm(kTRUE); 960 961 MFillH fillped(&fPedestalHist, "MExtractedSignalCam", "FillPedestalCam"); 962 fillped.SetBit(MFillH::kDoNotDisplay); 958 959 MHPedestalCam hpedcam; 960 // fPedestalHist.SetRenorm(kTRUE); 961 962 MPedestalCam pedinter; 963 pedinter.SetName("MPedestalCamIntermediate"); 964 965 MFillH fillped(&hpedcam, "MPedestalCamIntermediate", "FillPedCam"); 966 // MFillH fillped(&fPedestalHist, "MPedestalCamIntermediate", "FillPedCam"); 967 // fillped.SetBit(MFillH::kDoNotDisplay); 963 968 964 969 tlist.AddToList(&geomapl); … … 979 984 MFEventSelector sel; 980 985 sel.SetNumSelectEvts(0); 981 982 if (fExtractionType!=kFundamental && fExtractType!=kUseHists)986 987 if (fExtractionType!=kFundamental) 983 988 { 984 989 fExtractor->SetFilter(&sel); … … 1006 1011 tlist.AddToList(&taskenv); 1007 1012 break; 1008 1009 case kUseHists: 1010 if (!fExtractor) 1011 { 1012 *fLog << err << GetDescriptor() << " - ERROR: "; 1013 *fLog << "Extraction Type is kUseHists, but no extractor was set" << endl; 1014 return kFALSE; 1015 } 1016 1017 fExtractor->SetPedestals(&fPedestalCamIn); 1018 plist.AddToList(&fPedestalHist); 1019 tlist.AddToList(fExtractor); 1013 } 1014 1015 if (fIsUseHists) 1016 { 1017 pedcalc.SetIntermediateStorage(); 1018 pedlogain.SetIntermediateStorage(); 1019 plist.AddToList(&pedinter); 1020 plist.AddToList(&hpedcam); 1021 // plist.AddToList(&fPedestalHist); 1020 1022 tlist.AddToList(&fillped); 1021 break; 1022 } 1023 } 1023 1024 1024 1025 pedcalc.SetPedestalsIn(&fPedestalCamIn); 1025 1026 pedlogain.SetPedestalsIn(&fPedestalCamIn); 1027 pedcalc.SetPedestalsInter(&pedinter); 1028 pedlogain.SetPedestalsInter(&pedinter); 1029 pedcalc.SetPedestalsOut(&fPedestalCamOut); 1030 pedlogain.SetPedestalsOut(&fPedestalCamOut); 1026 1031 1027 1032 // kFundamental -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r6304 r6331 55 55 MPedestalCam fPedestalCamOut; // Created pedestal results 56 56 MBadPixelsCam fBadPixels; // Bad Pixels 57 MHPedestalCam fPedestalHist; // Histogramming pedestal Camera58 57 // MHPedestalCam fPedestalHist; // Histogramming pedestal Camera 58 59 59 enum Display_t { kDisplayNone, kDisplayNormal, kDisplayDataCheck }; // Possible Display types 60 60 Display_t fDisplayType; // Chosen Display type … … 63 63 Byte_t fStorage; // Bit-field for chosen storage type 64 64 65 enum Extract_t { kUseData, kUsePedRun , kUseHists };// Possible flags for the extraction of the pedestal65 enum Extract_t { kUseData, kUsePedRun }; // Possible flags for the extraction of the pedestal 66 66 Extract_t fExtractType; // Chosen extractor type 67 67 68 68 enum Extraction { kFundamental, kWithExtractorRndm, kWithExtractor }; 69 69 Int_t fExtractionType; // Flag if the extractor is used to calculate the pedestals 70 71 Bool_t fIsUseHists; // Switch on histogramming or not 70 72 71 73 MExtractor *ReadCalibration() const; … … 96 98 const char* GetOutputFile() const; 97 99 98 MHPedestalCam &GetPedestalHist(){ return fPedestalHist; }99 100 // const MHPedestalCam &GetPedestalHist() const { return fPedestalHist; } 101 100 102 const Bool_t IsUseData() const { return fExtractType == kUseData; } 101 103 … … 107 109 void SetExtractor(MExtractor* ext); 108 110 void SetUseData() { fExtractType = kUseData; } 109 void SetUseHists() { f ExtractType = kUseHists; }111 void SetUseHists() { fIsUseHists = kTRUE; } 110 112 void SetUsePedRun() { fExtractType = kUsePedRun; } 111 113 void SetDataCheckDisplay() { fDisplayType = kDisplayDataCheck; }
Note:
See TracChangeset
for help on using the changeset viewer.