source: trunk/MagicSoft/Mars/mmain/MEventDisplay.cc@ 4983

Last change on this file since 4983 was 4828, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 21.3 KB
Line 
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, 10/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2003
21!
22!
23\* ======================================================================== */
24#include "MEventDisplay.h"
25
26//
27// C-lib
28//
29#include <stdlib.h> // atoi
30
31//
32// root
33//
34#include <TFile.h> // TFile
35#include <TTree.h> // TTree
36#include <TList.h> // TList::Add
37#include <TStyle.h> // gStyle->SetOptStat
38#include <TCanvas.h> // TCanvas::cd
39#include <TSystem.h> // TSystem::BaseName
40
41//
42// root GUI
43//
44#include <TGLabel.h> // TGLabel
45#include <TGButton.h> // TGPictureButton
46#include <TG3DLine.h> // TGHorizontal3DLine
47#include <TGTextEntry.h> // TGTextEntry
48#include <TGButtonGroup.h> // TGVButtonGroup
49#include <TRootEmbeddedCanvas.h> // TRootEmbeddedCanvas
50
51//
52// General
53//
54#include "MGList.h" // MGList
55
56#include "MLog.h"
57#include "MLogManip.h"
58
59#include "MParList.h" // MParList::AddToList
60#include "MEvtLoop.h" // MEvtLoop::GetParList
61#include "MTaskList.h" // MTaskList::AddToList
62
63//
64// Tasks
65//
66#include "MReadMarsFile.h" // MReadMarsFile
67#include "MGeomApply.h" // MGeomApply
68#include "MFDataMember.h" // MFDataMember
69#include "MMcPedestalCopy.h" // MMcPedestalCopy
70#include "MMcPedestalNSBAdd.h" // MMcPedestalNSBAdd
71
72#include "MCerPhotAnal2.h" // MCerPhotAnal2
73#include "MImgCleanStd.h" // MImgCleanStd
74#include "MHillasCalc.h" // MHillasCalc
75//#include "MHillasSrcCalc.h" // MHillasSrcCalc
76//#include "MBlindPixelCalc.h" // MBlindPixelCalc
77#include "MArrivalTimeCalc.h" // MArrivalTimeCalc
78#include "MFillH.h" // MFillH
79#include "MExtractSignal.h" // MExtractsignal
80#include "MMcCalibrationUpdate.h" // MMcCalibrationUpdate
81#include "MCalibrate.h" // MCalibrate
82#include "MMcTriggerLvl2Calc.h" // MMcTriggerLvl2Calc
83
84//
85// Container
86//
87#include "MHillas.h" // MHillas::Print(const MGeomCam&)
88#include "MHillasExt.h" // MHillasExt::Print(const MGeomCam&)
89#include "MHillasSrc.h" // MHillasSrc::Print(const MGeomCam&)
90#include "MImagePar.h" // MImagePar::Print(const MGeomCam&)
91#include "MNewImagePar.h" // MNewImagePar::Print(const MGeomCam&)
92#include "MHEvent.h" // MHEvent
93#include "MHCamera.h" // MHCamera
94#include "MRawEvtData.h" // MRawEvtData
95#include "MArrivalTimeCam.h" // MArrivalTimeCam
96#include "MBadPixelsCam.h" // MBadPixelsCam
97#include "MPedPhotCam.h" // MPedPhotCam
98#include "MCalibrationChargeCam.h" // MCalibrationChargeCam
99#include "MMcTriggerLvl2.h" // MMcTriggerLvl2
100
101using namespace std;
102
103ClassImp(MEventDisplay);
104
105// --------------------------------------------------------------------------
106//
107// Constructor.
108//
109MEventDisplay::MEventDisplay(const char *fname, const char *pname, const char *cname) : MStatusDisplay()
110{
111 //
112 // Setup Task list for hillas calculation
113 //
114 SetupTaskList("Events", fname, pname, cname);
115
116 //
117 // Add MEventDisplay GUI elements to the display
118 //
119 AddUserFrame(fname);
120
121 //
122 // Show new part of the window, resize to correct aspect ratio
123 //
124 // FIXME: This should be done by MStatusDisplay automatically
125 Resize(GetWidth(), GetHeight() + fUserFrame->GetDefaultHeight());
126 SetWindowName("Event Display");
127 MapSubwindows();
128
129 //
130 // Readin first event and display it
131 //
132 ReadFirstEvent();
133
134 SetNoContextMenu(kFALSE);
135}
136
137// --------------------------------------------------------------------------
138//
139// Destructor: PostProcess eventloop, delete eventloop with all containers
140//
141MEventDisplay::~MEventDisplay()
142{
143 fEvtLoop->PostProcess();
144 delete fEvtLoop;
145}
146
147Int_t MEventDisplay::GetFileType(const char *tree, const char *fname) const
148{
149 TFile f(fname, "READ");
150 TTree *t = (TTree*)f.Get(tree);
151 if (!t)
152 return -1;
153
154 if (t->FindBranch("MCerPhotEvt."))
155 return 1;
156
157 if (t->FindBranch("MRawEvtData."))
158 return 2;
159
160 return -2;
161}
162
163// --------------------------------------------------------------------------
164//
165// Setup Task and parameter list for hillas calculation,
166// preprocess tasks and read in first event (process)
167//
168void MEventDisplay::SetupTaskList(const char *tname, const char *fname,
169 const char *pname, const char *cname)
170{
171 MCalibrationChargeCam *ccam=0;
172 MPedPhotCam *pcam=0;
173
174 MBadPixelsCam *badpix = new MBadPixelsCam;
175
176 const Int_t type = GetFileType(tname, fname);
177 switch (type)
178 {
179 case 1: gLog << all << "Calibrated Data File detected..." << endl; break;
180 case 2: gLog << all << "Raw Data File detected..." << endl; break;
181 case -2: gLog << err << "File type unknown... abort." << endl; return;
182 case -1: gLog << err << "Tree " << tname << " not found... abort." << endl; return;
183 }
184
185 if (type==2)
186 {
187 TFile file(pname, "READ");
188 if (!file.IsZombie())
189 pcam = new MPedPhotCam;
190 if (pcam)
191 {
192 if (pcam->Read()<=0)
193 {
194 delete pcam;
195 pcam = NULL;
196 }
197
198 if (file.FindKey("MBadPixelsCam"))
199 {
200 MBadPixelsCam bad;
201 if (bad.Read()>0)
202 badpix->Merge(bad);
203 }
204 }
205 file.Close();
206 file.Open(cname, "READ");
207 if (!file.IsZombie())
208 ccam = new MCalibrationChargeCam;
209 if (ccam)
210 {
211 if (ccam->Read()<=0)
212 {
213 delete ccam;
214 ccam = NULL;
215 }
216
217 if (file.FindKey("MBadPixelsCam"))
218 {
219 MBadPixelsCam bad;
220 if (bad.Read()>0)
221 badpix->Merge(bad);
222 }
223 }
224 file.Close();
225 }
226
227 //
228 // Setup an empty job, with a reader task only.
229 // All tasks and parameter containers are deleted automatically
230 // (via SetOwner())
231 //
232 MTaskList *tlist = new MTaskList;
233 tlist->SetOwner();
234
235 MReadMarsFile *read = new MReadMarsFile(tname, fname);
236 read->DisableAutoScheme();
237 tlist->AddToList(read);
238
239 MGeomApply *apl = new MGeomApply;
240 tlist->AddToList(apl);
241
242 MParList *plist = new MParList;
243 plist->SetOwner();
244 plist->AddToList(tlist);
245 plist->AddToList(badpix);
246 if (pcam)
247 plist->AddToList(pcam);
248 if (ccam)
249 plist->AddToList(ccam);
250
251 MHEvent *evt01 = new MHEvent(MHEvent::kEvtSignalRaw);
252 MHEvent *evt02 = new MHEvent(MHEvent::kEvtSignalRaw);
253 MHEvent *evt03 = new MHEvent(MHEvent::kEvtPedestal);
254 MHEvent *evt04 = new MHEvent(MHEvent::kEvtPedestalRMS);
255 MHEvent *evt05 = new MHEvent(MHEvent::kEvtRelativeSignal);
256 MHEvent *evt06a= new MHEvent(MHEvent::kEvtCleaningData);
257 MHEvent *evt06b= new MHEvent(MHEvent::kEvtCleaningLevels);
258 MHEvent *evt07 = new MHEvent(MHEvent::kEvtIdxMax);
259 MHEvent *evt08 = new MHEvent(MHEvent::kEvtArrTime);
260 MHEvent *evt09 = new MHEvent(MHEvent::kEvtTrigPix);
261 MHEvent *evt10 = new MHEvent(MHEvent::kEvtIslandIndex);
262
263 evt01->SetName("Signal");
264 evt02->SetName("Cleaned");
265 evt03->SetName("Pedestal");
266 evt04->SetName("PedRMS");
267 evt05->SetName("Signal/PedRMS");
268 evt06a->SetName("CleanData");
269 evt06b->SetName("CleanLevels");
270 evt07->SetName("Max Slice Idx");
271 evt08->SetName("Arrival Time");
272 evt09->SetName("Trigger");
273 evt10->SetName("Islands");
274
275 // This makes sure, that the containers are deleted...
276 plist->AddToList(evt01);
277 plist->AddToList(evt02);
278 plist->AddToList(evt03);
279 plist->AddToList(evt04);
280 plist->AddToList(evt05);
281 plist->AddToList(evt06a);
282 plist->AddToList(evt06b);
283 plist->AddToList(evt07);
284 plist->AddToList(evt08);
285 plist->AddToList(evt09);
286 plist->AddToList(evt10);
287
288 MCerPhotAnal2 *nanal = new MCerPhotAnal2;
289 MFillH *fill01 = new MFillH(evt01, "MCerPhotEvt", "MFillH01");
290 MImgCleanStd *clean = new MImgCleanStd;
291 MFillH *fill02 = new MFillH(evt02, "MCerPhotEvt", "MFillH02");
292 MFillH *fill03 = new MFillH(evt03, "MPedPhotCam", "MFillH03");
293 MFillH *fill04 = new MFillH(evt04, "MPedPhotCam", "MFillH04");
294 MFillH *fill05 = new MFillH(evt05, "MCameraData", "MFillH05");
295 MFillH *fill06a= new MFillH(evt06a, "MCameraData", "MFillH06a");
296 MFillH *fill06b= new MFillH(evt06b, "MCameraData", "MFillH06b");
297 //MBlindPixelCalc *blind = new MBlindPixelCalc;
298 MHillasCalc *hcalc = new MHillasCalc;
299 MMcTriggerLvl2Calc *trcal = new MMcTriggerLvl2Calc;
300 MFillH *fill09 = new MFillH(evt09, "MMcTriggerLvl2", "MFillH09");
301 MFillH *fill10 = new MFillH(evt10, "MCerPhotEvt", "MFillH10");
302
303 // If no pedestal or no calibration file is availble
304 if (type==2)
305 {
306 if (!pcam || !ccam)
307 {
308 MFilter *f1=new MFDataMember("MRawRunHeader.fRunType", '>', 255.5);
309 MFilter *f2=new MFDataMember("MRawRunHeader.fRunType", '<', 255.5);
310 f1->SetName("MFMonteCarlo");
311 f2->SetName("MFRealData");
312
313 MMcPedestalCopy *pcopy = new MMcPedestalCopy;
314 MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd;
315
316 MExtractSignal* extra = new MExtractSignal();
317 extra->SetRange(0, 14, 0, 14);
318 extra->SetSaturationLimit(240);
319
320 MMcCalibrationUpdate* mcupd = new MMcCalibrationUpdate;
321 mcupd->SetOuterPixelsGainScaling(kFALSE);
322
323 MCalibrate* mccal = new MCalibrate;
324 mccal->SetCalibrationMode(MCalibrate::kFfactor);
325
326 // MC
327 extra->SetFilter(f1);
328 mcupd->SetFilter(f1);
329 mccal->SetFilter(f1);
330 trcal->SetFilter(f1);
331 //fill09->SetFilter(f1);
332
333 // Data
334 nanal->SetFilter(f2);
335
336 // TaskList
337 tlist->AddToList(f1);
338 tlist->AddToList(f2);
339 tlist->AddToList(pcopy);
340 tlist->AddToList(pdnsb);
341
342 tlist->AddToList(extra);
343 tlist->AddToList(mcupd);
344 tlist->AddToList(mccal);
345
346
347 tlist->AddToList(nanal);
348 }
349 else
350 {
351 MCalibrate* calib = new MCalibrate;
352 tlist->AddToList(calib);
353 }
354 }
355
356 tlist->AddToList(fill01);
357 tlist->AddToList(clean);
358 tlist->AddToList(fill02);
359 tlist->AddToList(fill03);
360 tlist->AddToList(fill04);
361 tlist->AddToList(fill05);
362 tlist->AddToList(fill06a);
363 tlist->AddToList(fill06b);
364 //tlist->AddToList(blind);
365 tlist->AddToList(fill10);
366 tlist->AddToList(hcalc);
367 if ((!pcam || !ccam) && type==2)
368 {
369 MArrivalTimeCalc *tcalc = new MArrivalTimeCalc;
370 MFillH *fill07 = new MFillH(evt07, "MRawEvtData", "MFillH7");
371 MFillH *fill08 = new MFillH(evt08, "MArrivalTimeCam", "MFillH8");
372 tlist->AddToList(tcalc);
373 tlist->AddToList(fill07);
374 tlist->AddToList(fill08);
375
376 tlist->AddToList(trcal);
377 tlist->AddToList(fill09);
378 }
379 if (type==1)
380 {
381 MFillH *fill08 = new MFillH(evt08, "MArrivalTime", "MFillH8");
382 tlist->AddToList(fill08);
383 }
384
385 //
386 // Now distribute Display to all tasks
387 //
388 fEvtLoop = new MEvtLoop(Form("Mars %s", gSystem->BaseName(fname)));
389 fEvtLoop->SetOwner();
390 fEvtLoop->SetParList(plist);
391 fEvtLoop->SetDisplay(this);
392 fEvtLoop->ReadEnv("mars.rc");
393
394}
395
396// --------------------------------------------------------------------------
397//
398// Add the top part of the frame: This is filename and treename display
399//
400void MEventDisplay::AddTopFramePart1(TGCompositeFrame *frame,
401 const char *filename,
402 const char *treename)
403{
404 //
405 // --- the top1 part of the window ---
406 //
407 TGHorizontalFrame *top1 = new TGHorizontalFrame(frame, 1, 1);
408 fList->Add(top1);
409
410 //
411 // create gui elements
412 //
413 TGLabel *file = new TGLabel(top1, new TGString(Form("%s#%s", filename, treename)));
414 fList->Add(file);
415
416 //
417 // layout and add gui elements in/to frame
418 //
419 TGLayoutHints *laystd = new TGLayoutHints(kLHintsCenterX, 5, 5);
420 fList->Add(laystd);
421
422 top1->AddFrame(file, laystd);
423
424 //
425 // --- the top1 part of the window ---
426 //
427 TGHorizontalFrame *top2 = new TGHorizontalFrame(frame, 1, 1);
428 fList->Add(top2);
429
430 //
431 // layout and add frames
432 //
433 TGLayoutHints *laytop1 = new TGLayoutHints(kLHintsCenterX, 5, 5, 5);
434 fList->Add(laytop1);
435 frame->AddFrame(top1, laytop1);
436 frame->AddFrame(top2, laytop1);
437}
438
439// --------------------------------------------------------------------------
440//
441// Add the second part of the top frame: This are the event number controls
442//
443void MEventDisplay::AddTopFramePart2(TGCompositeFrame *frame)
444{
445 //
446 // --- the top2 part of the window ---
447 //
448 TGHorizontalFrame *top2 = new TGHorizontalFrame(frame, 1, 1);
449 fList->Add(top2);
450
451 //
452 // Create the gui elements
453 //
454 TGTextButton *prevevt = new TGTextButton(top2, " << ", kEvtPrev);
455 prevevt->Associate(this);
456
457 TGLabel *evtnr = new TGLabel(top2, new TGString("Event:"));
458
459 TGTextEntry *entry=new TGTextEntry(top2, new TGTextBuffer(100), kEvtNumber);
460 entry->Resize(60, entry->GetDefaultHeight());
461 entry->Associate(this);
462
463 fNumOfEvts = new TGLabel(top2, "of .");
464
465 TGTextButton *nextevt = new TGTextButton (top2, " >> ", kEvtNext);
466 nextevt->Associate(this);
467
468 //
469 // Add gui elements to 'atotodel'
470 //
471 fList->Add(prevevt);
472 fList->Add(evtnr);
473 fList->Add(entry);
474 fList->Add(fNumOfEvts);
475 fList->Add(nextevt);
476
477 //
478 // add the gui elements to the frame
479 //
480 TGLayoutHints *laystd = new TGLayoutHints(kLHintsLeft|kLHintsCenterY, 5, 5);
481 fList->Add(laystd);
482
483 top2->AddFrame(prevevt, laystd);
484 top2->AddFrame(evtnr, laystd);
485 top2->AddFrame(entry, laystd);
486 top2->AddFrame(fNumOfEvts, laystd);
487 top2->AddFrame(nextevt, laystd);
488
489 TGLayoutHints *laystd2 = new TGLayoutHints(kLHintsCenterX, 5, 5, 5, 5);
490 fList->Add(laystd2);
491 frame->AddFrame(top2, laystd2);
492
493 //
494 // Add trailing line...
495 //
496 TGHorizontal3DLine *line = new TGHorizontal3DLine(frame);
497 TGLayoutHints *layline = new TGLayoutHints(kLHintsExpandX);
498 fList->Add(line);
499 fList->Add(layline);
500 frame->AddFrame(line, layline);
501}
502
503// --------------------------------------------------------------------------
504//
505// Add the user frame part of the display
506//
507void MEventDisplay::AddUserFrame(const char* filename)
508{
509 fUserFrame->ChangeOptions(kHorizontalFrame);
510
511 TGCompositeFrame *vf1 = new TGVerticalFrame(fUserFrame, 1, 1);
512 TGCompositeFrame *vf2 = new TGVerticalFrame(fUserFrame, 1, 1);
513
514 AddTopFramePart1(vf1, filename, "Events");
515 AddTopFramePart2(vf1);
516
517 // create root embedded canvas and add it to the tab
518 TRootEmbeddedCanvas *ec = new TRootEmbeddedCanvas("Slices", vf2, vf1->GetDefaultHeight()*3/2, vf1->GetDefaultHeight(), 0);
519 vf2->AddFrame(ec);
520 fList->Add(ec);
521
522 // set background and border mode of the canvas
523 fCanvas = ec->GetCanvas();
524 fCanvas->SetBorderMode(0);
525 gROOT->GetListOfCanvases()->Add(fCanvas);
526 //fCanvas->SetBorderSize(1);
527 //fCanvas->SetBit(kNoContextMenu);
528 //fCanvas->SetFillColor(16);
529
530 TGLayoutHints *lay = new TGLayoutHints(kLHintsExpandX);
531 fUserFrame->AddFrame(vf1, lay);
532 fUserFrame->AddFrame(vf2);
533}
534
535// --------------------------------------------------------------------------
536//
537// Checks if the event number is valid, and if so reads the new event
538// and updates the display
539//
540void MEventDisplay::ReadinEvent(Int_t dir)
541{
542 MParList *plist = (MParList*) fEvtLoop->GetParList();
543 MTaskList *tlist = (MTaskList*) fEvtLoop->GetTaskList();
544 MGeomCam *geom = (MGeomCam*) plist->FindObject("MGeomCam");
545 MRawEvtData *raw = (MRawEvtData*)plist->FindObject("MRawEvtData");
546
547 //
548 // Read first event.
549 //
550 MReadTree *reader = (MReadTree*)fEvtLoop->FindTask("MRead");
551
552 const Int_t num = reader->GetNumEntry();
553
554 do
555 {
556 if (dir<0 && !reader->DecEventNum())
557 {
558 reader->SetEventNum(num);
559 return;
560 }
561 if (dir>0 && !reader->IncEventNum())
562 {
563 reader->SetEventNum(num);
564 return;
565 }
566
567 if (!tlist->Process())
568 return;
569
570 reader->DecEventNum();
571
572 } while (raw && raw->GetNumPixels()<1 && dir!=0);
573
574 //
575 // Cleare the 'FADC canvas'
576 //
577 fCanvas->Clear();
578 fCanvas->Modified();
579 fCanvas->Update();
580
581 //
582 // Print parameters
583 //
584 ((MHillas*) plist->FindObject("MHillas"))->Print(*geom);
585 ((MHillasExt*) plist->FindObject("MHillasExt"))->Print(*geom);
586 ((MHillasSrc*) plist->FindObject("MHillasSrc"))->Print(*geom);
587 plist->FindObject("MImagePar")->Print();
588 ((MNewImagePar*)plist->FindObject("MNewImagePar"))->Print(*geom);
589
590 //
591 // UpdateDisplay
592 //
593 gStyle->SetOptStat(1101);
594 Update();
595
596 TGTextEntry *entry = (TGTextEntry*)fList->FindWidget(kEvtNumber);
597 entry->SetText(Form("%d", reader->GetNumEntry()+1));
598}
599
600// --------------------------------------------------------------------------
601//
602// Read first event to get display booted
603//
604void MEventDisplay::ReadFirstEvent()
605{
606 if (!fEvtLoop->PreProcess())
607 return;
608
609 //
610 // Get parlist
611 //
612 MParList *plist = (MParList*)fEvtLoop->GetParList();
613
614 //
615 // Add Geometry tab
616 //
617 AddGeometryTabs();
618
619 //
620 // Now read event...
621 //
622 ReadinEvent();
623
624 MReadTree *reader = (MReadTree*)fEvtLoop->FindTask("MRead");
625 TGString *txt = new TGString(Form("of %d", reader->GetEntries()));
626 fNumOfEvts->SetText(txt);
627
628 //
629 // Draw ellipse on top of all pads
630 //
631 TObject *hillas = plist->FindObject("MHillas");
632 for (int i=1; i<7;i++)
633 {
634 TCanvas *c = GetCanvas(i);
635 c->cd(1);
636 hillas->Draw();
637 }
638}
639
640// --------------------------------------------------------------------------
641//
642// Adds the geometry tab
643//
644void MEventDisplay::AddGeometryTabs()
645{
646 MGeomCam *geom = (MGeomCam*)fEvtLoop->GetParList()->FindObject("MGeomCam");
647 if (!geom)
648 return;
649
650 TCanvas &c1=AddTab("Geometry");
651
652 MHCamera *cam = new MHCamera(*geom);
653 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete);
654 cam->Draw("pixelindex");
655
656 c1.Modified();
657 c1.Update();
658
659 TCanvas &c2=AddTab("Sectors");
660
661 cam = new MHCamera(*geom);
662 cam->SetBit(TH1::kNoStats|MHCamera::kNoLegend|kCanDelete);
663 cam->Draw("sectorindex");
664
665 c2.Modified();
666 c2.Update();
667}
668
669// --------------------------------------------------------------------------
670//
671// ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
672//
673// Processes information from all GUI items.
674// Selecting an item usually generates an event with 4 parameters.
675// The first two are packed into msg (first and second bytes).
676// The other two are parm1 and parm2.
677//
678Bool_t MEventDisplay::ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2)
679{
680 switch (GET_MSG(msg))
681 {
682 case kC_TEXTENTRY:
683 switch(GET_SUBMSG(msg))
684 {
685 case kTE_ENTER:
686 switch(GET_SUBMSG(msg))
687 {
688 case kTE_ENTER:
689 {
690 TGTextEntry *entry = (TGTextEntry*)fList->FindWidget(kEvtNumber);
691 MReadTree *reader = (MReadTree*)fEvtLoop->FindTask("MRead");
692 if (reader->SetEventNum(atoi(entry->GetText())-1))
693 ReadinEvent();
694 }
695 return kTRUE;
696 }
697 return kTRUE;
698 }
699 break;
700
701 case kC_COMMAND:
702 switch (GET_SUBMSG(msg))
703 {
704 case kCM_TAB:
705 {
706 //
707 // Set name for 'FADC canvas'. The name is the anchor for MHCamera.
708 // and clear the canvas
709 TCanvas *c = GetCanvas(mp1);
710 if (!c)
711 break;
712 MHEvent *o = (MHEvent*)fEvtLoop->GetParList()->FindObject(c->GetName());
713 if (!o)
714 break;
715 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(), c->GetPad(1)));
716 }
717 break;
718
719 case kCM_BUTTON:
720 switch (mp1)
721 {
722 case kEvtPrev:
723 ReadinEvent(-1);
724 return kTRUE;
725
726 case kEvtNext:
727 ReadinEvent(+1);
728 return kTRUE;
729 }
730 return kTRUE;
731 }
732 break;
733 }
734
735 return MStatusDisplay::ProcessMessage(msg, mp1, mp2);
736}
Note: See TracBrowser for help on using the repository browser.