Changeset 6331 for trunk


Ignore:
Timestamp:
02/10/05 02:09:10 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6330 r6331  
    4646       Pixel 0 and 559).
    4747     - 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).
    4853 
    4954   * mjobs/MJCalibration.cc
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r6324 r6331  
    102102MJPedestal::MJPedestal(const char *name, const char *title)
    103103    : fExtractor(NULL), fDisplayType(kDisplayDataCheck),
    104       fExtractType(kUsePedRun), fExtractionType(kFundamental)
     104      fExtractType(kUsePedRun), fExtractionType(kFundamental), fIsUseHists(kFALSE)
    105105{
    106106    fName  = name  ? name  : "MJPedestal";
     
    277277    disp1.SetCamError  (fPedestalCamOut, 3);
    278278
    279     if (fExtractType == kUseHists)
     279    if (fIsUseHists)
    280280      {
    281281        disp2.SetCamContent(calpedcam, 0);
     
    357357    // Display data
    358358    //
    359     if (fDisplayType != kDisplayDataCheck && fExtractType != kUseHists && fExtractionType==kFundamental/*fExtractorResolution*/)
     359    if (fDisplayType != kDisplayDataCheck &&  !fIsUseHists && fExtractionType==kFundamental/*fExtractorResolution*/)
    360360      {
    361361        TCanvas &c3 = fDisplay->AddTab("Pedestals");
     
    367367      }
    368368   
    369     if (fExtractType == kUseHists)
     369    if (fIsUseHists)
    370370      {
    371371       
     
    796796    if (HasEnv("UseHists"))
    797797      if (GetEnv("UseHists",kFALSE))
    798         fExtractType = kUseHists;
     798        fIsUseHists = kTRUE;
    799799   
    800800    SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
     
    956956    MPedCalcFromLoGain pedlogain;
    957957    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);
    963968
    964969    tlist.AddToList(&geomapl);
     
    979984    MFEventSelector sel;
    980985    sel.SetNumSelectEvts(0);
    981 
    982     if (fExtractionType!=kFundamental && fExtractType!=kUseHists)
     986   
     987    if (fExtractionType!=kFundamental)
    983988      {
    984989        fExtractor->SetFilter(&sel);
     
    10061011        tlist.AddToList(&taskenv);
    10071012        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);
    10201022        tlist.AddToList(&fillped);
    1021         break;
    1022     }
     1023      }
    10231024
    10241025    pedcalc.SetPedestalsIn(&fPedestalCamIn);
    10251026    pedlogain.SetPedestalsIn(&fPedestalCamIn);
     1027    pedcalc.SetPedestalsInter(&pedinter);
     1028    pedlogain.SetPedestalsInter(&pedinter);
     1029    pedcalc.SetPedestalsOut(&fPedestalCamOut);
     1030    pedlogain.SetPedestalsOut(&fPedestalCamOut);
    10261031
    10271032     // kFundamental
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r6304 r6331  
    5555    MPedestalCam  fPedestalCamOut;           // Created pedestal results
    5656    MBadPixelsCam fBadPixels;                // Bad Pixels
    57     MHPedestalCam fPedestalHist;             // Histogramming pedestal Camera
    58    
     57    //    MHPedestalCam fPedestalHist;             // Histogramming pedestal Camera
     58
    5959    enum Display_t { kDisplayNone, kDisplayNormal, kDisplayDataCheck }; // Possible Display types
    6060    Display_t fDisplayType;                  // Chosen Display type
     
    6363    Byte_t fStorage;                         // Bit-field for chosen storage type
    6464
    65     enum Extract_t { kUseData, kUsePedRun, kUseHists }; // Possible flags for the extraction of the pedestal
     65    enum Extract_t { kUseData, kUsePedRun }; // Possible flags for the extraction of the pedestal
    6666    Extract_t fExtractType;                  // Chosen extractor type
    6767
    6868    enum Extraction { kFundamental, kWithExtractorRndm, kWithExtractor };
    6969    Int_t fExtractionType;                   // Flag if the extractor is used to calculate the pedestals
     70
     71    Bool_t fIsUseHists;                      // Switch on histogramming or not
    7072
    7173    MExtractor *ReadCalibration() const;
     
    9698    const char*  GetOutputFile() const;
    9799
    98     MHPedestalCam &GetPedestalHist()  { return fPedestalHist;  }
    99    
     100    //    const MHPedestalCam &GetPedestalHist() const { return fPedestalHist;  }
     101
    100102    const Bool_t IsUseData() const { return fExtractType == kUseData; }
    101103
     
    107109    void SetExtractor(MExtractor* ext);
    108110    void SetUseData()                           { fExtractType = kUseData;   }
    109     void SetUseHists()                          { fExtractType = kUseHists;  }
     111    void SetUseHists()                          { fIsUseHists = kTRUE;  }
    110112    void SetUsePedRun()                         { fExtractType = kUsePedRun; }
    111113    void SetDataCheckDisplay()                  { fDisplayType = kDisplayDataCheck; }
Note: See TracChangeset for help on using the changeset viewer.