Home | News | Documentation | Download

TEve Buttons not working for next events

Hello,

I’m developing an event display using TEve. I have things almost at a reasonable state. By which I mean, I have data being plotted on top of the detector geom (from a GDML).

I added two buttons TGButtons and linked then to two functions that should go back and forward between events. No compilation errors are thrown, I assumed that the functions were linked to the
correct functions:

// ... Create back button and connect to "PrevEvent" rcvr in visutils
		b = new TGPictureButton(navFrame, gClient->GetPicture(icondir + "GoBack.gif"));
		navFrame->AddFrame(b);
		b->Connect("Clicked()", "NAME::EvtDisplayUtils", visutil_, "PrevEvent()");

		// ... Create forward button and connect to "NextEvent" rcvr in visutils
		b = new TGPictureButton(navFrame, gClient->GetPicture(icondir + "GoForward.gif"));
		navFrame->AddFrame(b);
		b->Connect("Clicked()", "NAME::EvtDisplayUtils", visutil_, "NextEvent()");

It could be that those functions are not doing as I want…The issue is that when I run my code the buttons do not work i.e. go to Next or Prev event.

I can go between events only by double-clicking on a blank histogram which appears in another window.

This is an intentional choice as I didn’t know how else to ensure I could go between events.

This is the end of the per-event function:

geom->Draw("ogl");
gPad->WaitPrimitive();

I am now at a point where I need to fix this. Even if it were to double-click the TEveBrowser that would be better. Is that do-able?


Please read tips for efficient and successful posting and posting code

_ROOT Version:6.18
_Platform:SL7
_Compiler:gcc 8.2.0


May be @matevz has an idea about this.

Hi, sorry, I missed this.

Does other GUI work as expected? Maybe TPad::WaitPrimitive() blocks processing of GUI, I don’t know. Have you tried removing it?

Your Connect() statement looks good … assuming your code is in namespace NAME :slight_smile:

Cheers,
Matevz

Hi, sorry just seen this. I’ve not tried any other GUIs except obvious ones like TBrowser and standard ones. they are all fine. Removing waitPrimitive just means that the module processes all events at once, it does not pause and wait for a click (or really a button press).

Hmmh, this looks just wrong :slight_smile: You should only change event based on some user action.

Have you looked at, e.g., tutorials/eve/alice_vsd.C