--- eventviewer/flight/src/FEVpamevcontrol.cpp 2007/03/30 11:16:43 1.4 +++ eventviewer/flight/src/FEVpamevcontrol.cpp 2007/11/08 11:05:35 1.5 @@ -267,14 +267,14 @@ // Software infos // fshowsi = new TGTextButton(hframedec[9], "Show Data"); - fshowsi->Connect("Clicked()","PAMevcontrol", this,"showorbdata()"); + fshowsi->Connect("Clicked()","PAMevcontrol", this,"showsidata()"); if ( !cvar->RUN ) fshoworb->SetState(kButtonDisabled); hframedec[9]->AddFrame(fshoworb, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,2,5,5)); // // All data // fshowall = new TGTextButton(hframedec[10], "Show Data"); - fshowall->Connect("Clicked()","PAMevcontrol", this,"showorbdata()"); + fshowall->Connect("Clicked()","PAMevcontrol", this,"showalldata()"); hframedec[10]->AddFrame(fshowall, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,5,5,5,5)); // // for (Int_t fr=0; fr<11; fr++) gf->AddFrame(hframedec[fr], new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsCenterY|kLHintsExpandX,1,1,1,1)); @@ -476,19 +476,31 @@ void PAMevcontrol::showorbdata(){ - printf("orb \n"); + cvar->showorb = !cvar->showorb; + if ( !cvar->showorb ) fshoworb->SetText("Show Data"); + if ( cvar->showorb ) fshoworb->SetText("Hide Data"); + // printf("orb \n"); }; void PAMevcontrol::showtrgdata(){ - printf("trg \n"); + cvar->showtrg = !cvar->showtrg; + if ( !cvar->showtrg ) fshowtrg->SetText("Show Data"); + if ( cvar->showtrg ) fshowtrg->SetText("Hide Data"); + // printf("trg \n"); }; void PAMevcontrol::showrundata(){ - printf("run \n"); + cvar->showrun = !cvar->showrun; + if ( !cvar->showrun ) fshowrun->SetText("Show Data"); + if ( cvar->showrun ) fshowrun->SetText("Hide Data"); + // printf("run \n"); }; void PAMevcontrol::showcaldata(){ - printf("cal \n"); + cvar->showcal = !cvar->showcal; + if ( !cvar->showcal ) fshowcal->SetText("Show Data"); + if ( cvar->showcal ) fshowcal->SetText("Hide Data"); + // printf("cal \n"); }; void PAMevcontrol::chkcalost(){ @@ -505,31 +517,52 @@ }; void PAMevcontrol::showtrkdata(){ - printf("trk \n"); + cvar->showtrk = !cvar->showtrk; + if ( !cvar->showtrk ) fshowtrk->SetText("Show Data"); + if ( cvar->showtrk ) fshowtrk->SetText("Hide Data"); + // printf("trk \n"); }; void PAMevcontrol::showtofdata(){ - printf("tof \n"); + cvar->showtof = !cvar->showtof; + if ( !cvar->showtof ) fshowtof->SetText("Show Data"); + if ( cvar->showtof ) fshowtof->SetText("Hide Data"); + // printf("tof \n"); }; void PAMevcontrol::showacdata(){ - printf("ac \n"); + cvar->showac = !cvar->showac; + if ( !cvar->showac ) fshowac->SetText("Show Data"); + if ( cvar->showac ) fshowac->SetText("Hide Data"); + // printf("ac \n"); }; void PAMevcontrol::shownddata(){ - printf("nd \n"); + cvar->shownd = !cvar->shownd; + if ( !cvar->shownd ) fshownd->SetText("Show Data"); + if ( cvar->shownd ) fshownd->SetText("Hide Data"); + // printf("nd \n"); }; void PAMevcontrol::shows4data(){ - printf("s4 \n"); + cvar->shows4 = !cvar->shows4; + if ( !cvar->shows4 ) fshows4->SetText("Show Data"); + if ( cvar->shows4 ) fshows4->SetText("Hide Data"); + // printf("s4 \n"); }; void PAMevcontrol::showsidata(){ - printf("si \n"); + cvar->showsi = !cvar->showsi; + if ( !cvar->showsi ) fshowsi->SetText("Show Data"); + if ( cvar->showsi ) fshowsi->SetText("Hide Data"); + // printf("si \n"); }; void PAMevcontrol::showalldata(){ - printf("all \n"); + cvar->showall = !cvar->showall; + if ( !cvar->showall ) fshowall->SetText("Show Data"); + if ( cvar->showall ) fshowall->SetText("Hide Data"); + // printf("all \n"); }; void PAMevcontrol::SetFilename() { @@ -636,6 +669,11 @@ ffl0->SetState(kButtonDown); }; }; + if ( clev->file == 2 ){ + fgetl0->SetText("Get L0 file"); + } else { + fgetl0->SetText("Get L2 file"); + }; } void PAMevcontrol::SetSearching() { @@ -901,17 +939,13 @@ } void PAMevcontrol::forcel0() { - if ( cvar->fl0 ) { - cvar->fl0 = false; - } else { - cvar->fl0 = true; - }; - cvar->alrforc = false; - cvar->i--; - cvar->nevents = 0; - cvar->firstevno = 0; - cvar->lastevno = 0; - cvar->refresh = true; + cvar->fl0 = !cvar->fl0; + cvar->alrforc = false; + cvar->i--; + cvar->nevents = 0; + cvar->firstevno = 0; + cvar->lastevno = 0; + cvar->refresh = true; } void PAMevcontrol::clearselfi(){