/[PAMELA software]/eventviewer/flight/src/FEVpamevcontrol.cpp
ViewVC logotype

Diff of /eventviewer/flight/src/FEVpamevcontrol.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mocchiut, Fri Jul 14 14:18:05 2006 UTC revision 1.3 by mocchiut, Tue Mar 20 12:49:56 2007 UTC
# Line 102  PAMevcontrol::PAMevcontrol(const TGWindo Line 102  PAMevcontrol::PAMevcontrol(const TGWindo
102    cvar = &var;    cvar = &var;
103    thefigure = &figure;    thefigure = &figure;
104    //    //
105    TGCompositeFrame *cframe1 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);    cframe1 = new TGCompositeFrame(this, 280, 40, kVerticalFrame);
106    TGCompositeFrame *cframe2 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);    TGCompositeFrame *cframe2 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);
107    TGCompositeFrame *cframe3 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);    TGCompositeFrame *cframe3 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);
108    TGCompositeFrame *cframe4 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);    TGCompositeFrame *cframe4 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);
109    TGGroupFrame *gf = new TGGroupFrame(cframe1, "Appearance");    TGCompositeFrame *cframe5 = new TGCompositeFrame(this, 280, 60, kVerticalFrame);
110      gf = new TGGroupFrame(cframe1, "Detectors");
111      TGGroupFrame *gf2 = new TGGroupFrame(cframe5, "Appearance");
112    TGGroupFrame *inputf = new TGGroupFrame(cframe2, "Input");    TGGroupFrame *inputf = new TGGroupFrame(cframe2, "Input");
113    TGGroupFrame *jumpf = new TGGroupFrame(cframe3, "Jump to");    TGGroupFrame *jumpf = new TGGroupFrame(cframe3, "Jump to");
114    TGGroupFrame *savef = new TGGroupFrame(cframe4, "Save figure as");    TGGroupFrame *savef = new TGGroupFrame(cframe4, "Save figure as");
# Line 118  PAMevcontrol::PAMevcontrol(const TGWindo Line 120  PAMevcontrol::PAMevcontrol(const TGWindo
120    TGHorizontalFrame *htext3 = new TGHorizontalFrame(jumpf,400,800);    TGHorizontalFrame *htext3 = new TGHorizontalFrame(jumpf,400,800);
121    TGHorizontalFrame *htext4 = new TGHorizontalFrame(jumpf,400,80);    TGHorizontalFrame *htext4 = new TGHorizontalFrame(jumpf,400,80);
122    TGHorizontalFrame *hframe = new TGHorizontalFrame(this,400,800);    TGHorizontalFrame *hframe = new TGHorizontalFrame(this,400,800);
123    TGHorizontalFrame *hframe1 = new TGHorizontalFrame(gf, 280, 50);    for (Int_t fr=0; fr<12; fr++) hframedec[fr] = new TGHorizontalFrame(gf, 7, 7);
124    TGHorizontalFrame *hframe2 = new TGHorizontalFrame(gf, 280, 40);    TGHorizontalFrame *hframe3 = new TGHorizontalFrame(gf2, 280, 40);
125    TGHorizontalFrame *hframe3 = new TGHorizontalFrame(gf, 280, 40);    TGHorizontalFrame *hframe4 = new TGHorizontalFrame(gf2,280,10);
   TGHorizontalFrame *hframe4 = new TGHorizontalFrame(gf,280,10);  
