// This is s simple example program that shows how to use a DTrackResolution // class to apply detector derived resolutions to charged tracks. // There are detailed comments that should step you through the program // with enough information to understand it and allow you to modify it to // your own needs. #include using namespace std; #include #include #include "DTrackingResolutionGEANT.h" #include "DEventProcessor_HDParSim.h" string OUTPUT_FILENAME = "hdparsim.root"; void Usage(DApplication &app); void ParseCommandLineArguments(int &narg, char *argv[], DApplication &app); //------------ // main //------------ int main(int narg, char *argv[]) { // Instantiate an event loop object DApplication app(narg, argv); ParseCommandLineArguments(narg, argv, app); if(narg<=1)Usage(app); // Run though all events, calling our event processor's methods app.Run(new DEventProcessor_HDParSim(OUTPUT_FILENAME.c_str()), 1); return 0; } //----------- // ParseCommandLineArguments //----------- void ParseCommandLineArguments(int &narg, char *argv[], DApplication &app) { for(int i=1;i=narg-1){ cerr<<"\"-o\" requires a filename!"<