Changeset 2421 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/22/03 20:59:40 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2419 r2421  
    11                                                 -*-*- END OF LINE -*-*-
     2  2003/10/22: Thomas Bretz
     3 
     4   * mars.cc:
     5     - replaced TApplication by TGApplication
     6     - removed TROOT
     7     - reset Batch mode in any case
     8     
     9   * meventdisp/MGCamDisplay.cc:
     10     - use new MHCamera::SetLevels to display cleaning levels
     11     
     12   * mhist/MHCamera.[h,cc]:
     13     - removed FillLevels - obsolete
     14     - added SetLevels instead
     15
     16
     17
    218  2003/10/21: Wolfgang Wittek
    319
  • trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc

    r2419 r2421  
    5454// --------------------------------------------------------------------------
    5555//
     56Int_t MMatrixLoop::PreProcess(MParList *plist)
     57{
     58    fNumRow = 0;
    5659
    57 Int_t MMatrixLoop::PreProcess(MParList *plist)
    58     {
    59         fNumRow = 0;
    60 
    61         return fMatrix ? kTRUE : kFALSE;
    62     }
     60    return fMatrix ? kTRUE : kFALSE;
     61}
    6362
    6463// --------------------------------------------------------------------------
     
    7170    return fMatrix->SetNumRow(fNumRow++);
    7271}
    73 
    74 
    75 
    76 
    77 
    78 
    79 
    80 
    81 
    82 
  • trunk/MagicSoft/Mars/mars.cc

    r2408 r2421  
    11#include <TROOT.h>
    2 #include <TApplication.h>
     2#include <TGApplication.h>
    33
    44#include "MAGIC.h"
     
    2525//
    2626//    started by  h. kornmayer      january, 3rd  2001
     27static void StartUpMessage()
     28{
     29    gLog << all << endl;
    2730
    28 void Usage()
     31    //                1         2         3         4         5
     32    //       12345678901234567890123456789012345678901234567890
     33    gLog << "==================================================" << endl;
     34    gLog << "                    MARS V" << MARSVER              << endl;
     35    gLog << "    Magic Analysis and Reconstruction Software"     << endl;
     36    gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
     37    gLog << "               Using ROOT v" << ROOTVER             << endl;
     38    gLog << "==================================================" << endl;
     39    gLog << endl;
     40}
     41
     42static void Usage()
    2943{
    3044    gLog << "Sorry the usage is:" << endl;
     
    3448    gLog << "     -v2: errors and warnings <default>"        << endl;
    3549    gLog << "     -v3: errors, warnings and infos"           << endl;
    36 }
    37 
    38 void StartUpMessage()
    39 {
    40     gLog << all << endl;
    41 
    42     //                1         2         3         4         5
    43     //       12345678901234567890123456789012345678901234567890
    44     gLog << "==================================================" << endl;
    45     gLog << "                    MARS V" << MARSVER << "                      " << endl;
    46     gLog << "    Magic Analysis and Reconstruction Software    " << endl;
    47     gLog << "            Compiled on <" << __DATE__ << ">"       << endl;
    48     gLog << "               Using ROOT v" << ROOTVER             << endl;
    49     gLog << "==================================================" << endl;
    50     gLog << endl;
    5150}
    5251
     
    5958
    6059    StartUpMessage();
     60
     61    TGApplication app("MarsApp", &argc, argv);
     62    if (gROOT->IsBatch())
     63        gROOT->SetBatch(kFALSE);
    6164
    6265    //
     
    105108    MParContainer::Class()->IgnoreTObjectStreamer();
    106109
    107     //
    108     // initialise ROOT
    109     //
    110     TROOT simple("mars", "MARS - Magic Analysis and Reconstruction Software");
    111 
    112     TApplication app("MarsApp", &argc, argv);
    113 
    114110#ifdef HAVE_XPM
    115111    logo.Popdown();
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r2381 r2421  
    280280    }
    281281
     282    TArrayF lvl(2);
     283    lvl[0] = clean->GetCleanLvl2();
     284    lvl[1] = clean->GetCleanLvl1();
     285
    282286    fDisplay[0]->SetCamContent(*evt, 0);
    283287    fDisplay[1]->SetCamContent(*ped, 1);
    284288    fDisplay[2]->SetCamContent(val, &use);
    285     fDisplay[3]->FillLevels(*evt, *clean);
     289    fDisplay[3]->SetCamContent(val, &use);
     290    fDisplay[3]->SetLevels(lvl);
    286291    fDisplay[4]->SetCamContent(*ped, 0);
    287292
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2416 r2421  
    818818// ------------------------------------------------------------------------
    819819//
    820 // Fill the colors in respect to the cleaning levels
    821 //
    822 void MHCamera::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2)
     820// The array must be in increasing order, eg: 2.5, 3.7, 4.9
     821// The values in each bin are replaced by the interval in which the value
     822// fits. In the example we have four intervals
     823// (<2.5, 2.5-3.7, 3.7-4.9, >4.9). Maximum and minimum are set
     824// accordingly.
     825//
     826void MHCamera::SetLevels(const TArrayF &arr)
    823827{
    824828    if (fNcells<=1)
    825829        return;
    826 
    827     SetCamContent(event, 2);
    828830
    829831    for (Int_t i=0; i<fNcells-2; i++)
     
    832834            continue;
    833835
    834         if (fArray[i+1]>lvl1)
    835             fArray[i+1] = 0;
    836         else
    837             if (fArray[i+1]>lvl2)
    838                 fArray[i+1] = 1;
    839             else
    840                 fArray[i+1] = 2;
    841     }
    842 }
    843 
    844 // ------------------------------------------------------------------------
    845 //
    846 // Fill the colors in respect to the cleaning levels
    847 //
    848 void MHCamera::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean)
    849 {
    850     FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2());
     836        Int_t j = arr.GetSize();
     837        while (j && fArray[i+1]<arr[j-1])
     838            j--;
     839
     840        fArray[i+1] = j;
     841    }
     842    SetMaximum(arr.GetSize());
     843    SetMinimum(0);
    851844}
    852845
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r2409 r2421  
    138138    Double_t GetMaximum() const { return GetMaximum(0/*kTRUE*/); }
    139139
    140     void  FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2);
    141     void  FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean);
     140    void SetLevels(const TArrayF &arr);
    142141
    143142    void  FillRandom(const char *fname, Int_t ntimes=5000) { TH1::FillRandom(fname, ntimes); }
     
    152151    void  Reset() { Reset(""); } // *MENU*
    153152    TH1  *DrawCopy() const/* { gPad=NULL; return TH1D::DrawCopy(); }*/; // *MENU*
     153    TH1  *DrawCopy(Option_t *o) const { return TH1D::DrawCopy(o); }
    154154
    155155    void  Print(Option_t *) const;
  • trunk/MagicSoft/Mars/mhist/MHMatrix.cc

    r2419 r2421  
    126126//
    127127Bool_t MHMatrix::SetNumRow(Int_t row)
    128     {
    129       if (row>=fM.GetNrows() || row<0) return kFALSE;
    130       fRow = row;
    131       return kTRUE;
    132     }
    133 
     128{
     129    if (row>=fM.GetNrows() || row<0) return kFALSE;
     130    fRow = row;
     131    return kTRUE;
     132}
    134133
    135134// --------------------------------------------------------------------------
     
    11911190    return kTRUE;
    11921191}
    1193 
Note: See TracChangeset for help on using the changeset viewer.