Changeset 8988 for trunk


Ignore:
Timestamp:
06/30/08 10:37:00 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8987 r8988  
    3131     - added ' around the where clause in UpdateInsert to allowe
    3232       also for times etc
     33
     34   * callisto.cc:
     35     - removed test-option (it was never used anyway and should
     36       be reprogrammed properly)
     37
     38   * datacenter/macros/plotdb.C, mbase/MStatusDisplay.h, mbase/MTime.h:
     39     - removed unused argument
     40
     41   * mbadpixels/MBadPixelsPix.h:
     42     - added static functions to get names and numbers of unsuitable
     43       and unreliable levels
     44
     45   * mbase/MMath.cc:
     46     - made MedianDevImp working properly with a template
     47
     48   * mhcalib/HCalibLinkDef.h, mhcalib/Makefile:
     49     - removed MHCalibrationTestCam
     50     - removed MHCalibrationTestTimeCam
     51
     52   * mhcalib/MHCalibrationCam.cc:
     53     - removed an obsolete TPad in Draw()
     54     - removed some obsolete kCanDelete in Drwa()
     55
     56   * mhcalib/MHCalibrationChargeCam.cc:
     57     - changed some colors to work properly also in root 5.20/00
     58
     59   * mhflux/MHThreshold.cc:
     60     - made Smooth work with root 5.20/00 (to be checked)
     61
     62   * mhist/MHCamera.[h,cc]:
     63     - fixed defaults in Profile and Projection function to match code
     64     - fixed some comments
     65     - replaced InheritsFrom arguments by TClass statics
     66
     67   * mjobs/JobsLinkDef.h:
     68     - removed MJCalibTest
     69
     70   * mjobs/MJCalibrateSignal.cc, mjobs/Makefile:
     71     - removed obsolete include of MParameterCalc
     72
     73   * mranforest/MRanForest.cc:
     74     - added a cast in BinarySearch to make it work with the template
     75       of root 5.20/00
     76
     77   * mtools/MCalendar.h:
     78     - fixed *MENU option
     79
     80   * mtools/MagicJam.h:
     81     - added the Smooth function of root 5.20/00 to be removed from
     82       the context menu
    3383
    3484
  • trunk/MagicSoft/Mars/NEWS

    r8985 r8988  
    22
    33== <cvs> ==
     4
     5 ;general
     6
     7   * should work now with root 5.20/00
    48
    59
  • trunk/MagicSoft/Mars/callisto.cc

    r8986 r8988  
    8282    gLog << "   --print-files             Print Files taken from Sequence" << endl;
    8383    gLog << "   --print-found             Print Files found from Sequence" << endl;
    84     gLog << "   --use-test                Apply calibration constants to same calibration" << endl;
    85     gLog << "                             file (for testing, calibration mode only)" << endl;
     84//    gLog << "   --use-test                Apply calibration constants to same calibration" << endl;
     85//    gLog << "                             file (for testing, calibration mode only)" << endl;
    8686    gLog << "   --movie                   Write a movie in addition to Mode-Y (this might " << endl;
    8787    gLog << "                             stop the eventloop before all evts are processed)" << endl;
     
    172172    const Bool_t  kPrintFiles = arg.HasOnlyAndRemove("--print-files");
    173173    const Bool_t  kPrintFound = arg.HasOnlyAndRemove("--print-found");
    174     const Bool_t  kUseTest    = arg.HasOnlyAndRemove("--use-test");
     174//    const Bool_t  kUseTest    = arg.HasOnlyAndRemove("--use-test");
    175175    const Bool_t  kMovie      = arg.HasOnlyAndRemove("--movie");
    176176    const Bool_t  kDebugMem   = arg.HasOnlyAndRemove("--debug-mem");
     
    458458            return 1;
    459459        }
    460 
     460/*
    461461        if (kUseTest)
    462462        {
     
    484484                return 1;
    485485            }
    486         }
     486        }*/
    487487    }
    488488
  • trunk/MagicSoft/Mars/datacenter/macros/plotdb.C

    r8987 r8988  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.47 2008-06-30 08:46:03 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.48 2008-06-30 09:36:34 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    386386            fDataSet = new MDataSet(filename);
    387387    }
    388     void SetPlotRange(Float_t min, Float_t max, Int_t n=5) { fPlotMin = min; fPlotMax = max; }
     388    void SetPlotRange(Float_t min, Float_t max/*, Int_t n=5*/) { fPlotMin = min; fPlotMax = max; }
    389389    void SetHistRange(Float_t min, Float_t max) { fHistMin = min; fHistMax = max; }
    390390    void SetRequestRange(const char *from="", const char *to="") { fRequestFrom = from; fRequestTo = to; }
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h

    r8580 r8988  
    115115    }
    116116
     117    static TString GetUnsuitableName(Int_t lvl)
     118    {
     119        switch (lvl)
     120        {
     121        case  1: return "Signal smaller 4.5 Pedestal RMS";
     122        case  2: return "Low Gain Saturation";
     123        case  3: return "High-Gain Histogram Overflow";
     124        case  4: return "Low-Gain Histogram Overflow";
     125        case  5: return "Presumably dead from Ped. Rms";
     126        case  6: return "Deviating Number of Photo-electrons";
     127        case  7: return "Deviation from median abs.arr-time rms";
     128        case  8: return "Deviation from median rel.arr-time rms";
     129        case  9: return "Too many Low-Gain Blackout Events";
     130        case 10: return "Previously Excluded";
     131        default: return "";
     132        }
     133    }
     134
     135    static Int_t GetNumUnsuitable() { return 10; }
     136
    117137    Int_t  GetUnreliableCalLevel() const   {
    118138      if (!IsUnreliable() || IsUnsuitable())      return 0;
     
    128148    }
    129149
     150    static TString GetUnreliableName(Int_t lvl)
     151    {
     152        switch (lvl)
     153        {
     154        case 1: return "Signal Sigma smaller Pedestal RMS";
     155        case 2: return "High Gain Signals could not be fitted";
     156        case 3: return "Low  Gain Signals could not be fitted";
     157        case 4: return "Relative Arr. Times could not be fitted";
     158        case 5: return "High Gain Signals Oscillation";
     159        case 6: return "Low  Gain Signals Oscillation";
     160        case 7: return "Relative Arr. Times Oscillation";
     161        case 8: return "Deviating global F-Factor";
     162        default: return "";
     163        }
     164    }
     165
     166    static Int_t GetNumUnreliable() { return 8; }
     167
    130168    void Merge(const MBadPixelsPix &pix);
    131169
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r8978 r8988  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.39 2008-06-18 20:39:48 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.40 2008-06-30 09:36:35 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    234234
    235235    // Define where to divide (floor because the highest possible is n-1)
    236     const Int_t div = TMath::FloorNint(n*prob);
     236    const Size div = TMath::FloorNint(n*prob);
    237237
    238238    // Calculate result
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r8986 r8988  
    194194     TObject *FindObject(const char *obj, const char *base) const { return FindObjectInCanvas(obj, base, 0); }
    195195     TObject *FindObject(const char *obj) const { return FindObjectInCanvas(obj, obj, 0); }
    196      TObject *FindObject(const TObject *o) const { return 0;  }
     196     TObject *FindObject(const TObject *) const { return 0;  }
    197197
    198198     void PrintContent(Option_t *o="") const;
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r8946 r8988  
    8383    }
    8484
    85     void Clear(const Option_t *o="") { fMjd=0; fTime=0; fNanoSec=0; }
     85    void Clear(const Option_t *) { Clear(); }
     86    void Clear() { fMjd=0; fTime=0; fNanoSec=0; }
    8687
    8788    void Print(Option_t *t=NULL) const;
  • trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h

    r8795 r8988  
    1313#pragma link C++ class MHCalibrationChargePINDiode+;
    1414#pragma link C++ class MHCalibrationRelTimeCam+;
    15 #pragma link C++ class MHCalibrationTestCam+;
    16 #pragma link C++ class MHCalibrationTestTimeCam+;
     15//#pragma link C++ class MHCalibrationTestCam+;
     16//#pragma link C++ class MHCalibrationTestTimeCam+;
    1717#pragma link C++ class MHCalibrationPulseTimeCam+;
    1818//#pragma link C++ class MHCalibrationHiLoCam+;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r8452 r8988  
    14721472//
    14731473void MHCalibrationCam::DrawAverageSigma(Bool_t sat, Bool_t inner,
    1474                                               Float_t sigma, Float_t sigmavar,
    1475                                               Float_t relsigma, Float_t relsigmavar) const
    1476 {
    1477  
    1478   if (sigma != 0 && sigmavar >= 0 && relsigmavar >= 0.)
    1479     {
    1480      
    1481       TPad *newpad = new TPad("newpad","transparent",0,0,1,1);
    1482       newpad->SetFillStyle(4000);
    1483       newpad->Draw();
    1484       newpad->cd();
    1485      
     1474                                        Float_t sigma, Float_t sigmavar,
     1475                                        Float_t relsigma, Float_t relsigmavar) const
     1476{
     1477 
     1478    if (sigma==0 || sigmavar<0 || relsigmavar<0)
     1479        return;
     1480
    14861481      TPaveText *text = new TPaveText(sat? 0.1 : 0.35,0.7,sat ? 0.4 : 0.7,1.0);
    14871482      text->SetTextSize(0.05);
    1488       const TString line1 = Form("%s%s%s",inner ? "Outer" : "Inner",
    1489                                  " Pixels ", sat ? "Low Gain" : "High Gain");
    1490       TText *txt1 = text->AddText(line1.Data());
    1491       const TString line2 = Form("#sigma per pix: %2.2f #pm %2.2f",sigma,TMath::Sqrt(sigmavar));
    1492       TText *txt2 = text->AddText(line2.Data());
    1493       const TString line3 = Form("Rel. #sigma per pix: %2.2f #pm %2.2f",relsigma,TMath::Sqrt(relsigmavar));
    1494       TText *txt3 = text->AddText(line3.Data());
     1483      text->SetBit(kCanDelete);
    14951484      text->Draw("");
    1496      
    1497       text->SetBit(kCanDelete);
    1498       txt1->SetBit(kCanDelete);
    1499       txt2->SetBit(kCanDelete);
    1500       txt3->SetBit(kCanDelete);
    1501       newpad->SetBit(kCanDelete);
    1502     }
     1485
     1486      const TString line1 = Form("%s Pixels %s Gain",
     1487                                 inner?"Outer" : "Inner", sat?"Low":"High");
     1488      const TString line2 = Form("#sigma per pix: %2.2f #pm %2.2f", sigma, TMath::Sqrt(sigmavar));
     1489      const TString line3 = Form("Rel. #sigma per pix: %2.2f #pm %2.2f", relsigma, TMath::Sqrt(relsigmavar));
     1490
     1491      text->AddText(line1.Data());
     1492      text->AddText(line2.Data());
     1493      text->AddText(line3.Data());
    15031494}
    15041495
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r8957 r8988  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.61 2008-06-14 15:55:53 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.62 2008-06-30 09:36:36 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    12861286            break;
    12871287        case MCalibrationCam::kUV:
    1288             fit->SetLineColor(106);
     1288            fit->SetLineColor(51);
    12891289            break;
    12901290        case MCalibrationCam::kCT1:
    1291             fit->SetLineColor(006);
     1291            fit->SetLineColor(6);
    12921292            break;
    12931293        default:
     
    13371337{
    13381338    TLine *line = new TLine(refline, 0, refline, hist->GetMaximum());
    1339     line->SetLineColor(106);
     1339    line->SetLineColor(51);
    13401340    line->SetLineStyle(2);
    13411341    line->SetLineWidth(3);
     
    13431343    line->Draw();
    13441344
    1345     TLegend *leg = new TLegend(0.8,0.01,0.99,0.45);
     1345    TLegend *leg = new TLegend(0.8,0.01,0.99,0.15);
    13461346    leg->AddEntry(line, "10 Leds UV", "l");
    13471347    leg->SetBit(kCanDelete);
  • trunk/MagicSoft/Mars/mhcalib/Makefile

    r8795 r8988  
    4040           MHCalibrationChargePINDiode.cc \
    4141           MHCalibrationRelTimeCam.cc \
    42            MHCalibrationTestCam.cc \
    4342           MHCalibrationPulseTimeCam.cc \
    44            MHCalibrationTestTimeCam.cc \
    4543           MHGausEvents.cc
    4644
  • trunk/MagicSoft/Mars/mhflux/MHThreshold.cc

    r8911 r8988  
    116116    TH1D h(fHEnergy);
    117117
     118#if ROOT_VERSION_CODE<ROOT_VERSION(5,20,00)
    118119    Int_t min=1;
    119120    while (min<h.GetNbinsX() && h.GetBinContent(min)==0)
     
    127128
    128129    h.Smooth(1, min, max);
     130#else
     131    h.Smooth(1);
     132#endif
    129133
    130134    const Int_t bin  =  h.GetMaximumBin();
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8956 r8988  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.108 2008-06-14 14:32:15 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.109 2008-06-30 09:36:38 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    675675// and added to gROOT such the gROOT->FindObject can find the histogram.
    676676//
    677 // If the standard name "_py" is given "_py" is appended to the name
     677// If the standard name "_proj" is given "_proj" is appended to the name
    678678// of the MHCamera and the corresponding histogram is searched using
    679679// gROOT->FindObject and updated with the present projection.
     
    718718    //check if histogram with identical name exist
    719719    TObject *h1obj = gROOT->FindObject(pname);
    720     if (h1obj && h1obj->InheritsFrom("TH1D")) {
     720    if (h1obj && h1obj->InheritsFrom(TH1D::Class())) {
    721721        h1 = (TH1D*)h1obj;
    722722        h1->Reset();
     
    812812    //check if histogram with identical name exist
    813813    TObject *h1obj = gROOT->FindObject(pname);
    814     if (h1obj && h1obj->InheritsFrom("TProfile")) {
     814    if (h1obj && h1obj->InheritsFrom(TProfile::Class())) {
    815815        h1 = (TProfile*)h1obj;
    816816        h1->Reset();
     
    859859// and added to gROOT such the gROOT->FindObject can find the histogram.
    860860//
    861 // If the standard name "_azi" is given "_azi" is appended to the name
     861// If the standard name "_az" is given "_az" is appended to the name
    862862// of the MHCamera and the corresponding histogram is searched using
    863863// gROOT->FindObject and updated with the present projection.
     
    892892    //check if histogram with identical name exist
    893893    TObject *h1obj = gROOT->FindObject(pname);
    894     if (h1obj && h1obj->InheritsFrom("TProfile")) {
     894    if (h1obj && h1obj->InheritsFrom(TProfile::Class())) {
    895895        h1 = (TProfile*)h1obj;
    896896        h1->Reset();
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r8484 r8988  
    11/* ======================================================================== *\
    2 !  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.64 2007-05-10 12:14:54 tbretz Exp $
     2!  $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.65 2008-06-30 09:36:38 tbretz Exp $
    33\* ======================================================================== */
    44#ifndef MARS_MHCamera
     
    284284    UInt_t   GetNumPixels() const;
    285285
    286     TH1D    *Projection(const char *name="_py", const Int_t nbins=50) const
    287       {
     286    TH1D    *Projection(const char *name="_proj", const Int_t nbins=50) const
     287    {
    288288        return ProjectionS(TArrayI(), TArrayI(), name,nbins);
    289       }
    290     TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py", const Int_t nbins=50) const
     289    }
     290    TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_proj", const Int_t nbins=50) const
    291291    {
    292292        return ProjectionS(TArrayI(1, &sector), TArrayI(1, &aidx), name, nbins);
    293293    }
    294     TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_py", const Int_t nbins=50) const;
     294    TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_proj", const Int_t nbins=50) const;
    295295
    296296    TProfile *RadialProfile(const char *name="_rad", Int_t nbins=25) const { return  RadialProfileS(TArrayI(), TArrayI(), name, nbins);}
     
    301301    TProfile *RadialProfileS(const TArrayI &sector, const TArrayI &aidx, const char *name="_rad", const Int_t nbins=25) const;
    302302
    303     TProfile *AzimuthProfile(const char *name="_azi", Int_t nbins=25) const { return  AzimuthProfileA(TArrayI(), name, nbins);  }
    304     TProfile *AzimuthProfile(Int_t aidx, const char *name="_rad", const Int_t nbins=25) const
    305       {
     303    TProfile *AzimuthProfile(const char *name="_az", Int_t nbins=25) const { return  AzimuthProfileA(TArrayI(), name, nbins);  }
     304    TProfile *AzimuthProfile(Int_t aidx, const char *name="_az", const Int_t nbins=25) const
     305    {
    306306        return AzimuthProfileA(TArrayI(1, &aidx), name, nbins);
    307       }
    308     TProfile *AzimuthProfileA(const TArrayI &aidx, const char *name="_rad", const Int_t nbins=25) const;
     307    }
     308    TProfile *AzimuthProfileA(const TArrayI &aidx, const char *name="_az", const Int_t nbins=25) const;
    309309   
    310310    void CamDraw(TCanvas &c, const Int_t x, const Int_t y,
  • trunk/MagicSoft/Mars/mjobs/JobsLinkDef.h

    r7151 r8988  
    1010#pragma link C++ class MJob+;
    1111#pragma link C++ class MJCalib+;
    12 #pragma link C++ class MJCalibTest+;
     12//#pragma link C++ class MJCalibTest+;
    1313#pragma link C++ class MJCalibration+;
    1414#pragma link C++ class MJCalibrateSignal+;
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8986 r8988  
    235235}
    236236
    237 #include "MParameterCalc.h" // FIXME
    238237Bool_t MJCalibrateSignal::Process(MPedestalCam &pedcamab, MPedestalCam &pedcambias,
    239238                                  MPedestalCam &pedcamextr)
  • trunk/MagicSoft/Mars/mjobs/Makefile

    r8531 r8988  
    3131           MJPedestal.cc \
    3232           MJCalib.cc \
    33            MJCalibTest.cc \
    3433           MJCalibration.cc \
    3534           MJCalibrateSignal.cc \
  • trunk/MagicSoft/Mars/mranforest/MRanForest.cc

    r8907 r8988  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MRanForest.cc,v 1.28 2008-06-02 08:46:43 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MRanForest.cc,v 1.29 2008-06-30 09:36:39 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    241241            // If no match found, function gives nearest element smaller
    242242            // than value.
    243             int k=TMath::BinarySearch(ngrid, fGrid.GetArray(), fHadTrue[j]);
     243            int k=TMath::BinarySearch(ngrid, fGrid.GetArray(), (Double_t)fHadTrue[j]);
    244244
    245245            fClass[j]   = k;
  • trunk/MagicSoft/Mars/mtools/MCalendar.h

    r8750 r8988  
    173173    void RemoveEnv(const char *VariableName) const;//*MENU
    174174
    175     void SetMoonGraf(Int_t Align, Float_t Radius) { fMoonAlignGraf=Align; fMoonRadius=Radius; } //*MENU* *ARGS={Align>=fMoonAlignGraf,Radius=>fMoonRadius}
    176     void SetMoonText(Int_t Align, Int_t Type, Int_t Continous) { fMoonAlignText=Align; fMoonTextType=Type; fMoonTextCont=Continous; } //*MENU* *ARGS={Align>=fMoonAlignText,Type=>fMoonTextType,Continous=>fMoonTextCont}
     175    void SetMoonGraf(Int_t Align, Float_t Radius) { fMoonAlignGraf=Align; fMoonRadius=Radius; } //*MENU* *ARGS={Align=>fMoonAlignGraf,Radius=>fMoonRadius}
     176    void SetMoonText(Int_t Align, Int_t Type, Int_t Continous) { fMoonAlignText=Align; fMoonTextType=Type; fMoonTextCont=Continous; } //*MENU* *ARGS={Align=>fMoonAlignText,Type=>fMoonTextType,Continous=>fMoonTextCont}
    177177
    178178    // Calendar sheet interface
  • trunk/MagicSoft/Mars/mtools/MagicJam.h

    r8755 r8988  
    3434    void  Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="") { }
    3535    void  Smooth(int, int, int) { }
     36    void  Smooth(int, const Option_t *) { }
    3637    void  SetPrettyPalette() {}
    3738    void  SetDeepBlueSeaPalette() {}
Note: See TracChangeset for help on using the changeset viewer.