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

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