Changeset 961 for trunk/MagicSoft/Mars/meventdisp
- Timestamp:
- 10/05/01 14:39:20 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/meventdisp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc
r959 r961 25 25 #include "MGCamDisplay.h" 26 26 27 #include <TList.h> // TList28 #include <T GButton.h> // TGPictureButton29 #include <TGButton Group.h>30 31 #include "MClone.h" 32 #include "M Hillas.h"33 #include "M EvtLoop.h"34 #include "MParList.h" 35 #include "M TaskList.h"36 #include "M ReadTree.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 43 43 44 44 ClassImp(MGCamDisplay); … … 189 189 hillas->Print(); 190 190 if (fDisplayHillas) 191 { 192 fCanvas->cd(); 191 193 hillas->Draw(); 194 } 192 195 else 193 196 hillas->Clear(); -
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.h
r959 r961 36 36 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); 37 37 38 ClassDef(MGCamDisplay, 0) 38 ClassDef(MGCamDisplay, 0) // Display for camera images (cerenkov events) 39 39 }; 40 40 -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc
r959 r961 481 481 case kC_TEXTENTRY: 482 482 if (GET_SUBMSG(msg) == kTE_ENTER) 483 ReadinEvent(atoi(fTxtEvtNr->GetText()) );483 ReadinEvent(atoi(fTxtEvtNr->GetText())-1); 484 484 return kTRUE; 485 485 } -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h
r959 r961 71 71 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); 72 72 73 ClassDef(MGEvtDisplay, 0) 73 ClassDef(MGEvtDisplay, 0) // base class to display something event by event 74 74 }; 75 75 -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
r959 r961 54 54 { 55 55 M_PREVPIXEL = 0x1000, 56 M_NEXTPIXEL = 0x1001 56 M_NEXTPIXEL = 0x1001, 57 58 M_PIXELLIST = 0x1002 57 59 }; 58 60 … … 127 129 128 130 // 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 // 133 138 MapSubwindows(); 134 139 … … 160 165 // the list of pixels in the fPixelList (TGListBox) 161 166 // 162 void MGFadcDisp:: CreatePixelList(Int_t lastsel)167 void MGFadcDisp::DisplayPixel(Int_t lastsel, Bool_t update) 163 168 { 164 169 MRawEvtData *data = GetEvent(); 165 170 166 //167 // put the selection of the last event in memory168 //169 171 MRawEvtPixelIter pixel(data); 170 while (pixel.Next()) 172 173 if (update) 171 174 { 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(); 175 187 } 176 177 fPixelList->MapSubwindows();178 fPixelList->Layout();179 188 180 189 // … … 187 196 { 188 197 pixel.Reset(); 189 lastsel= pixel.GetPixelId();198 lastsel=0; //pixel.GetPixelId(); 190 199 } 191 200 … … 194 203 data->Draw(txt); 195 204 fPixelList->Select(lastsel, kTRUE); 205 fPixelList->SetTopEntry(lastsel); 196 206 197 207 fCanvas->Modified(); … … 209 219 fPixelList->RemoveEntries(0, GetEvent()->GetNumPixels()); 210 220 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); 237 222 } 238 223 … … 257 242 { 258 243 case M_PREVPIXEL: 259 DisplayPix (fPixelList->GetSelected()-1);244 DisplayPixel(fPixelList->GetSelected()-1, kFALSE); 260 245 return kTRUE; 261 246 262 247 case M_NEXTPIXEL: 263 DisplayPix (fPixelList->GetSelected()+1);248 DisplayPixel(fPixelList->GetSelected()+1, kFALSE); 264 249 return kTRUE; 265 250 } … … 270 255 break; 271 256 272 DisplayPix (fPixelList->GetSelected());257 DisplayPixel(fPixelList->GetSelected(), kFALSE); 273 258 return kTRUE; 274 259 } -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.h
r959 r961 19 19 20 20 void AddSetupElements(); 21 void DisplayPix(UInt_t i);22 21 void UpdateDisplay(); 23 void CreatePixelList(Int_t lastsel=-1);22 void DisplayPixel(Int_t lastsel=-1, Bool_t update=kTRUE); 24 23 25 24 MRawEvtData *GetEvent() const; … … 32 31 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); 33 32 34 ClassDef(MGFadcDisp, 0) 33 ClassDef(MGFadcDisp, 0) // Display for single pixel fadc data 35 34 }; 36 35
Note:
See TracChangeset
for help on using the changeset viewer.