#include <Reve/DisplayGeom/src/DisplayGeom.cc>
Public Member Functions | |
DisplayGeom (const edm::ParameterSet &) | |
~DisplayGeom () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
TApplication * | app_ |
int | level_ |
DisplayPlugin * | plugin_ |
bool | verbose_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 43 of file DisplayGeom.cc.
DisplayGeom::DisplayGeom | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 72 of file DisplayGeom.cc.
References app_, gather_cfg::cout, tests::test_Package01::factory, reco::get(), and plugin_.
: level_(iConfig.getUntrackedParameter<int>("level",4)), verbose_(iConfig.getUntrackedParameter<bool>("verbose",false)), app_(0), plugin_(0) { //now do what ever initialization is needed std::cout <<" is batch "<<gROOT->IsBatch()<<std::endl; std::cout <<" display "<<gSystem->Getenv("DISPLAY")<<std::endl; const char* dummyArgvArray[] = {"cmsRun"}; char** dummyArgv = const_cast<char**>(dummyArgvArray); int dummyArgc = 1; app_ = new TApplication("App", &dummyArgc, dummyArgv); assert(TApplication::GetApplications()->GetSize()); gROOT->SetBatch(kFALSE); //TApplication* app = dynamic_cast<TApplication*>(TApplication::GetApplications()->First()); //assert(app!=0); std::cout<<"calling NeedGraphicsLibs()"<<std::endl; TApplication::NeedGraphicsLibs(); DisplayPluginFactory* factory = DisplayPluginFactory::get(); plugin_ = factory->create("EveDisplayPlugin"); }
DisplayGeom::~DisplayGeom | ( | ) |
Definition at line 100 of file DisplayGeom.cc.
References plugin_.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete plugin_; }
void DisplayGeom::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 116 of file DisplayGeom.cc.
References app_, gather_cfg::cout, plugin_, and fireworks::geometry::DisplayPlugin::run().
{ std::cout << "In the DisplayGeom::analyze method..." << std::endl; using namespace edm; //need to reset the Error handler to avoid error messages becoming exceptions ErrorHandlerFunc_t old = SetErrorHandler(DefaultErrorHandler); plugin_->run(iSetup); app_->Run(kTRUE); SetErrorHandler(old); // Exit from fireworks // gApplication //app->Terminate(0); }
void DisplayGeom::beginJob | ( | void | ) | [private, virtual] |
void DisplayGeom::endJob | ( | void | ) | [private, virtual] |
TApplication* DisplayGeom::app_ [private] |
Definition at line 57 of file DisplayGeom.cc.
Referenced by analyze(), and DisplayGeom().
int DisplayGeom::level_ [private] |
Definition at line 55 of file DisplayGeom.cc.
DisplayPlugin* DisplayGeom::plugin_ [private] |
Definition at line 58 of file DisplayGeom.cc.
Referenced by analyze(), DisplayGeom(), and ~DisplayGeom().
bool DisplayGeom::verbose_ [private] |
Definition at line 56 of file DisplayGeom.cc.