126    TGVerticalFrame *hframe5 = new TGVerticalFrame(hframe4, 280, 40);    TGVerticalFrame *hframe5 = new TGVerticalFrame(hframe4, 280, 40);
127    TGHorizontalFrame *hfrprog = new TGHorizontalFrame(this,400,800);    TGHorizontalFrame *hfrprog = new TGHorizontalFrame(this,400,800);
128    //    //
# Line 132  PAMevcontrol::PAMevcontrol(const TGWindo Line 133  PAMevcontrol::PAMevcontrol(const TGWindo
133    fText->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilename()");    fText->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilename()");
134    fText->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");    fText->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");
135    htext->AddFrame(fText, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));    htext->AddFrame(fText, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));
136    htext->AddFrame(Load, new TGLayoutHints(kLHintsCenterX | kLHintsExpandX,0,5,5,5));    htext->AddFrame(Load, new TGLayoutHints(kLHintsCenterX,0,5,5,5));
137    inputf->AddFrame(new TGLabel(inputf, new TGHotString("Filename:")));    inputf->AddFrame(new TGLabel(inputf, new TGHotString("Filename:")));
138    inputf->AddFrame(htext, new TGLayoutHints(kLHintsExpandX));    inputf->AddFrame(htext, new TGLayoutHints(kLHintsExpandX));
139    //    //
# Line 140  PAMevcontrol::PAMevcontrol(const TGWindo Line 141  PAMevcontrol::PAMevcontrol(const TGWindo
141    fText2->SetText(cvar->thefilter.Data());    fText2->SetText(cvar->thefilter.Data());
142    TGTextButton *Load2 = new TGTextButton(htext2,"Load");    TGTextButton *Load2 = new TGTextButton(htext2,"Load");
143    Load2->Connect("Clicked()","TGTextEntry",fText2,"ReturnPressed()");    Load2->Connect("Clicked()","TGTextEntry",fText2,"ReturnPressed()");
144      Load2->SetToolTipText("Clear box and click to unload file");
145    fText2->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilter()");    fText2->Connect("ReturnPressed()", "PAMevcontrol", this,"SetFilter()");
146    fText2->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");    fText2->Connect("TabPressed()", "PAMevcontrol", this,"CompleteText()");
147    htext2->AddFrame(fText2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));    htext2->AddFrame(fText2, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY, 0, 5, 5, 5));
148    htext2->AddFrame(Load2, new TGLayoutHints(kLHintsCenterX | kLHintsExpandX,0,5,5,5));    htext2->AddFrame(Load2, new TGLayoutHints(kLHintsCenterX,0,5,5,5));
149    inputf->AddFrame(new TGLabel(inputf, new TGHotString("Selection file:")));    inputf->AddFrame(new TGLabel(inputf, new TGHotString("Selection file:")));
150    inputf->AddFrame(htext2, new TGLayoutHints(kLHintsExpandX));    inputf->AddFrame(htext2, new TGLayoutHints(kLHintsExpandX));
151    //    //
152    cframe2->AddFrame(inputf,new TGLayoutHints(kLHintsExpandX,5,5,5,5));    cframe2->AddFrame(inputf,new TGLayoutHints(kLHintsExpandX,5,5,5,5));
153    //    //
154    TGCheckButton *fchktof = new TGCheckButton(hframe1, "TOF");      //
155      //
156      fComboDec = new TGComboBox(gf, 98);
157      fComboDec->AddEntry(" - Select Detector -", 11);
158      fComboDec->AddEntry("PSCU - ORB", 0);
159      fComboDec->AddEntry("Run", 1);
160      fComboDec->AddEntry("Trigger", 2);
161      fComboDec->AddEntry("ToF", 3);
162      fComboDec->AddEntry("Tracker", 4);
163      fComboDec->AddEntry("Anticounter", 5);
164      fComboDec->AddEntry("Calorimeter", 6);
165      fComboDec->AddEntry("S4", 7);
166      fComboDec->AddEntry("ND", 8);
167      fComboDec->AddEntry("Software info", 9);
168      fComboDec->AddEntry("ALL", 10);
169      fComboDec->Select(11);
170      fComboDec->Resize(150,23);
171      gf->AddFrame(fComboDec, new TGLayoutHints(kLHintsCenterY | kLHintsExpandX| kLHintsLeft, 5, 7, 7, 7));
172      fComboDec->Connect("Selected(Int_t)","PAMevcontrol",this,"refreshdec(Int_t)");
173      //
174      // PSCU/Orbital
175      //
176      fshoworb = new TGTextButton(hframedec[0], "Show Data");  
177      fshoworb->Connect("Clicked()","PAMevcontrol", this,"showorbdata()");
178      if ( !cvar->ORB ) fshoworb->SetState(kButtonDisabled);
179      hframedec[0]->AddFrame(fshoworb, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5));
180      //
181      // RUN
182      //
183      fshowrun = new TGTextButton(hframedec[1], "Show Data");  
184      fshowrun->Connect("Clicked()","PAMevcontrol", this,"showrundata()");
185      if ( !cvar->RUN ) fshoworb->SetState(kButtonDisabled);
186      hframedec[1]->AddFrame(fshowrun, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5));
187      //
188      // Trigger
189      //
190      fshowtrg = new TGTextButton(hframedec[2], "Show Data");  
191      fshowtrg->Connect("Clicked()","PAMevcontrol", this,"showtrgdata()");
192      if ( !cvar->TRG ) fshowtrg->SetState(kButtonDisabled);
193      hframedec[2]->AddFrame(fshowtrg, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5));
194      //
195      // TOF
196      //
197      fchktof = new TGCheckButton(hframedec[3], "Show");  
198    fchktof->Connect("Clicked()","PAMevcontrol", this,"chktof()");    fchktof->Connect("Clicked()","PAMevcontrol", this,"chktof()");
199    if ( cvar->TOF ) fchktof->SetState(kButtonDown);    if ( cvar->TOF ) fchktof->SetState(kButtonDown);
200    hframe1->AddFrame(fchktof, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));    hframedec[3]->AddFrame(fchktof, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
201      fshowtof = new TGTextButton(hframedec[3], "Show Data");  
202      fshowtof->Connect("Clicked()","PAMevcontrol", this,"showtofdata()");
203      if ( !cvar->TOF ) fshowtof->SetState(kButtonDisabled);
204      hframedec[3]->AddFrame(fshowtof, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
205    //    //
206    TGCheckButton *fchkac = new TGCheckButton(hframe1, "AC");      // Tracker
   fchkac->Connect("Clicked()","PAMevcontrol", this,"chkac()");    
   if ( cvar->AC ) fchkac->SetState(kButtonDown);  
   hframe1->AddFrame(fchkac, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));  
207    //    //
208    TGCheckButton *fchktrk = new TGCheckButton(hframe1, "Tracker");      fchktrk = new TGCheckButton(hframedec[4], "Show");  
209    fchktrk->Connect("Clicked()","PAMevcontrol",this,"chktrk()");      fchktrk->Connect("Clicked()","PAMevcontrol",this,"chktrk()");  
210    if ( cvar->TRK ) fchktrk->SetState(kButtonDown);    if ( cvar->TRK ) fchktrk->SetState(kButtonDown);
211    hframe1->AddFrame(fchktrk, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));    hframedec[4]->AddFrame(fchktrk, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
212      fshowtrk = new TGTextButton(hframedec[4], "Show Data");  
213      fshowtrk->Connect("Clicked()","PAMevcontrol", this,"showtrkdata()");
214      if ( !cvar->TRK ) fshowtrk->SetState(kButtonDisabled);
215      hframedec[4]->AddFrame(fshowtrk, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
216      //
217      // AC
218      //
219      fchkac = new TGCheckButton(hframedec[5], "Show");  
220      fchkac->Connect("Clicked()","PAMevcontrol", this,"chkac()");  
221      if ( cvar->AC ) fchkac->SetState(kButtonDown);
222      hframedec[5]->AddFrame(fchkac, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
223      fshowac = new TGTextButton(hframedec[5], "Show Data");  
224      fshowac->Connect("Clicked()","PAMevcontrol", this,"showacdata()");
225      if ( !cvar->AC ) fshowac->SetState(kButtonDisabled);
226      hframedec[5]->AddFrame(fshowac, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
227    //    //
228    gf->AddFrame(hframe1, new TGLayoutHints(kLHintsExpandX));    // Calorimeter
229    //    //
230    TGCheckButton *fchks4 = new TGCheckButton(hframe2, "S4");      fchkcalo = new TGCheckButton(hframedec[6], "Show");  
231      fchkcalo->Connect("Clicked()","PAMevcontrol",this,"chkcalo()");  
232      if ( cvar->CALO ) fchkcalo->SetState(kButtonDown);
233      hframedec[6]->AddFrame(fchkcalo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
234      fchkcalost = new TGCheckButton(hframedec[6], "Track");  
235      fchkcalost->Connect("Clicked()","PAMevcontrol",this,"chkcalost()");  
236      if ( cvar->CALO ) fchkcalost->SetState(kButtonUp);
237      hframedec[6]->AddFrame(fchkcalost, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,2,5,5));
238      fshowcal = new TGTextButton(hframedec[6], "Show Data");  
239      fshowcal->Connect("Clicked()","PAMevcontrol", this,"showcaldata()");
240      if ( !cvar->CALO ) fshowcal->SetState(kButtonDisabled);
241      hframedec[6]->AddFrame(fshowcal, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
242      //
243      // S4
244      //
245      fchks4 = new TGCheckButton(hframedec[7], "Show");  
246    fchks4->Connect("Clicked()","PAMevcontrol",this,"chks4()");      fchks4->Connect("Clicked()","PAMevcontrol",this,"chks4()");  
247    if ( cvar->S4 ) fchks4->SetState(kButtonDown);    if ( cvar->S4 ) fchks4->SetState(kButtonDown);
248    hframe2->AddFrame(fchks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,15,5,5));    hframedec[7]->AddFrame(fchks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
249      fshows4 = new TGTextButton(hframedec[7], "Show Data");  
250      fshows4->Connect("Clicked()","PAMevcontrol", this,"shows4data()");
251      if ( !cvar->S4 ) fshows4->SetState(kButtonDisabled);
252      hframedec[7]->AddFrame(fshows4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
253      //
254      // ND
255    //    //
256    TGCheckButton *fchknd = new TGCheckButton(hframe2, "ND");      fchknd = new TGCheckButton(hframedec[8], "Show");  
257    fchknd->Connect("Clicked()","PAMevcontrol",this,"chknd()");      fchknd->Connect("Clicked()","PAMevcontrol",this,"chknd()");  
258    if ( cvar->ND ) fchknd->SetState(kButtonDown);    if ( cvar->ND ) fchknd->SetState(kButtonDown);
259    hframe2->AddFrame(fchknd, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,25,5,5));    hframedec[8]->AddFrame(fchknd, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
260      fshownd = new TGTextButton(hframedec[8], "Show Data");  
261      fshownd->Connect("Clicked()","PAMevcontrol", this,"shownddata()");
262      if ( !cvar->ND ) fshownd->SetState(kButtonDisabled);
263      hframedec[8]->AddFrame(fshownd, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,2,5,5,5));
264    //    //
265    TGCheckButton *fchkcalo = new TGCheckButton(hframe2, "Calorimeter");      // Software infos
266    fchkcalo->Connect("Clicked()","PAMevcontrol",this,"chkcalo()");      //
267    if ( cvar->CALO ) fchkcalo->SetState(kButtonDown);    fshowsi = new TGTextButton(hframedec[9], "Show Data");  
268    hframe2->AddFrame(fchkcalo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,2,5,5));    fshowsi->Connect("Clicked()","PAMevcontrol", this,"showorbdata()");
269      if ( !cvar->RUN ) fshoworb->SetState(kButtonDisabled);
270      hframedec[9]->AddFrame(fshoworb, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
271      //
272      // All data
273      //
274      fshowall = new TGTextButton(hframedec[10], "Show Data");  
275      fshowall->Connect("Clicked()","PAMevcontrol", this,"showorbdata()");
276      hframedec[10]->AddFrame(fshowall, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5));
277    //    //
278    gf->AddFrame(hframe2, new TGLayoutHints(kLHintsExpandX));    //  for (Int_t fr=0; fr<11; fr++) gf->AddFrame(hframedec[fr], new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,1,1,1,1));
279    //    //
280    TGCheckButton *fchkinfo = new TGCheckButton(hframe3, "Infos");      gf->AddFrame(hframedec[11], new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,17,17));  
281      //
282      //  for (Int_t fr=0; fr<11; fr++) gf->AddFrame(hframedec[fr],new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,0,5,5,5));
283      //  gf->GetLayoutManager()->SetPadBottom(5);
284      //  gf->MapSubwindows();
285      //
286      fchkinfo = new TGCheckButton(hframe3, "Infos");  
287    fchkinfo->Connect("Clicked()","PAMevcontrol",this,"chkinfo()");      fchkinfo->Connect("Clicked()","PAMevcontrol",this,"chkinfo()");  
288    if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown);    if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown);
289    hframe3->AddFrame(fchkinfo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,0,5,5,5));    hframe3->AddFrame(fchkinfo, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,0,5,5,5));
290    //    //
291    TGCheckButton *fchknames = new TGCheckButton(hframe3, "Names");      fchknames = new TGCheckButton(hframe3, "Names");  
292    fchknames->Connect("Clicked()","PAMevcontrol",this,"chknames()");      fchknames->Connect("Clicked()","PAMevcontrol",this,"chknames()");  
293    if ( cvar->VINFOS ) fchknames->SetState(kButtonDown);    if ( cvar->VINFOS ) fchknames->SetState(kButtonDown);
294    hframe3->AddFrame(fchknames, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,5,5,5));    hframe3->AddFrame(fchknames, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5));
295    TGCheckButton *fchkpalette = new TGCheckButton(hframe3, "Palette");      fchkpalette = new TGCheckButton(hframe3, "Palette");  
296    fchkpalette->Connect("Clicked()","PAMevcontrol",this,"chkpalette()");      fchkpalette->Connect("Clicked()","PAMevcontrol",this,"chkpalette()");  
297    if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown);    if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown);
298    hframe3->AddFrame(fchkpalette, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));    hframe3->AddFrame(fchkpalette, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,10,5,5,5));
299    gf->AddFrame(hframe3, new TGLayoutHints(kLHintsExpandX));    gf2->AddFrame(hframe3, new TGLayoutHints(kLHintsExpandX));
300    //    //
301    TGVButtonGroup *group = new TGVButtonGroup(hframe4);    TGVButtonGroup *group = new TGVButtonGroup(hframe4);
   TGRadioButton *bwc0;  
   TGRadioButton *bwc1;  
