#include #include "EventReader/JEventProcessor_EventReader.h" #include "DANA/DApplication.h" #include #include #include #include "ControlLoop.h" #include using namespace std; //typedef void SetTFilePtrAddress_t(TFile **); //TFile* tfilePtr = NULL; //string OUTPUT_FILENAME = "hd_root.root"; //string COMMAND_LINE_OUTPUT_FILENAME = ""; //bool filename_from_command_line = false; void ParseCommandLineArguments(int &narg, char *argv[]); void DecideOutputFilename(void); void Usage(void); DApplication *gDana; hdvis::ControlLoop gControlLoop; //----------- // main //----------- int main(int narg, char *argv[]) { // Parse the command line ParseCommandLineArguments(narg, argv); DApplication dana(narg, argv); gDana=&dana; // Instantiate our event processor auto myproc = new JEventProcessor_EventReader(gControlLoop.Context()); gControlLoop.RunRootAppMultithreaded(); // Run though all events, calling our event processor's methods dana.monitor_heartbeat = false; dana.Run(myproc); return dana.GetExitCode(); return 0; } //----------- // ParseCommandLineArguments //----------- void ParseCommandLineArguments(int &narg, char *argv[]) { if(narg==1)Usage(); for(int i=1;i=narg-1){ cerr<<"\"-o\" requires a filename!"<Usage(); /* cout<