Changeset 2482 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
11/07/03 13:33:05 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHEvent.cc

    r2481 r2482  
     1/* ======================================================================== *\
     2!
     3! *
     4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
     5! * Software. It is distributed to you in the hope that it can be a useful
     6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
     7! * It is distributed WITHOUT ANY WARRANTY.
     8! *
     9! * Permission to use, copy, modify and distribute this software and its
     10! * documentation for any purpose is hereby granted without fee,
     11! * provided that the above copyright notice appear in all copies and
     12! * that both that copyright notice and this permission notice appear
     13! * in supporting documentation. It is provided "as is" without express
     14! * or implied warranty.
     15! *
     16!
     17!
     18!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
     19!
     20!   Copyright: MAGIC Software Development, 2000-2003
     21!
     22!
     23\* ======================================================================== */
     24
     25//////////////////////////////////////////////////////////////////////////////
     26//                                                                         
     27//  MHEvent
     28//                                                                         
     29//  Display a single event in a canvas with as many informations as
     30//  possible, such as event number, run number, ...
     31//
     32//  WARNING: This class is not yet ready!
     33//
     34//  Input Containers:
     35//   MGeomCam
     36//   [MTaskList]
     37//   [MImgCleanStd]
     38//   [MRawEvtData]
     39//   [MRawRunHeader]
     40//   [MRawEvtHeader]
     41//
     42//  Output Containers:
     43//   -/-
     44//
     45//////////////////////////////////////////////////////////////////////////////
    146#include "MHEvent.h"
    247
     
    1863#include "MRawEvtHeader.h"
    1964#include "MRawRunHeader.h"
    20 
     65#include "MRawEvtData.h"
     66
     67ClassImp(MHEvent);
     68
     69using namespace std;
     70
     71// --------------------------------------------------------------------------
     72//
     73MHEvent::MHEvent(EventType_t type) : fHist(NULL), fType(type)
     74{
     75    fName = "MHEvent";
     76    fTitle = "Single Event display task";
     77
     78    fClone = new MRawEvtData("MHEventData");
     79}
     80
     81// --------------------------------------------------------------------------
     82//
    2183MHEvent::~MHEvent()
    2284{
    2385    if (fHist)
    2486        delete fHist;
     87
     88    delete fClone;
    2589}
    2690
     
    2993    MTaskList *tlist = (MTaskList*)plist->FindObject("MTaskList");
    3094
    31     fImgCleanStd = (MImgCleanStd*)tlist->FindObject("MImgCleanStd");
     95    fImgCleanStd = tlist ? (MImgCleanStd*)tlist->FindObject("MImgCleanStd") : NULL;
    3296    fMcEvt       = (MMcEvt*)plist->FindObject("MMcEvt");
    3397
     
    55119
    56120    fHist = new MHCamera(*cam);
    57     fHist->AddNotify(fClone);
     121    fHist->AddNotify(*fClone);
    58122
    59123    switch (fType)
     
    86150}
    87151
    88 Bool_t MHEvent::Fill(const MParContainer *par, const Stat_t weight=1)
     152Bool_t MHEvent::Fill(const MParContainer *par, const Stat_t weight)
    89153{
    90154    if (fHist->IsFreezed())
     
    95159
    96160    if (fRawEvtData)
    97         fRawEvtData->Copy(fClone);
     161        fRawEvtData->Copy(*fClone);
    98162
    99163    switch (fType)
  • trunk/MagicSoft/Mars/mhist/MHEvent.h

    r2481 r2482  
    44#ifndef MARS_MH
    55#include "MH.h"
    6 #endif
    7 
    8 #ifndef MARS_MRawEvtData
    9 #include "MRawEvtData.h"
    106#endif
    117
     
    2824        kEvtRelativeSignal, kEvtCleaningLevels
    2925    };
     26
    3027private:
    3128    MRawEvtData   *fRawEvtData;    //!
     
    3835    MImgCleanStd  *fImgCleanStd;   //!
    3936
    40     MRawEvtData    fClone;         //!
     37    MRawEvtData   *fClone;         //->
    4138
    4239    MHCamera *fHist;
     
    5047
    5148public:
    52     MHEvent(EventType_t type=kEvtSignal) : fClone("MHEventData"), fHist(NULL), fType(type)
    53     {
    54     }
     49    MHEvent(EventType_t type=kEvtSignal);
    5550    ~MHEvent();
    5651
    5752    MHCamera *GetHist() { return fHist; }
    5853
    59     //void DrawTS(TVirtualPad *pad=NULL, Option_t *o="");
    6054    void Draw(Option_t *o="");
    6155 
  • trunk/MagicSoft/Mars/mmain/Makefile

    r2480 r2482  
    2424INCLUDES = -I. -I../mbase -I../manalysis -I../mdatacheck -I../meventdisp \
    2525           -I../mgui -I../mgeom -I../mhist -I../mmontecarlo -I../mfileio \
    26            -I../mimage -I../mhistmc
     26           -I../mimage -I../mhistmc -I../mraw
    2727
    2828#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.