302    bwc0 = new TGRadioButton(group, "Colour");    bwc0 = new TGRadioButton(group, "Colour");
303    bwc1 = new TGRadioButton(group, "B/W");    bwc1 = new TGRadioButton(group, "B/W");
304    if ( cvar->bw ){    if ( cvar->bw ){
# Line 210  PAMevcontrol::PAMevcontrol(const TGWindo Line 308  PAMevcontrol::PAMevcontrol(const TGWindo
308    };    };
309    bwc0->Connect("Pressed()", "PAMevcontrol",this,"radiocolor()");    bwc0->Connect("Pressed()", "PAMevcontrol",this,"radiocolor()");
310    bwc1->Connect("Pressed()", "PAMevcontrol",this,"radiobw()");    bwc1->Connect("Pressed()", "PAMevcontrol",this,"radiobw()");
311    hframe4->AddFrame(group,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,1,5,5,5));    hframe4->AddFrame(group,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,1,5,5,5));
312    //    //
313    //    //
314    ftrks4 = new TGCheckButton(hframe5, "Track in S4/ND");      ftrks4 = new TGCheckButton(hframe5, "Track in S4/ND");  
315    ftrks4->Connect("Clicked()","PAMevcontrol",this,"radiotrack()");      ftrks4->Connect("Clicked()","PAMevcontrol",this,"radiotrack()");  
316    if ( cvar->tracknds4) ftrks4->SetState(kButtonDown);    if ( cvar->tracknds4) ftrks4->SetState(kButtonDown);
317    hframe5->AddFrame(ftrks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,2,5,5));    hframe5->AddFrame(ftrks4, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
318    ffl0 = new TGCheckButton(hframe5, "Force LEVEL0");    ffl0 = new TGCheckButton(hframe5, "Force LEVEL0");
319    ffl0->Connect("Clicked()","PAMevcontrol",this,"forcel0()");    ffl0->Connect("Clicked()","PAMevcontrol",this,"forcel0()");
320    if ( cvar->fl0 ) ffl0->SetState(kButtonDown);    if ( cvar->fl0 ) ffl0->SetState(kButtonDown);
321    if ( !cvar->fl0 ) ffl0->SetState(kButtonUp);    if ( !cvar->fl0 ) ffl0->SetState(kButtonUp);
322    hframe5->AddFrame(ffl0, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,5,2,5,5));    hframe5->AddFrame(ffl0, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5));
323      //
324      hframe4->AddFrame(hframe5, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,10,5,5,5));
325      gf2->AddFrame(hframe4, new TGLayoutHints(kLHintsExpandX));
326    //    //
327    hframe4->AddFrame(hframe5, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY,10,5,5,5));    cframe1->AddFrame(gf, new TGLayoutHints(kLHintsExpandX,5,5,5,5));
328    gf->AddFrame(hframe4, new TGLayoutHints(kLHintsExpandX));    //  cframe1->Resize(280,10);
329      //  cframe1->GetLayoutManager()->SetDefaultHeight(5);
330      //  MapWindow();
331    //    //
332    cframe1->AddFrame(gf, new TGLayoutHints(kLHintsExpandX));    cframe5->AddFrame(gf2, new TGLayoutHints(kLHintsExpandX,5,5,5,5));
333    //    //
334    TGHButtonGroup *jgroup = new TGHButtonGroup(htext4);    TGHButtonGroup *jgroup = new TGHButtonGroup(htext4);
   TGRadioButton *jbwc0;  
   TGRadioButton *jbwc1;  
