TApplication and TEve in standalone application

What is the correct way to initialize a TEveManager in a standalone application?

Currently I am trying


#include <TApplication.h>
#include <TEveManager.h>

int main(int argc, char** argv) {
    TApplication app("App", &argc, argv);

    TEveManager::Create();

    app.Run();

    return 0;
}

But I get the following error:

terminate called after throwing an instance of 'TEveException'
  what():  TEveManager::Create ROOT is running in batch mode.

How can I run a TEve application in a standalone program?

Thanks!

@matevz can surely help.

This should really work, have you linked in the graphics libs, eg, stuff returned by root-config --evelibs?

Maybe calling app.InitializeGraphics() could help.

If all this doesn’t help, are you able to open other GUI / histograms from that session? Is it a remote one?

Cheers,
Matevz

Thanks, I am not sure what was happening but now it works. It was wierd because the graphics window from TGeoManager was working while this wasn’t. Probably some silly mistake on my part.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.