Changeset 8795


Ignore:
Timestamp:
12/19/07 18:53:03 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8794 r8795  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2007/12/19 Thomas Bretz
     22
     23   * callisto.cc:
     24     - commented out the obsolete unsused code for moon observations
     25
     26   * mbase/MStatusDisplay.cc:
     27     - added (obsolete?) initialization of fBar suggested by valgrind
     28
     29   * mcalib/MCalibCalcFromPast.cc:
     30     - replaced some floats in sums by doubles
     31
     32   * mextralgo/MExtralgoSpline.[h,cc]:
     33     - fixed some typos in a comment
     34     - removed the first and obsolete argument (sat) from the
     35       Extract member function
     36     - initialize x1 and x2 in GetMax as suggested by valgrind
     37       (should not be necessary)
     38
     39   * mhcalib/HCalibLinkDef.h, mhcalib/Makefile:
     40     - removed obsolete MHPedestal class
     41
     42   * mjobs/MJCalibrateSignal.cc:
     43     - resorted includes, removed obsolete ones
     44
     45   * mjobs/MJPedestal.[h,cc]:
     46     - resorted includes, removed obsolete ones
     47     - removed obsolete fIsUseHists and corresponding code
     48
     49   * mjobs/MSequence.cc:
     50     - allow also NoMoon in addition to No_Moon (which was anyhow
     51       printed if Print was called)
     52
     53   * mpedestal/MExtractPedestal.cc:
     54     - replaced a float in a sum-loop by a double
     55
     56   * mpedestal/MPedestalCam.[h,cc]:
     57     - tiny change to Print function
     58     - some improvements to comments
     59
     60   * mpedestal/MPedestalSubtract.cc:
     61     - removed an obsolete cast in memcpy
     62     - fixed a bug (the *src-ptr was not increased when no pedestal
     63       was given)
     64
     65   * msignal/MExtractTimeAndChargeSpline.cc:
     66     - removed the first argument from call to the Extracy function
     67
     68
    2069
    2170 2007/12/18 Daniela Dorner
  • trunk/MagicSoft/Mars/callisto.cc

    r8741 r8795  
    8585    gLog << "   --movie                   Write a movie in addition to Mode-Y (this might " << endl;
    8686    gLog << "                             stop the eventloop before all evts are processed)" << endl;
    87     gLog << "   --moon                    Force using pedestal fits instead of calculated RMS" << endl;
     87//    gLog << "   --moon                    Force using pedestal fits instead of calculated RMS" << endl;
    8888    gLog << "   --config=callisto.rc      Resource file [default=callisto.rc]" << endl;
    8989    gLog << endl;
     
    174174    const Bool_t  kMovie      = arg.HasOnlyAndRemove("--movie");
    175175    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
    176           Bool_t  kMoon       = arg.HasOnlyAndRemove("--moon");
     176//          Bool_t  kMoon       = arg.HasOnlyAndRemove("--moon");
    177177    Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0;
    178178    kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv);
     
    312312        PrintFiles(seq, kInpathD, !seq.IsMonteCarlo(), kTRUE);
    313313
    314     if (seq.HasMoon())
    315         kMoon = kTRUE;
     314//    if (seq.HasMoon())
     315//        kMoon = kTRUE;
    316316
    317317
     
    372372        job1.SetDisplay(d);
    373373        job1.SetOverwrite(kOverwrite);
    374         job1.SetUseHists(kMoon);
     374//        job1.SetUseHists(kMoon);
    375375
    376376
     
    401401        job2.SetDisplay(d);;
    402402        job2.SetOverwrite(kOverwrite);
    403         job2.SetUseHists(kMoon);
     403//        job2.SetUseHists(kMoon);
    404404        job2.SetDeadPixelCheck();
    405405        // job1.SetPathOut(kOutpathC); // not yet needed
     
    504504        job1.SetUseData();
    505505        job1.SetExtractionFundamental();
    506         job1.SetUseHists(kMoon);
     506//        job1.SetUseHists(kMoon);
    507507
    508508        if (!job1.Process())
     
    538538        job2.SetPedestals(job1.GetPedestalCam());
    539539        job2.SetBadPixels(job1.GetBadPixels());
    540         job2.SetUseHists(kMoon);
     540//        job2.SetUseHists(kMoon);
    541541
    542542        // Please check the Changelog of 2005/04/20 about further deatils of the next comment
     
    593593        job3.SetPedestals(job1.GetPedestalCam());
    594594        job3.SetBadPixels(job1.GetBadPixels());
    595         job3.SetUseHists(kMoon);
     595//        job3.SetUseHists(kMoon);
    596596
    597597        if (!job3.Process())
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8746 r8795  
    685685//
    686686MStatusDisplay::MStatusDisplay(Int_t w, Int_t h, Long_t t)
    687 : TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
     687: TGMainFrame(NULL, 1, 1), fName("MStatusDisplay"), fLog(&gLog), fBar(NULL), fTab(NULL), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL), fIsLocked(0)
    688688{
    689689    // p==NULL means: Take gClient->GetRoot() if not in batch mode
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r8452 r8795  
    414414Bool_t MCalibCalcFromPast::UpdateMeanPhes()
    415415{
    416     Float_t sumw = 0.;
    417     Float_t sum  = 0.;
     416    Double_t sumw = 0.;
     417    Double_t sum  = 0.;
    418418
    419419    for (Int_t i=0; i<fPhes.GetSize(); i++)
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.cc

    r8549 r8795  
    7676    static MArrayF lut;
    7777
    78     // If the lut is not et large enough resize and reclaculate
     78    // If the lut is not yet large enough: resize and reclaculate
    7979    if (fNum>(Int_t)lut.GetSize())
    8080    {
     
    246246}
    247247
    248 void MExtralgoSpline::Extract(Byte_t sat, Int_t maxbin, Bool_t width)
     248void MExtralgoSpline::Extract(Int_t maxbin, Bool_t width)
    249249{
    250250    fSignal    =  0;
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h

    r8549 r8795  
    262262        // Find analytical maximum in the bin i in the interval [min,max[
    263263
    264         Double_t x1, x2;
     264        Double_t x1=-1;  // This initialisation should not really be
     265        Double_t x2=-1;  // necessary but makes valgriund happy.
     266
    265267        if (!EvalDerivEq0(i, x1, x2))
    266268            return kFALSE;
     
    318320
    319321    Float_t ExtractNoise(/*Int_t iter*/);
    320     void Extract(Byte_t sat, Int_t maxpos, Bool_t width=kFALSE);
     322    void Extract(Int_t maxpos, Bool_t width=kFALSE);
    321323
    322324    Float_t EvalAt(const Float_t x) const;
  • trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h

    r8300 r8795  
    1414#pragma link C++ class MHCalibrationRelTimeCam+;
    1515#pragma link C++ class MHCalibrationTestCam+;
     16#pragma link C++ class MHCalibrationTestTimeCam+;
     17#pragma link C++ class MHCalibrationPulseTimeCam+;
    1618//#pragma link C++ class MHCalibrationHiLoCam+;
    1719//#pragma link C++ class MHCalibrationHiLoPix+;
    18 #pragma link C++ class MHCalibrationPulseTimeCam+;
    19 #pragma link C++ class MHPedestalCam+;
    20 #pragma link C++ class MHPedestalPix+;
    21 #pragma link C++ class MHCalibrationTestTimeCam+;
     20//#pragma link C++ class MHPedestalCam+;
     21//#pragma link C++ class MHPedestalPix+;
    2222
    2323#pragma link C++ class MHGausEvents+;
  • trunk/MagicSoft/Mars/mhcalib/Makefile

    r8300 r8795  
    4242           MHCalibrationTestCam.cc \
    4343           MHCalibrationPulseTimeCam.cc \
    44            MHPedestalCam.cc \
    45            MHPedestalPix.cc \
    4644           MHCalibrationTestTimeCam.cc \
    4745           MHGausEvents.cc
     46
     47#           MHPedestalCam.cc \
     48#           MHPedestalPix.cc \
    4849
    4950############################################################
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8790 r8795  
    4040#include <TFile.h>
    4141
     42// Core
    4243#include "MLog.h"
    4344#include "MLogManip.h"
    4445
    4546#include "MDirIter.h"
    46 #include "MRunIter.h"
     47#include "MTaskList.h"
    4748#include "MParList.h"
    48 #include "MTaskList.h"
    4949#include "MEvtLoop.h"
    5050
    5151#include "MStatusDisplay.h"
    5252
     53// General containers
    5354#include "MGeomCam.h"
     55#include "MBadPixelsCam.h"
     56#include "MCalibConstCam.h"
     57#include "MPedestalCam.h"
     58#include "MArrivalTimeCam.h"
     59
     60// General histograms
    5461#include "MHCamEvent.h"
    55 #include "MPedestalCam.h"
    56 #include "MBadPixelsCam.h"
    57 #include "MArrivalTimeCam.h"
    58 
     62#include "MHVsTime.h"
     63
     64// Calibration containers
    5965#include "MCalibrationQECam.h"
    6066#include "MCalibrationBlindCam.h"
     
    6268#include "MCalibrationRelTimeCam.h"
    6369#include "MCalibrationChargePINDiode.h"
    64 #include "MCalibrationPatternDecode.h"
    65 
    66 #include "MCalibrationChargeCalc.h"
    67 #include "MCalibrationRelTimeCalc.h"
    68 
    69 #include "MCalibConstCam.h"
    70 
     70
     71// Calibration histograms
    7172#include "MHCalibrationChargeCam.h"
    7273#include "MHCalibrationChargeBlindCam.h"
    7374#include "MHCalibrationChargePINDiode.h"
    7475#include "MHCalibrationRelTimeCam.h"
    75 #include "MHCalibrationPulseTimeCam.h"
    76 #include "MHVsTime.h"
    77 #include "MHCamera.h"
    78 
    79 #include "MCalibCalcFromPast.h"
    80 
     76
     77// Tasks
    8178#include "MReadMarsFile.h"
    8279#include "MRawFileRead.h"
     80#include "MTaskEnv.h"
    8381#include "MContinue.h"
     82#include "MFillH.h"
     83#include "MGeomApply.h"
     84#include "MExtractTimeAndCharge.h"
    8485#include "MTriggerPatternDecode.h"
    85 #include "MFTriggerPattern.h"
    86 #include "MFDataPhrase.h"
    87 #include "MFilterList.h"
    88 #include "MGeomApply.h"
     86#include "MCalibrationPatternDecode.h"
     87#include "MCalibrationChargeCalc.h"
     88#include "MCalibrationRelTimeCalc.h"
     89#include "MCalibCalcFromPast.h"
    8990#include "MPedestalSubtract.h"
    90 #include "MPointingPosCalc.h"
    9191#include "MPedCalcFromLoGain.h"
    92 #include "MPedestalSubtract.h"
    93 #include "MExtractor.h"
    94 #include "MExtractTimeAndCharge.h"
     92#include "MCalibrateData.h"
    9593#include "MExtractPINDiode.h"
    9694#include "MExtractBlindPixel.h"
    97 #include "MFCosmics.h"
    98 #include "MTaskEnv.h"
    99 #include "MCalibrateData.h"
    10095#include "MCalibrateRelTimes.h"
    10196#include "MBadPixelsCalc.h"
    10297#include "MBadPixelsTreat.h"
    103 #include "MFillH.h"
    10498#include "MWriteRootFile.h"
    10599
     100// Filter
     101#include "MFTriggerPattern.h"
     102#include "MFCosmics.h"
     103#include "MFilterList.h"
     104#include "MFDataPhrase.h"
     105
     106// Classes for writing movies
    106107#include "MFEvtNumber.h"
    107108#include "MMoviePrepare.h"
    108109#include "MMovieWrite.h"
    109110#include "MImgCleanStd.h"
     111
    110112
    111113ClassImp(MJCalibrateSignal);
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8788 r8795  
    4141// root classes
    4242#include <TF1.h>
     43#include <TLine.h>
     44#include <TLatex.h>
     45#include <TLegend.h>
     46
    4347#include <TEnv.h>
    4448#include <TFile.h>
    45 #include <TLine.h>
    46 #include <TLatex.h>
    47 #include <TString.h>
    48 #include <TCanvas.h>
    49 #include <TSystem.h>
    50 #include <TLegend.h>
    51 #include <TPad.h>
    52 #include <TEnv.h>
    53 #include <TH2F.h>
    5449
    5550// mars core
     
    7469#include "MPedestalPix.h"
    7570
     71//#include "MHPedestalPix.h"
    7672#include "MCalibrationPix.h"
    77 #include "MHPedestalPix.h"
    7873#include "MHCalibrationPulseTimeCam.h"
    7974#include "MCalibrationPulseTimeCam.h"
     
    9287#include "MFTriggerPattern.h"
    9388#include "MBadPixelsCalc.h"
    94 
    95 #include "MPedPhotCam.h"
    96 #include "MPedPhotPix.h"
    97 #include "MPedestalCam.h"
    98 #include "MPedestalPix.h"
    9989#include "MPedestalSubtract.h"
    10090
     
    121111    : fExtractor(NULL), fDisplayType(kDisplayDataCheck),
    122112    fExtractType(kUsePedRun), fExtractionType(kFundamental),
    123     fIsUseHists(kFALSE), fDeadPixelCheck(kFALSE), fMinEvents(50)
     113    /*fIsUseHists(kFALSE),*/ fDeadPixelCheck(kFALSE), fMinEvents(50)
    124114{
    125115    fName  = name  ? name  : "MJPedestal";
     
    337327      }
    338328   
    339 #if 0
     329/*
    340330    if (fIsUseHists)
    341331      {
     
    353343        disp5.CamDraw(c4, 2, 2, 5);
    354344
    355         /*
    356         TCanvas &c5 = fDisplay->AddTab("Difference Hist.");
    357         c5.Divide(2,3);
    358        
    359         disp6.CamDraw(c5, 1, 2, 1);
    360         disp7.CamDraw(c5, 2, 2, 5);
    361         */
     345        //TCanvas &c5 = fDisplay->AddTab("Difference Hist.");
     346        //c5.Divide(2,3);
     347        //
     348        //disp6.CamDraw(c5, 1, 2, 1);
     349        //disp7.CamDraw(c5, 2, 2, 5);
    362350
    363351        TCanvas &c6 = fDisplay->AddTab("Difference Calc.");
     
    368356        return;
    369357      }
    370 #endif
     358*/
    371359    if (fDisplayType == kDisplayDataCheck)
    372360      {
     
    785773    }
    786774
    787 
    788     if (HasEnv("UseHists"))
    789       if (GetEnv("UseHists",kFALSE))
    790         fIsUseHists = kTRUE;
    791    
     775//    fIsUseHists = GetEnv("UseHists", fIsUseHists);
     776
    792777    SetNoStorage(GetEnv("DisableOutput", IsNoStorage()));
    793778
     
    844829Int_t MJPedestal::PulsePosCheck(const MParList &plist) const
    845830{
     831    /*
    846832    if (fIsPixelCheck)
    847833    {
     
    853839        }
    854840    }
    855 
     841    */
    856842    if (!fIsPulsePosCheck)
    857843        return kTRUE;
     
    869855    MCalibrationPulseTimeCam *cam = NULL;
    870856    if (!fSequence.IsMonteCarlo())
    871     {
     857    {  /*
    872858        if (fIsPixelCheck)
    873859        {
     
    885871            gPad->SaveAs(Form("%s/PulsePosTest_Pixel%04d.root",fPathOut.Data(),fCheckedPixId));
    886872        }
    887 
     873        */
    888874        cam = (MCalibrationPulseTimeCam*)plist.FindObject("MCalibrationPulseTimeCam");
    889875        if (!cam)
     
    10661052    pedlogain.SetPedestalUpdate(kFALSE);
    10671053   
    1068     MHPedestalCam hpedcam;
    1069     hpedcam.SetPedestalsOut(&fPedestalCamOut);
    1070     if (fExtractionType != kFundamental)
    1071         hpedcam.SetRenorm(kTRUE);
     1054//    MHPedestalCam hpedcam;
     1055//    hpedcam.SetPedestalsOut(&fPedestalCamOut);
     1056//    if (fExtractionType != kFundamental)
     1057//        hpedcam.SetRenorm(kTRUE);
    10721058
    10731059    // To have it in the parlist for MEnv!
     
    11721158        break;
    11731159    }
    1174    
     1160/*
    11751161    if (fIsUseHists && fExtractor)
    11761162      {
     
    11881174        plist.AddToList(&hpedcam);
    11891175    }
    1190 
     1176 */
    11911177    pedcalc.SetPedestalsOut(&fPedestalCamOut);
    11921178    pedlogain.SetPedestalsOut(&fPedestalCamOut);
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r8788 r8795  
    7171    Int_t fExtractionType;                   // Flag if the extractor is used to calculate the pedestals
    7272
    73     Bool_t fIsUseHists;                      // Switch on histogramming or not
     73//    Bool_t fIsUseHists;                      // Switch on histogramming or not
    7474    Bool_t fDeadPixelCheck;                  // Should the dead pixel check be done?
    7575
     
    113113    void SetExtractor(MExtractor* ext);
    114114    void SetUseData()                           { fExtractType = kUseData;   }
    115     void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
     115//    void SetUseHists( const Bool_t b=kTRUE)     { fIsUseHists = b;  }
    116116    void SetDeadPixelCheck(const Bool_t b=kTRUE) { fDeadPixelCheck = b; }
    117117    void SetUsePedRun()                         { fExtractType = kUsePedRun; }
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r8780 r8795  
    406406    if (!str.CompareTo("No_Moon", TString::kIgnoreCase))
    407407        return kNoMoon;
     408    if (!str.CompareTo("NoMoon", TString::kIgnoreCase))
     409        return kNoMoon;
    408410    if (!str.CompareTo("Twilight", TString::kIgnoreCase))
    409411        return kTwilight;
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r8788 r8795  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.37 2007-12-14 09:56:03 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.38 2007-12-19 18:53:02 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    749749        (*fPedestalsInter)[idx].Set(sum, 0, 0, fNumEventsUsed[idx]);
    750750
    751     const Float_t sqrsum = sum*sum;
     751    const Double_t sqrsum = sum*sum;
    752752
    753753    fSumx[idx]  += sum;
  • trunk/MagicSoft/Mars/mpedestal/MPedestalCam.h

    r8788 r8795  
    2424
    2525  UInt_t fNumSlices;  // Total number of slices
    26   UInt_t fNumEvents;  // Number of events used for pedestal calculation
     26  UInt_t fNumEvents;  // Number of events used for pedestal calculation (be careful, it has no predefined meaning!)
    2727
    2828  void PrintArr(const TCollection &list) const;
  • trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc

    r8633 r8795  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.8 2007-07-14 00:02:24 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.9 2007-12-19 18:53:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    132132{
    133133    if (fRawEvt->GetNumBytesPerSample()==2)
    134         memcpy((UShort_t*)dest, src, cnt*2);
     134        memcpy(dest, src, cnt*2);
    135135    else
    136136    {
     
    186186        {
    187187            while (beg<end)
    188                 *beg++ = *src;//Float_t(*src++)/scale;
     188                *beg++ = *src++;//Float_t(*src++)/scale;
    189189            continue;
    190190        }
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc

    r8679 r8795  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.69 2007-08-19 21:40:03 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndChargeSpline.cc,v 1.70 2007-12-19 18:53:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    346346    }
    347347
    348     s.Extract(sat, maxpos);
     348    s.Extract(maxpos);
    349349    s.GetTime(time, dtime);
    350350    s.GetSignal(sum, dsum);
     
    369369    }
    370370
    371     s.Extract(sat, maxpos);
     371    s.Extract(maxpos);
    372372    s.GetTime(time, dtime);
    373373    s.GetSignal(sum, dsum);
Note: See TracChangeset for help on using the changeset viewer.