335    jbwc0 = new TGRadioButton(jgroup, "packet     ");    jbwc0 = new TGRadioButton(jgroup, "packet     ");
336    jbwc1 = new TGRadioButton(jgroup, "progressive");    jbwc1 = new TGRadioButton(jgroup, "progressive");
337    jbwc1->SetState(kButtonDown);    jbwc1->SetState(kButtonDown);
# Line 273  PAMevcontrol::PAMevcontrol(const TGWindo Line 374  PAMevcontrol::PAMevcontrol(const TGWindo
374    fCombo->Select(0);    fCombo->Select(0);
375    fCombo->Resize(50,23);    fCombo->Resize(50,23);
376    //  htexts->AddFrame(fCombo, new TGLayoutHints(kLHintsCenterX | kLHintsTop | kLHintsLeft | kLHintsCenterY | kLHintsExpandX, 0, 8, 1, 1));    //  htexts->AddFrame(fCombo, new TGLayoutHints(kLHintsCenterX | kLHintsTop | kLHintsLeft | kLHintsCenterY | kLHintsExpandX, 0, 8, 1, 1));
377    htexts->AddFrame(fCombo, new TGLayoutHints(kLHintsExpandY | kLHintsRight, 2, 2, 2, 1));    htexts->AddFrame(fCombo, new TGLayoutHints(kLHintsExpandY | kLHintsExpandY| kLHintsRight, 2, 2, 2, 1));
378    //    //
379    htextsl->AddFrame(save, new TGLayoutHints(kLHintsExpandX,0,0,2,1));    htextsl->AddFrame(save, new TGLayoutHints(kLHintsExpandX,0,0,2,1));
380    savef->AddFrame(htexts, new TGLayoutHints(kLHintsExpandX,0,0,2,5));    savef->AddFrame(htexts, new TGLayoutHints(kLHintsExpandX,0,0,2,5));
# Line 310  PAMevcontrol::PAMevcontrol(const TGWindo Line 411  PAMevcontrol::PAMevcontrol(const TGWindo
411    //  AddFrame(htext, new TGLayoutHints(kLHintsExpandX,2,2,15,1));    //  AddFrame(htext, new TGLayoutHints(kLHintsExpandX,2,2,15,1));
412    AddFrame(cframe2, new TGLayoutHints(kLHintsExpandX,1,1,1,1));    AddFrame(cframe2, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
413    AddFrame(cframe1, new TGLayoutHints(kLHintsExpandX,1,1,1,1));    AddFrame(cframe1, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
414      AddFrame(cframe5, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
415    AddFrame(cframe3, new TGLayoutHints(kLHintsExpandX,1,1,1,1));    AddFrame(cframe3, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
416    AddFrame(cframe4, new TGLayoutHints(kLHintsExpandX,1,1,1,1));    AddFrame(cframe4, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
417    AddFrame(hfrprog, new TGLayoutHints(kLHintsExpandX,1,1,1,1));    AddFrame(hfrprog, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
418    AddFrame(hframe, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY,1,1,1,1));    AddFrame(hframe, new TGLayoutHints(kLHintsExpandX,1,1,1,1));
419    // Set a name to the main frame    // Set a name to the main frame
420    SetWindowName("PAMELA Event Viewer control panel");    SetWindowName("PAMELA Event Viewer control panel");
421    // Map all subwindows of main frame    // Map all subwindows of main frame
# Line 322  PAMevcontrol::PAMevcontrol(const TGWindo Line 424  PAMevcontrol::PAMevcontrol(const TGWindo
424    Resize(GetDefaultSize());    Resize(GetDefaultSize());
425    // Map main frame    // Map main frame
426    MapWindow();    MapWindow();
427      //
428      gf->HideFrame(hframedec[11]);
429      for (Int_t fr=0; fr<11; fr++){
430        gf->AddFrame(hframedec[fr],new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,0,5,5,5));
431        gf->HideFrame(hframedec[fr]);
432      };
433      gf->MapSubwindows();
434      //
435  }  }
436    
437  void PAMevcontrol::DIALOG(Int_t ty, TString warn){      void PAMevcontrol::DIALOG(Int_t ty, TString warn){    
# Line 346  void PAMevcontrol::DIALOG(Int_t ty, TStr Line 456  void PAMevcontrol::DIALOG(Int_t ty, TStr
456      new TGMsgBox(gClient->GetRoot(), this, title.Data(), warn.Data(), mb_icon, kMBOk, &retval);      new TGMsgBox(gClient->GetRoot(), this, title.Data(), warn.Data(), mb_icon, kMBOk, &retval);
457  }  }
458    
459    void PAMevcontrol::refreshdec(Int_t n){
460      //
461      for (Int_t i=0; i<11; i++){
462        gf->HideFrame(hframedec[i]);
463      };
464      //
465      if ( n < 11 ){
466        gf->ShowFrame(hframedec[n]);
467      };
468    };
469    
470    
471    void PAMevcontrol::showorbdata(){
472      printf("orb \n");
473    };
474    
475    void PAMevcontrol::showtrgdata(){
476      printf("trg \n");
477    };
478    
479    void PAMevcontrol::showrundata(){
480      printf("run \n");
481    };
482    
483    void PAMevcontrol::showcaldata(){
484      printf("cal \n");
485    };
486    
487    void PAMevcontrol::chkcalost(){
488      if ( cvar->CALO ) {
489        cvar->CALO = 0;
490      } else {
491        cvar->CALO = 1;
492      };
493      cvar->i--;
494      cvar->nevents = 0;
495      cvar->firstevno = 0;
496      cvar->lastevno = 0;
497      cvar->refresh = true;
498    };
499    
500    void PAMevcontrol::showtrkdata(){
501      printf("trk \n");
502    };
503    
504    void PAMevcontrol::showtofdata(){
505      printf("tof \n");
506    };
507    
508    void PAMevcontrol::showacdata(){
509      printf("ac \n");
510    };
511    
512    void PAMevcontrol::shownddata(){
513      printf("nd \n");
514    };
515    
516    void PAMevcontrol::shows4data(){
517      printf("s4 \n");
518    };
519    
520    void PAMevcontrol::showsidata(){
521      printf("si \n");
522    };
523    
524    void PAMevcontrol::showalldata(){
525      printf("all \n");
526    };
527    
528  void PAMevcontrol::SetFilename() {  void PAMevcontrol::SetFilename() {
529      TGTextEntry *entry = (TGTextEntry*)gTQSender;      TGTextEntry *entry = (TGTextEntry*)gTQSender;
# Line 388  void PAMevcontrol::StopSearching() { Line 566  void PAMevcontrol::StopSearching() {
566    bstop->SetState(kButtonDisabled);    bstop->SetState(kButtonDisabled);
567  };  };
568    
569    void PAMevcontrol::RefreshButtons() {
570      if ( cvar->jumprog ){
571        jbwc1->SetState(kButtonDown);
572      } else {
573        jbwc0->SetState(kButtonDown);
574      };
575      if ( cvar->fl0 ){
576        ffl0->SetState(kButtonDown);
577      } else {
578        ffl0->SetState(kButtonUp);
579      };
580      if ( cvar->tracknds4) ftrks4->SetState(kButtonDown);
581      if ( cvar->bw ){
582        bwc1->SetState(kButtonDown);
583      } else {
584        bwc0->SetState(kButtonDown);
585      };
586      if ( cvar->PALETTE) fchkpalette->SetState(kButtonDown); else fchkpalette->SetState(kButtonUp);
587      if ( cvar->VINFOS ) fchknames->SetState(kButtonDown); else fchknames->SetState(kButtonUp);
588      if ( cvar->INFOS ) fchkinfo->SetState(kButtonDown); else fchkinfo->SetState(kButtonUp);
589      if ( cvar->CALO ) fchkcalo->SetState(kButtonDown); else fchkcalo->SetState(kButtonUp);
590      if ( cvar->CALOT ) fchkcalost->SetState(kButtonDown); else fchkcalost->SetState(kButtonUp);
591      if ( cvar->ND ) fchknd->SetState(kButtonDown); else fchknd->SetState(kButtonUp);
592      if ( cvar->S4 ) fchks4->SetState(kButtonDown); else fchks4->SetState(kButtonUp);
593      if ( cvar->TRK ) fchktrk->SetState(kButtonDown); else fchktrk->SetState(kButtonUp);
594      if ( cvar->AC ) fchkac->SetState(kButtonDown); else fchkac->SetState(kButtonUp);
595      if ( cvar->TOF ) fchktof->SetState(kButtonDown); else fchktof->SetState(kButtonUp);
596    };
597    
598  void PAMevcontrol::SetFilter() {  void PAMevcontrol::SetFilter() {
599      TGTextEntry *entry = (TGTextEntry*)gTQSender;      TGTextEntry *entry = (TGTextEntry*)gTQSender;
600      TString text = entry->GetText();      TString text = entry->GetText();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23