Changeset 2482 for trunk/MagicSoft/Mars
- Timestamp:
- 11/07/03 13:33:05 (21 years ago)
- 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 ////////////////////////////////////////////////////////////////////////////// 1 46 #include "MHEvent.h" 2 47 … … 18 63 #include "MRawEvtHeader.h" 19 64 #include "MRawRunHeader.h" 20 65 #include "MRawEvtData.h" 66 67 ClassImp(MHEvent); 68 69 using namespace std; 70 71 // -------------------------------------------------------------------------- 72 // 73 MHEvent::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 // 21 83 MHEvent::~MHEvent() 22 84 { 23 85 if (fHist) 24 86 delete fHist; 87 88 delete fClone; 25 89 } 26 90 … … 29 93 MTaskList *tlist = (MTaskList*)plist->FindObject("MTaskList"); 30 94 31 fImgCleanStd = (MImgCleanStd*)tlist->FindObject("MImgCleanStd");95 fImgCleanStd = tlist ? (MImgCleanStd*)tlist->FindObject("MImgCleanStd") : NULL; 32 96 fMcEvt = (MMcEvt*)plist->FindObject("MMcEvt"); 33 97 … … 55 119 56 120 fHist = new MHCamera(*cam); 57 fHist->AddNotify( fClone);121 fHist->AddNotify(*fClone); 58 122 59 123 switch (fType) … … 86 150 } 87 151 88 Bool_t MHEvent::Fill(const MParContainer *par, const Stat_t weight =1)152 Bool_t MHEvent::Fill(const MParContainer *par, const Stat_t weight) 89 153 { 90 154 if (fHist->IsFreezed()) … … 95 159 96 160 if (fRawEvtData) 97 fRawEvtData->Copy( fClone);161 fRawEvtData->Copy(*fClone); 98 162 99 163 switch (fType) -
trunk/MagicSoft/Mars/mhist/MHEvent.h
r2481 r2482 4 4 #ifndef MARS_MH 5 5 #include "MH.h" 6 #endif7 8 #ifndef MARS_MRawEvtData9 #include "MRawEvtData.h"10 6 #endif 11 7 … … 28 24 kEvtRelativeSignal, kEvtCleaningLevels 29 25 }; 26 30 27 private: 31 28 MRawEvtData *fRawEvtData; //! … … 38 35 MImgCleanStd *fImgCleanStd; //! 39 36 40 MRawEvtData fClone; //!37 MRawEvtData *fClone; //-> 41 38 42 39 MHCamera *fHist; … … 50 47 51 48 public: 52 MHEvent(EventType_t type=kEvtSignal) : fClone("MHEventData"), fHist(NULL), fType(type) 53 { 54 } 49 MHEvent(EventType_t type=kEvtSignal); 55 50 ~MHEvent(); 56 51 57 52 MHCamera *GetHist() { return fHist; } 58 53 59 //void DrawTS(TVirtualPad *pad=NULL, Option_t *o="");60 54 void Draw(Option_t *o=""); 61 55 -
trunk/MagicSoft/Mars/mmain/Makefile
r2480 r2482 24 24 INCLUDES = -I. -I../mbase -I../manalysis -I../mdatacheck -I../meventdisp \ 25 25 -I../mgui -I../mgeom -I../mhist -I../mmontecarlo -I../mfileio \ 26 -I../mimage -I../mhistmc 26 -I../mimage -I../mhistmc -I../mraw 27 27 28 28 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.