Changeset 961 for trunk/MagicSoft


Ignore:
Timestamp:
10/05/01 14:39:20 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r959 r961  
    11                                                                  -*-*- END -*-*-
     2
     3 2001/10/05: Thomas Bretz
     4
     5   * manalysis/MHillas.cc, manalysis/MImgCleanStd.cc, mbase/MClone.[h,cc],
     6     mbase/MFilterList.h, mbase/MWriteFile.h, mbase/MWriteRootFile.h,
     7     mdatacheck/MGDisplayAdc.cc, meventdisp/MGCamDisplay.cc,
     8     meventdisp/MGCamDisplay.h, meventdisp/MGEvtDisplay.h,
     9     mgui/MGeomPix.h, mhist/MFillH.h, mhist/MHHillas.h,
     10     mmain/MAnalysis.h, mmain/MBrowser.h, mmain/MCameraDisplay.h,
     11     mmain/MDataCheck.h, mmain/MEvtDisp.h, mmain/MMonteCarlo.h,
     12     mraw/MRawFileRead.cc
     13     - comments updated
     14     
     15   * mbase/MFilter.[h,cc]:
     16     - made IsExpressionTrue abstract
     17     
     18   * meventdisp/MGEvtDisplay.cc:
     19     - fixed a bug that only every second event was displayed
     20
     21   * meventdisp/MGFadcDisp.[h,cc]:
     22     - reorganized code (changing pixel number drawed the histogram twice)
     23     
     24   * mgui/MCamDisplay.[h,cc]:
     25     - added fDrawingPad to make sure that all output goes into the same pad
     26     
     27   * mhist/HistLinkDef.h, mhist/Makefile:
     28     - removed old MFillH* classes
     29
     30
    231
    332 2001/10/02: Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r949 r961  
    55
    66   - Added new GUI functionality (Analysis)
     7
     8   - Added a camera display to be able to display events in the camera
     9     together with the calculated hillas ellipse
     10
     11   - Added a 'Clone'-Task (MClone) which can clone a parameter container
     12     object at any state of the analysis, so that the output are several
     13     states
    714
    815
  • trunk/MagicSoft/Mars/manalysis/MHillas.cc

    r857 r961  
    3030// Storage Container for the Hillas parameter                              //
    3131//                                                                         //
    32 // FIXME: Here everybody should find an explanation of the parameters      //
     32// FIXME: - Here everybody should find an explanation of the parameters    //
     33//        - using boooleans for fIsPixelUsed, fIsPixelCore, ... is rather  //
     34//          slow because you have to loop over all pixels in any loop.     //
     35//          There could be a huge speed improvement using Hash Tables      //
     36//          (linked lists, see THashTable and THashList, too)              //
    3337//                                                                         //
    3438/////////////////////////////////////////////////////////////////////////////
     
    160164// (The calcualtion is some kind of two dimentional statistics)
    161165//
     166//   FIXME: MHillas::Calc is rather slow at the moment because it loops
     167//          unnecessarily over all pixels in all its loops (s.MImgCleanStd)
     168//          The speed could be improved very much by using Hash-Tables
     169//          (linked lists, see THashTable and THashList, too)
     170//
    162171Bool_t MHillas::Calc(const MGeomCam &geom, const MCerPhotEvt &evt)
    163172{
  • trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc

    r857 r961  
    3131//  Please look at the three CleanSteps and Process                        //
    3232//                                                                         //
     33//   FIXME: MImgCleanStd is rather slow at the moment because it loops     //
     34//          unnecessarily over all pixels in all its loops (s.MHillas)     //
     35//          The speed could be improved very much by using Hash-Tables     //
     36//          (linked lists, see THashTable and THashList, too)              //
     37//                                                                         //
    3338//  Input Containers:                                                      //
    3439//   MGeomCam, MCerPhotEvt                                                 //
  • trunk/MagicSoft/Mars/mbase/MClone.cc

    r959 r961  
    2525//////////////////////////////////////////////////////////////////////////////
    2626//                                                                          //
     27//  MClone                                                                  //
     28//                                                                          //
     29//  This task clones a given paramter container. You can either specify     //
     30//  the name of the container which should be cloned or a pointer to the    //
     31//  container. If you specify a name the preprocessing tries to find the    //
     32//  corresponding container in the parameter list.                          //
     33//  Cloning in this context means duplicating the object in memory. This    //
     34//  may be used if you change an object in the eventloop (eg. the image     //
     35//  cleaning is changing the image) and you want to compare both 'version'  //
     36//  of this object afterwards.                                              //
     37//  The cloned object can be accessed by using MClone::GetClone.            //
     38//  To clone the container more than once use several instances of MClone.  //
     39//  The object does only exist until a new object is cloned. It is deleted  //
     40//  in the destructor.                                                      //
     41//                                                                          //
     42//  Input Containers:                                                       //
     43//   MParContainer                                                          //
     44//                                                                          //
     45//  Output Containers:                                                      //
     46//   -/-                                                                    //
    2747//                                                                          //
    2848//////////////////////////////////////////////////////////////////////////////
     
    5272// --------------------------------------------------------------------------
    5373//
    54 // Constructor.
     74//  Constructor. Remembers the name to search for in the parameter list.
    5575//
    5676MClone::MClone(const char *par, const char *name, const char *title)
     
    6383// --------------------------------------------------------------------------
    6484//
    65 // Constructor.
     85//  Constructor. Remember the pointer of the object which has to be cloned.
    6686//
    6787MClone::MClone(const MParContainer *par, const char *name, const char *title)
     
    7494// --------------------------------------------------------------------------
    7595//
    76 // Destructor.
     96//  Destructor. Deletes the cloned object.
    7797//
    7898MClone::~MClone()
     
    83103// --------------------------------------------------------------------------
    84104//
    85 // Checks the parameter list for the existance of the parameter container. If
    86 // the name of it was given in the constructor. It checks also for the
    87 // existance of the histogram container in the parameter list if a name was
    88 // given. If it is not available it tried to create a histogram container
    89 // with the same type as the given object name.
     105//  Checks the parameter list for the existance of the parameter container. If
     106//  the name of it was given in the constructor.
    90107//
    91108Bool_t MClone::PreProcess(MParList *pList)
    92109{
    93     if (!fParContainer)
    94     {
    95         fParContainer = (MParContainer*)pList->FindObject(fParContainerName);
    96         if (!fParContainer)
    97         {
    98             *fLog << dbginf << fParContainerName << " not found... aborting." << endl;
    99             return kFALSE;
    100         }
    101     }
    102     return kTRUE;
     110    //
     111    // The pointer is already given by the user.
     112    //
     113    if (fParContainer)
     114        return kTRUE;
     115
     116    //
     117    // Try to find the parameter container with the given name in the list
     118    //
     119    fParContainer = (MParContainer*)pList->FindObject(fParContainerName);
     120    if (fParContainer)
     121        return kTRUE;
     122
     123    //
     124    // If it couldn't get found stop Eventloop
     125    //
     126    *fLog << dbginf << fParContainerName << " not found... aborting." << endl;
     127    return kFALSE;
    103128}
    104129
     130// --------------------------------------------------------------------------
     131//
     132//  Delete the cloned object if one is existing
     133//
    105134void MClone::Clear(Option_t *)
    106135{
     136    //
     137    // Check if an object has been initialized
     138    //
    107139    if (!fClone)
    108140        return;
    109141
     142    //
     143    // Delete it and set the pointer to NULL for the sanity check (above)
     144    //
    110145    delete fClone;
    111146    fClone = NULL;
     
    114149// --------------------------------------------------------------------------
    115150//
    116 // Fills the data from the parameter conatiner into the histogram container
     151//  Deletes an existing clone and clones the object (parameter container)
     152//  again.
    117153//
    118154Bool_t MClone::Process()
    119155{
     156    //
     157    // Delete an existing clone
     158    //
    120159    Clear();
    121160
     161    //
     162    // Clone the given parameter container
     163    //
    122164    fClone = fParContainer->Clone();
    123165
  • trunk/MagicSoft/Mars/mbase/MClone.h

    r959 r961  
    1515{
    1616private:
    17     const MParContainer *fParContainer;
    18     TString fParContainerName;
     17    const MParContainer *fParContainer; // pointer to container which has to be cloned
     18    TString fParContainerName;          // given name to search for in the parameterlist
    1919
    20     TObject* fClone;
     20    TObject* fClone;                    // pointer to the cloned object. deletion is handled by MClone
    2121
    2222    void Init(const char *name, const char *title);
     
    3434    void Clear(Option_t *opt=NULL);
    3535
    36     ClassDef(MClone, 0) // Task to fill the Hillas parameters into histograms
     36    ClassDef(MClone, 0) // Task to clone (duplicate) an object in memory
    3737};
    3838   
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r959 r961  
    4646// Afterwards the PostProcess functions are executed.                       //
    4747//                                                                          //
     48//                                                                          //
     49//  Maybe we can add a TProgressMeter sometimes later to be able to show    //
     50//  the progress graphically...                                             //
     51//                                                                          //
     52//                                                                          //
    4853//////////////////////////////////////////////////////////////////////////////
    49 #include "MEvtLoop.h"
    50 
    5154#include <iostream.h>
    5255
     
    98101//
    99102// The proprocessing part of the eventloop. Be careful, this is
    100 // for developers use only!
     103// for developers or use in special jobs only!
    101104//
    102105Bool_t MEvtLoop::PreProcess(const char *tlist)
     
    144147//
    145148// The processing part of the eventloop. Be careful, this is
    146 // for developers use only!
     149// for developers or use in special jobs only!
    147150//
    148151void MEvtLoop::Process(Int_t maxcnt) const
     
    200203//
    201204//  The postprocessing part of the eventloop. Be careful, this is
    202 //  for developers use only!
     205// for developers or use in special jobs only!
    203206//
    204207Bool_t MEvtLoop::PostProcess() const
     
    218221    Bool_t rc = PreProcess();
    219222
     223    //
     224    // If all Tasks were PreProcesses successfully start Processing.
     225    //
    220226    if (rc)
    221227        Process(maxcnt);
    222228
     229    //
     230    // Now postprocess all tasks. Only successfully preprocessed tasks are
     231    // postprocessed. If the Postprocessing of one task fail return an error.
     232    //
    223233    if (!PostProcess())
    224234        return kFALSE;
    225235
     236    //
     237    // If postprocessing of all preprocessed tasks was sucefully return rc.
     238    // This gives an error in case the preprocessing has failed already.
     239    // Otherwise the eventloop is considered: successfully.
     240    //
    226241    return rc;
    227242}
  • trunk/MagicSoft/Mars/mbase/MFilter.cc

    r858 r961  
    6161//      collected in a MTaskList-object or are conected to the same        //
    6262//      filter.                                                            //
    63 //    - If you want to use different filters for one task please look for  //
    64 //      the MFilterList class.                                             //
     63//    - If you want to use different filters (combined logically) for one  //
     64//      task please look for the MFilterList class.                        //
    6565//    - Be careful, the return value of IsExpressionTrue is NOT a real     //
    6666//      boolean. You can return other values, too.                         //
     
    7171
    7272ClassImp(MFilter);
    73 
    74 // --------------------------------------------------------------------------
    75 //
    76 Bool_t MFilter::IsExpressionTrue() const
    77 {
    78     return kTRUE;
    79 }
    8073
    8174// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mbase/MFilter.h

    r858 r961  
    11#ifndef MFILTER_H
    22#define MFILTER_H
    3 
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MFilter                                                                 //
    7 //                                                                         //
    8 // Abstract base class for the filters                                     //
    9 //                                                                         //
    10 /////////////////////////////////////////////////////////////////////////////
    113
    124#ifndef MTASK_H
     
    2416    }
    2517
    26     virtual Bool_t IsExpressionTrue() const;
     18    virtual Bool_t IsExpressionTrue() const = 0;
    2719
    2820    virtual Bool_t PreProcess(MParList *pList);
  • trunk/MagicSoft/Mars/mbase/MFilterList.h

    r858 r961  
    4444    void Print(Option_t *opt = "");
    4545
    46     ClassDef(MFilterList, 0)            // List of several filters
     46    ClassDef(MFilterList, 0)            // List to combine several filters logically
    4747};
    4848
  • trunk/MagicSoft/Mars/mbase/MTask.cc

    r858 r961  
    4343//                     As an argument this function gets a pointer to the  //
    4444//                     parameter list. You can stop the execution by       //
    45 //                     kFALSE instread of kTRUE.                           //
     45//                     returning kFALSE instead of kTRUE. If an error      //
     46//                     occured and you return kFALSE make sure, that       //
     47//                     any action is closed correctly and all newly        //
     48//                     created object are deleted. The PostProcess in      //
     49//                     such a case won't be executed by the Tasklist or    //
     50//                     Eventloop.                                          //
    4651//                                                                         //
    47 //   - Process():      executed for each event in the eventloop. Do in     //
    48 //                     one task after the other (as the occur in the       //
    49 //                     tasklist) the action of one task. Only the tasks    //
    50 //                     with a Stream ID which matches the actual ID of the //
    51 //                     task list are executed. A task can return kFALSE    //
    52 //                     to stop the execuition of the pending taks in a     //
    53 //                     list or kCONTINUE to skip the pending tasks.        //
     52//   - Process():      executed for each event in the eventloop. Do it     //
     53//                     one task after the other (as they occur in the      //
     54//                     tasklist). Only the tasks with a Stream ID          //
     55//                     which matches the actual ID of the tasklist        //
     56//                     are executed. A task can return kFALSE to           //
     57//                     stop the execuition of the tasklist or              //
     58//                     kCONTINUE to skip the pending tasks.                //
    5459//                                                                         //
    5560//   - PostProcess():  executed after the eventloop. Here you can close    //
    5661//                     output files, start display of the run parameter,   //
    57 //                     etc.                                                //
     62//                     etc. PostProcess should be executed only if         //
     63//                     PreProcess was successfull (returned kTRUE)         //
    5864//                                                                         //
    5965/////////////////////////////////////////////////////////////////////////////
     
    7278// the virtual implementation returns kTRUE
    7379//
    74 Bool_t MTask::PreProcess( MParList *pList )
     80Bool_t MTask::PreProcess(MParList *pList)
    7581{
    7682    return kTRUE;
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r959 r961  
    210210// --------------------------------------------------------------------------
    211211//
    212 // do pre processing (before eventloop) of all tasks in the task-list
     212//  do pre processing (before eventloop) of all tasks in the task-list
    213213//
    214214Bool_t MTaskList::PreProcess(MParList *pList)
     
    297297        case kTRUE:
    298298            //
    299             // everything was OK: go on
     299            // everything was OK: go on with the next task
    300300            //
    301301            continue;
     
    319319// --------------------------------------------------------------------------
    320320//
    321 // do post processing (before eventloop) of all tasks in the task-list
     321//  do post processing (before eventloop) of all tasks in the task-list
     322//  only tasks which have successfully been preprocessed are postprocessed.
    322323//
    323324Bool_t MTaskList::PostProcess()
    324325{
    325326    *fLog << "Postprocessing... " << flush;
    326 
    327     // FIXME: At the moment all tasks are post processed independ of
    328     // whether it was preprocessed or not.
    329327
    330328    //
     
    347345    //
    348346    //  loop over all tasks for postprocessing
     347    //  only tasks which have successfully been preprocessed are postprocessed.
    349348    //
    350349    while ( (task=(MTask*)Next()) )
     
    355354        *fLog << task->GetName() << "... " << flush;
    356355
     356        //
     357        // FIXME: should we only skip this task?
     358        //
    357359        if (!task->PostProcess())
    358360            return kFALSE;
  • trunk/MagicSoft/Mars/mbase/MWriteFile.h

    r852 r961  
    2222    virtual Bool_t PostProcess();
    2323
    24     ClassDef(MWriteFile, 0)     // Class to write one container to an ascii file
     24    ClassDef(MWriteFile, 0)     // Base class for tasks to write single containers to several output formats
    2525};
    2626
  • trunk/MagicSoft/Mars/mbase/MWriteRootFile.h

    r852 r961  
    9999                      const char *tname=NULL, const char *ttitle=NULL);
    100100
    101     ClassDef(MWriteRootFile, 0) // Class to write one container to an ascii file
     101    ClassDef(MWriteRootFile, 0) // Class to write one container to a root file
    102102};
    103103
  • trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc

    r959 r961  
    118118    */
    119119
    120     radio1->SetState(kButtonDown);
     120    radio3->SetState(kButtonDown);
    121121
    122122    radio1->Associate(this);
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r959 r961  
    2525#include "MGCamDisplay.h"
    2626
    27 #include <TList.h>                // TList
    28 #include <TGButton.h>             // TGPictureButton
    29 #include <TGButtonGroup.h>
    30 
    31 #include "MClone.h"
    32 #include "MHillas.h"
    33 #include "MEvtLoop.h"
    34 #include "MParList.h"
    35 #include "MTaskList.h"
    36 #include "MReadTree.h"
    37 #include "MCamDisplay.h"
    38 #include "MHillasCalc.h"
    39 #include "MPedestalCam.h"
    40 #include "MCerPhotCalc.h"
    41 #include "MImgCleanStd.h"
    42 #include "MGeomCamMagic.h"
     27#include <TList.h>          // TList::Add
     28#include <TCanvas.h>        // TCanvas::cd
     29#include <TGButton.h>       // TGPictureButton
     30#include <TGButtonGroup.h>  // TGVButtonGroup
     31
     32#include "MClone.h"         // MClone
     33#include "MHillas.h"        // MHillas
     34#include "MParList.h"       // MParList::AddToList
     35#include "MEvtLoop.h"       // MEvtLoop::GetParList
     36#include "MTaskList.h"      // MTaskList::AddToList
     37#include "MCamDisplay.h"    // MCamDisplay
     38#include "MHillasCalc.h"    // MHillasCalc
     39#include "MPedestalCam.h"   // MPedestalCam
     40#include "MCerPhotCalc.h"   // MCerPhotCalc
     41#include "MImgCleanStd.h"   // MImgCleanStd
     42#include "MGeomCamMagic.h"  // MGeomMagicCam
    4343
    4444ClassImp(MGCamDisplay);
     
    189189    hillas->Print();
    190190    if (fDisplayHillas)
     191    {
     192        fCanvas->cd();
    191193        hillas->Draw();
     194    }
    192195    else
    193196        hillas->Clear();
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.h

    r959 r961  
    3636    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    3737
    38     ClassDef(MGCamDisplay, 0)
     38    ClassDef(MGCamDisplay, 0) // Display for camera images (cerenkov events)
    3939};
    4040
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r959 r961  
    481481    case kC_TEXTENTRY:
    482482        if (GET_SUBMSG(msg) == kTE_ENTER)
    483             ReadinEvent(atoi(fTxtEvtNr->GetText()));
     483            ReadinEvent(atoi(fTxtEvtNr->GetText())-1);
    484484        return kTRUE;
    485485    }
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h

    r959 r961  
    7171    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    7272
    73     ClassDef(MGEvtDisplay, 0)
     73    ClassDef(MGEvtDisplay, 0) // base class to display something event by event
    7474};
    7575
  • trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc

    r959 r961  
    5454{
    5555    M_PREVPIXEL = 0x1000,
    56     M_NEXTPIXEL = 0x1001
     56    M_NEXTPIXEL = 0x1001,
     57
     58    M_PIXELLIST = 0x1002
    5759};
    5860
     
    127129
    128130    //
    129     //   Map the window, set up the layout, etc.
    130     //
    131     SetWMSizeHints(450, 400, 1000, 1000, 10, 10 );      // set the smallest and biggest size of the Main frame
    132 
     131    // set the smallest and biggest size of the Main frame
     132    //
     133    SetWMSizeHints(450, 400, 1000, 1000, 10, 10);
     134
     135    //
     136    // Map the window, set up the layout, etc.
     137    //
    133138    MapSubwindows();
    134139
     
    160165//   the list of pixels in the fPixelList (TGListBox)
    161166//
    162 void MGFadcDisp::CreatePixelList(Int_t lastsel)
     167void MGFadcDisp::DisplayPixel(Int_t lastsel, Bool_t update)
    163168{
    164169    MRawEvtData *data = GetEvent();
    165170
    166     //
    167     //   put the selection of the last event in memory
    168     //
    169171    MRawEvtPixelIter pixel(data);
    170     while (pixel.Next())
     172
     173    if (update)
    171174    {
    172         char txt[100];
    173         sprintf(txt, "%d", pixel.GetPixelId());
    174         fPixelList->AddEntry(txt, pixel.GetPixelId());
     175        //
     176        //   put the selection of the last event in memory
     177        //
     178        while (pixel.Next())
     179        {
     180            char txt[100];
     181            sprintf(txt, "%d", pixel.GetPixelId());
     182            fPixelList->AddEntry(txt, pixel.GetPixelId());
     183        }
     184
     185        fPixelList->MapSubwindows();
     186        fPixelList->Layout();
    175187    }
    176 
    177     fPixelList->MapSubwindows();
    178     fPixelList->Layout();
    179188
    180189    //
     
    187196    {
    188197        pixel.Reset();
    189         lastsel=pixel.GetPixelId();
     198        lastsel=0; //pixel.GetPixelId();
    190199    }
    191200
     
    194203    data->Draw(txt);
    195204    fPixelList->Select(lastsel, kTRUE);
     205    fPixelList->SetTopEntry(lastsel);
    196206
    197207    fCanvas->Modified();
     
    209219    fPixelList->RemoveEntries(0, GetEvent()->GetNumPixels());
    210220
    211     CreatePixelList(lastsel);
    212 }
    213 
    214 // --------------------------------------------------------------------------
    215 //
    216 //  Display another pixel
    217 //
    218 void MGFadcDisp::DisplayPix(UInt_t i)
    219 {
    220     MRawEvtData *data = GetEvent();
    221 
    222     fCanvas->Clear();
    223     fCanvas->cd();
    224 
    225     char txt[256];
    226     sprintf(txt, "GRAPH%d", i);
    227     data->Draw(txt);
    228 
    229     fCanvas->Modified();
    230     fCanvas->Update();
    231 
    232     //
    233     // FIXME: too complicated!
    234     //
    235     fPixelList->RemoveEntries(0, data->GetNumPixels());
    236     CreatePixelList(i);
     221    DisplayPixel(lastsel);
    237222}
    238223
     
    257242            {
    258243            case M_PREVPIXEL:
    259                 DisplayPix(fPixelList->GetSelected()-1);
     244                DisplayPixel(fPixelList->GetSelected()-1, kFALSE);
    260245                return kTRUE;
    261246
    262247            case M_NEXTPIXEL:
    263                 DisplayPix(fPixelList->GetSelected()+1);
     248                DisplayPixel(fPixelList->GetSelected()+1, kFALSE);
    264249                return kTRUE;
    265250            }
     
    270255                break;
    271256
    272             DisplayPix(fPixelList->GetSelected());
     257            DisplayPixel(fPixelList->GetSelected(), kFALSE);
    273258            return kTRUE;
    274259        }
  • trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.h

    r959 r961  
    1919
    2020    void AddSetupElements();
    21     void DisplayPix(UInt_t i);
    2221    void UpdateDisplay();
    23     void CreatePixelList(Int_t lastsel=-1);
     22    void DisplayPixel(Int_t lastsel=-1, Bool_t update=kTRUE);
    2423
    2524    MRawEvtData *GetEvent() const;
     
    3231    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    3332
    34     ClassDef(MGFadcDisp, 0)
     33    ClassDef(MGFadcDisp, 0) // Display for single pixel fadc data
    3534};
    3635
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r959 r961  
    8989    //
    9090    if (!gPad)
    91         new TCanvas("CamDisplay", "Magic Camera Display", 0, 0, 650, 500);
     91        fDrawingPad = new TCanvas("CamDisplay", "Magic Camera Display", 0, 0, 650, 500);
    9292    else
     93    {
    9394        gPad->Clear();
     95        fDrawingPad = gPad;
     96    }
    9497
    9598    //
     
    123126void MCamDisplay::DrawPhotNum(const MCerPhotEvt *event)
    124127{
     128    fDrawingPad->cd();
    125129
    126130    //
     
    172176void MCamDisplay::DrawPhotErr(const MCerPhotEvt *event)
    173177{
     178    fDrawingPad->cd();
     179
    174180    //
    175181    // reset the all pixel colors to a default value
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.h

    r959 r961  
    2020class TBox;
    2121class TText;
     22class TVirtualPad;
    2223class TClonesArray;
    2324
     
    3839    TClonesArray  *fLegend;
    3940    TClonesArray  *fLegText;
     41
     42    TVirtualPad *fDrawingPad;
    4043
    4144    TBox *GetBox(Int_t i)   { return (TBox*) fLegend->At(i); }
     
    7174    }
    7275
    73     ClassDef(MCamDisplay, 0) // Display the magic camera
     76    ClassDef(MCamDisplay, 0) // Displays the magic camera
    7477};
    7578
  • trunk/MagicSoft/Mars/mgui/MGeomCam.h

    r859 r961  
    3636    virtual void Print(Option_t *opt=NULL);
    3737
    38     ClassDef(MGeomCam, 1)               // Geometry base class for the camera
     38    ClassDef(MGeomCam, 1)  // Geometry base class for the camera
    3939};
    4040
  • trunk/MagicSoft/Mars/mgui/MGeomPix.h

    r715 r961  
    99{
    1010private:
    11   Float_t fX;  // the x coordinate
    12   Float_t fY;  // the y coordinate
    13   Float_t fR;  // the r coordinate
     11    Float_t fX;  // the x coordinate
     12    Float_t fY;  // the y coordinate
     13    Float_t fR;  // the r coordinate
    1414
    15   Byte_t  fNumNeighbors; // number of valid neighbors
    16   Short_t fNeighbors[6]; // the IDs of the pixel next to it
    17                          // we are assuming an hexagonal geometry
     15    Byte_t  fNumNeighbors; // number of valid neighbors
     16    Short_t fNeighbors[6]; // the IDs of the pixel next to it
     17                           // we are assuming an hexagonal geometry
    1818
    1919public:
    20   MGeomPix(Float_t x=0. , Float_t y=0., Float_t r=0.) ;
    21  
    22   void Print(Option_t *opt=NULL) ;
     20    MGeomPix(Float_t x=0, Float_t y=0, Float_t r=0);
    2321
    24   void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }
     22    void Print(Option_t *opt=NULL);
    2523
    26   void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
    27                     Short_t i3=-1, Short_t i4=-1, Short_t i5=-1);
    28  
    29   void SetX (Float_t x) { fX = x; }
    30   void SetY (Float_t y) { fY = y; }
    31   void SetR (Float_t r) { fR = r; }
     24    void Set (Float_t x, Float_t y, Float_t r) { fX=x; fY=y; fR=r; }
    3225
    33   Float_t GetX() const  { return fX; }
    34   Float_t GetY() const  { return fY; }
    35   Float_t GetR() const  { return fR; }
     26    void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
     27                      Short_t i3=-1, Short_t i4=-1, Short_t i5=-1);
    3628
    37   Byte_t GetNumNeighbors() const { return fNumNeighbors; }
    38   Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; }
     29    void SetX (Float_t x) { fX = x; }
     30    void SetY (Float_t y) { fY = y; }
     31    void SetR (Float_t r) { fR = r; }
    3932
    40   ClassDef(MGeomPix, 1)         // Geometric class for one pixel
    41 } ;
     33    Float_t GetX() const  { return fX; }
     34    Float_t GetY() const  { return fY; }
     35    Float_t GetR() const  { return fR; }
     36
     37    Byte_t GetNumNeighbors() const { return fNumNeighbors; }
     38    Short_t GetNeighbor(Byte_t i) const { return fNeighbors[i]; }
     39
     40    ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel
     41};
    4242
    4343#endif
  • trunk/MagicSoft/Mars/mgui/MHexagon.h

    r698 r961  
    2424class MGeomPix;
    2525
    26 class MHexagon : public TObject, public TAttLine, public TAttFill
    27 {
    28  protected:
    29  
    30   Float_t      fX ;  // X coordinate  of center
    31   Float_t      fY ;  // Y coordinate  of center
    32   Float_t      fD ;  // diameter D or better distance between opposite sides
    33  
    34  public:
    35  
    36   MHexagon() ;
    37   MHexagon(Float_t x, Float_t y, Float_t d ) ;
    38   MHexagon(MGeomPix &pix);
    39   MHexagon( const MHexagon &hexagon) ;
    40   virtual ~MHexagon() ;
     26class MHexagon : public TObject, public TAttLine, public TAttFill
     27{
     28protected:
    4129
    42   void Copy ( TObject &hexagon ) ;
     30    Float_t fX;  // X coordinate  of center
     31    Float_t fY;  // Y coordinate  of center
     32    Float_t fD;  // diameter D or better distance between opposite sides
    4333
    44   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py ) ;
    45   virtual void   DrawHexagon( Float_t x, Float_t y, Float_t d ) ;
    46  
    47   virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py ) ; 
    48  
    49   virtual void   ls (Option_t *Option="") ;
    50   virtual void   Paint(Option_t *Option="") ;
    51   virtual void   PaintHexagon(Float_t x, Float_t y, Float_t d) ;
    52   virtual void   Print(Option_t *Option="") ;
     34public:
    5335
    54   ClassDef ( MHexagon, 0 )    //  a hexagon for MAGIC
     36    MHexagon();
     37    MHexagon(Float_t x, Float_t y, Float_t d);
     38    MHexagon(MGeomPix &pix);
     39    MHexagon(const MHexagon &hexagon);
     40    virtual ~MHexagon();
    5541
    56 } ;
     42    void Copy (TObject &hexagon);
    5743
    58 #endif 
     44    virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
     45    virtual void  DrawHexagon( Float_t x, Float_t y, Float_t d);
    5946
     47    virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
     48
     49    virtual void  ls (Option_t *Option="");
     50    virtual void  Paint(Option_t *Option="");
     51    virtual void  PaintHexagon(Float_t x, Float_t y, Float_t d);
     52    virtual void  Print(Option_t *Option="");
     53
     54    ClassDef(MHexagon, 0)    // A hexagon for MAGIC
     55};
     56
     57#endif
     58
  • trunk/MagicSoft/Mars/mhist/HistLinkDef.h

    r905 r961  
    44#pragma link off all classes;
    55#pragma link off all functions;
     6
     7#pragma link C++ class MFillH;
    68
    79#pragma link C++ class MH;
     
    1517#pragma link C++ class MHMcRate;
    1618
    17 #pragma link C++ class MFillH;
    18 #pragma link C++ class MFillHFadc;
    19 #pragma link C++ class MFillHHillas;
    20 #pragma link C++ class MFillHStarMap;
    21 
    2219#endif
  • trunk/MagicSoft/Mars/mhist/MFillH.h

    r887 r961  
    3434    Bool_t PostProcess();
    3535
    36     ClassDef(MFillH, 0) // Task to fill the Hillas parameters into histograms
     36    ClassDef(MFillH, 0) // Task to fill a histogram with data from a parameter container
    3737};
    3838   
  • trunk/MagicSoft/Mars/mhist/MH.h

    r887 r961  
    1717    virtual void Fill(const MParContainer *par) = 0;
    1818
    19     ClassDef(MH, 1) // Container which holds hostograms for the Hillas parameters
     19    ClassDef(MH, 1) //A histogram base class for Mars histograms
    2020};
    2121
  • trunk/MagicSoft/Mars/mhist/MHHillas.h

    r952 r961  
    3535    TObject *DrawClone(Option_t *opt=NULL);
    3636
    37     ClassDef(MHHillas, 1) // Container which holds hostograms for the Hillas parameters
     37    ClassDef(MHHillas, 1) // Container which hilds hostograms for the Hillas parameters
    3838};
    3939
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.h

    r954 r961  
    4242    void CalcEfficiency();
    4343
    44     ClassDef(MHMcCollectionArea, 1)  //  Data Container to calculate Collection Area
     44    ClassDef(MHMcCollectionArea, 1)  // Data Container to calculate Collection Area
    4545};
    4646
  • trunk/MagicSoft/Mars/mhist/MHMcRate.h

    r954 r961  
    6060    TObject *DrawClone(Option_t *o=NULL);
    6161
    62     ClassDef(MHMcRate, 1)  //  Data Container to calculate Collection Area
     62    ClassDef(MHMcRate, 1)  // Data Container to calculate Collection Area
    6363};
    6464
  • trunk/MagicSoft/Mars/mhist/Makefile

    r893 r961  
    2929
    3030SRCFILES = MFillH.cc \
    31            MFillHFadc.cc \
    32            MFillHHillas.cc \
    33            MFillHStarMap.cc \
    3431           MH.cc \
    3532           MHFadcPix.cc \
  • trunk/MagicSoft/Mars/mmain/MAnalysis.h

    r951 r961  
    3333    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    3434
    35     ClassDef(MAnalysis, 0) // GUI: The 'data-check' window.
     35    ClassDef(MAnalysis, 0) // GUI: The 'Analysis' browser.
    3636};
    3737
  • trunk/MagicSoft/Mars/mmain/MBrowser.h

    r951 r961  
    7070     virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    7171
    72      ClassDef(MBrowser, 0)   // Base class for the gui
     72     ClassDef(MBrowser, 0)   // Base class for the Gui-Browsers
    7373} ;
    7474
  • trunk/MagicSoft/Mars/mmain/MCameraDisplay.h

    r959 r961  
    1818    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    1919
    20     ClassDef(MCameraDisplay, 0) // GUI: The 'data-check' window.
     20    ClassDef(MCameraDisplay, 0) // GUI: The 'camera display' browser.
    2121};
    2222
  • trunk/MagicSoft/Mars/mmain/MDataCheck.h

    r959 r961  
    2121    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    2222
    23     ClassDef(MDataCheck, 0) // GUI: The 'data-check' window.
     23    ClassDef(MDataCheck, 0) // GUI: The 'data-check' browser.
    2424};
    2525
  • trunk/MagicSoft/Mars/mmain/MEvtDisp.h

    r947 r961  
    1818    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    1919
    20     ClassDef(MEvtDisp, 0)
     20    ClassDef(MEvtDisp, 0) // GUI: The 'event display' browser.
    2121};
    2222
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.h

    r954 r961  
    3737    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    3838
    39     ClassDef(MMonteCarlo, 0) // GUI: The 'monte-carlo' window
     39    ClassDef(MMonteCarlo, 0) // GUI: The 'monte-carlo' browser
    4040};
    4141
  • trunk/MagicSoft/Mars/mraw/MRawFileRead.cc

    r860 r961  
    2323\* ======================================================================== */
    2424
    25 ////////////////////////////////////////////////////////////////////////
    26 //
    27 //  MRawFile
    28 //
    29 //  This tasks reads the raw binary file like specified in the TDAS???
    30 //  and writes the data in the corresponding containers which are
    31 //  either retrieved from the parameter list or created and added.
    32 //
    33 //  Input Containers:
    34 //   -/-
    35 //
    36 //  Output Containers:
    37 //   MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MRawEvtTime
    38 //
    39 ////////////////////////////////////////////////////////////////////////
     25//////////////////////////////////////////////////////////////////////////////
     26//                                                                          //
     27//  MRawFile                                                                //
     28//                                                                          //
     29//  This tasks reads the raw binary file like specified in the TDAS???      //
     30//  and writes the data in the corresponding containers which are           //
     31//  either retrieved from the parameter list or created and added.          //
     32//                                                                          //
     33//  Input Containers:                                                       //
     34//   -/-                                                                    //
     35//                                                                          //
     36//  Output Containers:                                                      //
     37//   MRawRunHeader, MRawEvtHeader, MRawEvtData, MRawCrateArray, MTime       //
     38//                                                                          //
     39//////////////////////////////////////////////////////////////////////////////
    4040
    4141#include "MRawFileRead.h"
  • trunk/MagicSoft/include-Classes/MMcFormat/McLinkDef.h

    r949 r961  
    1111
    1212#endif
    13 
    14 
    15 
    16 
Note: See TracChangeset for help on using the changeset viewer.