Fixing bug #59470
[u/mrichter/AliRoot.git] / MONITOR / AliTestChildProc.cxx
CommitLineData
c6d78c69 1// @(#)root/eve:$Id$
2// Author: Matevz Tadel 2007
3
4/**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
9
10#include "AliTestChildProc.h"
11
12#include <TGButton.h>
13
14#include <TSystem.h>
15
16#include <cstdio>
17#include <cstdlib>
18
19
20//==============================================================================
21// AliTestChildProc
22//==============================================================================
23
24//______________________________________________________________________________
25// Full description of AliTestChildProc
26//
27
28ClassImp(AliTestChildProc)
29
30AliTestChildProc::AliTestChildProc(Int_t run) :
31 TGMainFrame(gClient->GetRoot(), 400, 200)
32{
33 TGTextButton *b;
34
35 b = new TGTextButton(this, "Exit");
36 AddFrame(b, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY));
37 b->Connect("Clicked()", "AliTestChildProc", this, "DoExit()");
38
39 b = new TGTextButton(this, "Crash");
40 AddFrame(b, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY));
41 b->Connect("Clicked()", "AliTestChildProc", this, "DoCrash()");
42
43 b = new TGTextButton(this, "Xyzz");
44 AddFrame(b, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY));
45 b->Connect("Clicked()", "AliTestChildProc", this, "DoXyzz()");
46
47 MapSubwindows();
48 Layout();
49 SetWindowName(TString::Format("Test window %d", run));
50}
51
52void AliTestChildProc::DoExit()
53{
54 printf("doing exit ...\n");
55 gSystem->ExitLoop();
56}
57
58void AliTestChildProc::DoCrash()
59{
60 printf("doing crash ...\n");
61 TObject *p = 0;
62 p->Dump();
63}
64
65void AliTestChildProc::DoXyzz()
66{
67 printf("doing xyzz ...\n");
68}