Print

Print


Commit in slicPandora/tests on MAIN
PandoraFrontend.cpp+13-31.4 -> 1.5
add option to skip events

slicPandora/tests
PandoraFrontend.cpp 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- PandoraFrontend.cpp	24 Sep 2010 07:22:50 -0000	1.4
+++ PandoraFrontend.cpp	26 Oct 2010 08:42:25 -0000	1.5
@@ -1,4 +1,4 @@
-//$Id: PandoraFrontend.cpp,v 1.4 2010/09/24 07:22:50 speckmay Exp $
+//$Id: PandoraFrontend.cpp,v 1.5 2010/10/26 08:42:25 speckmay Exp $
 
 /**
  * This is a simple frontend to run slicPandora.  It takes an ordered list of arguments.  (See usage method.)
@@ -16,15 +16,16 @@
 
 void printUsage()
 {
-    cout << "./bin/PandoraFrontend geometry.xml pandoraSettings.xml inputEvents.slcio reconOutput.slcio nevents" << endl << endl;
+    cout << "./bin/PandoraFrontend geometry.xml pandoraSettings.xml inputEvents.slcio reconOutput.slcio nevents skip" << endl << endl;
     cout << "The [nevents] argument is optional.  By default, PandoraFrontend will run over all of the input events." << std::endl;
+    cout << "The [skip] argument is optional.  By default, PandoraFrontend will start at the first event." << std::endl;
 }
 
 int main(int argc, char **argv)
 {
     int nargs = argc - 1;
 
-    if (nargs < 4 || nargs > 5)
+    if (nargs < 4 || nargs > 6)
     {
         printUsage();
         exit(1);
@@ -49,6 +50,13 @@
         nevents = atoi(argv[5]);
     }
 
+    // skip events (optional).
+    int skipEvents = -1;
+    if (nargs == 6)
+    {
+        skipEvents = atoi(argv[6]);
+    }
+
     // Print out arguments before starting job.
     cout << "PandoraFrontend got " << nargs << " arguments ..." << endl;
     cout << "    geometry: " << geometry << endl;
@@ -56,6 +64,7 @@
     cout << "    inputEvents: " << inputEvents << endl;
     cout << "    outputEvents: " << outputEvents << endl;
     cout << "    nevents: " << nevents << endl << endl;
+    cout << "    skip: " << skipEvents << endl << endl;
 
     // Create the job configuration from the command line arguments.
     JobConfig* config = new JobConfig();
@@ -65,6 +74,7 @@
     config->addInputFile(inputEvents);
     config->setOutputFile(outputEvents);
     config->setNumberOfEvents(nevents);
+    config->setSkipEvents(skipEvents);
 
     // Make a new job manager.
     JobManager* mgr = new JobManager();
CVSspam 0.2.8