#include using std::string; #include #include #include #include #include #include #ifdef STATIC #include "DEventSourceET/DEventSourceETGenerator.h" #include "DEventSourceET/DEventSourceETFactoryGenerator.h" #include "BCAL/DBCALFactoryGenerator.h" #include "TAGGER/DTAGGERFactoryGenerator.h" #include "TRIGGER/DTRIGGERFactoryGenerator.h" #endif #include "bcview.h" #include "bcv_mainframe.h" #include "MyProcessor.h" TCanvas *maincanvas=NULL; extern JApplication *japp; JEventLoop *eventloop =NULL; MyProcessor *myproc = NULL; bcv_mainframe *bcvmf=NULL; //------------------- // main //------------------- int main(int narg, char *argv[]) { // Instantiate a JApplication object this has to be done BEFORE // creating the TApplication object since that modifes the argument list. japp = new JApplication(narg, argv); #ifdef STATIC // Add in factory generators japp->AddEventSourceGenerator(new DEventSourceETGenerator()); japp->AddFactoryGenerator(new DEventSourceETFactoryGenerator()); japp->AddFactoryGenerator(new DBCALFactoryGenerator()); japp->AddFactoryGenerator(new DTAGGERFactoryGenerator()); japp->AddFactoryGenerator(new DTRIGGERFactoryGenerator()); #endif // Open Window TApplication app("BCAL_Module_Viewer", &narg, argv); bcvmf = new bcv_mainframe(gClient->GetRoot(), 1000, 600); // This is done AFTER creating the TApplication object so when the // init routine is called, the window will be mapped and it can // draw the detectors. myproc = new MyProcessor(); japp->AddProcessor(myproc); japp->Init(); eventloop = new JEventLoop(japp); japp->Init(); // Hand control to ROOT event loop app.Run(); // Clean-up the app (call erun and fini methods, delete sources) japp->Fini(); delete japp; return 0; }