2 added + 2 modified, total 4 files
slicPandora/include
diff -N DefaultProcessors.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ DefaultProcessors.h 11 Mar 2010 19:56:48 -0000 1.1
@@ -0,0 +1,12 @@
+#ifndef DEFAULTPROCESSORS_H
+#define DEFAULTPROCESSORS_H 1
+
+// slicPandora
+#include "EventMarkerProcessor.h"
+#include "SimCalorimeterHitProcessor.h"
+#include "CalorimeterHitProcessor.h"
+#include "PandoraProcessor.h"
+#include "PfoProcessor.h"
+#include "ResetPandoraProcessor.h"
+
+#endif
slicPandora/include
diff -u -r1.5 -r1.6
--- JobManager.h 9 Mar 2010 20:13:42 -0000 1.5
+++ JobManager.h 11 Mar 2010 19:56:48 -0000 1.6
@@ -1,4 +1,4 @@
-// $Id: JobManager.h,v 1.5 2010/03/09 20:13:42 jeremy Exp $
+// $Id: JobManager.h,v 1.6 2010/03/11 19:56:48 jeremy Exp $
#ifndef JobManager_h
#define JobManager_h 1
@@ -8,7 +8,9 @@
// pandora
#include "Api/PandoraApi.h"
-class JobConfig;
+// slicPandora
+#include "JobConfig.h"
+
class DetectorGeometry;
class EventProcessor;
slicPandora/tests
diff -N PandoraFrontend.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PandoraFrontend.cpp 11 Mar 2010 19:56:49 -0000 1.1
@@ -0,0 +1,95 @@
+//$Id: PandoraFrontend.cpp,v 1.1 2010/03/11 19:56:49 jeremy Exp $
+
+/**
+ * This is a simple frontend to run slicPandora. It takes an ordered list of arguments. (See usage method.)
+ */
+
+// stl
+#include <iostream>
+
+// slicPandora
+#include "JobManager.h"
+#include "DefaultProcessors.h"
+
+using std::cout;
+using std::endl;
+
+void printUsage()
+{
+ cout << "./bin/PandoraFrontend geometry.xml pandoraSettings.xml inputEvents.slcio reconOutput.slcio nevents" << endl << endl;
+ cout << "The nevents argument is optional. By default, PandoraFrontend will run over all of the input events." << std::endl;
+}
+
+int main(int argc, char **argv)
+{
+ int nargs = argc - 1;
+
+ if (nargs < 4 || nargs > 5)
+ {
+ printUsage();
+ exit(1);
+ }
+
+ // Geometry input file.
+ std::string geometry = argv[1];
+
+ // Pandora settings file.
+ std::string pandoraSettings = argv[2];
+
+ // Input events file in .slcio format.
+ std::string inputEvents = argv[3];
+
+ // Output events file.
+ std::string outputEvents = argv[4];
+
+ // Number of events (optional).
+ int nevents = -1;
+ if (nargs == 5)
+ {
+ nevents = atoi(argv[5]);
+ }
+
+ // Print out arguments before starting job.
+ cout << "PandoraFrontend got " << nargs << " arguments..." << endl;
+ cout << " geometry: " << geometry << endl;
+ cout << " pandoraSettings: " << pandoraSettings << endl;
+ cout << " inputEvents: " << inputEvents << endl;
+ cout << " outputEvents: " << outputEvents << endl;
+ cout << " nevents: " << nevents << endl;
+
+ // Create the job configuration from the command line arguments.
+ JobConfig* config = new JobConfig();
+ config->setPandoraSettingsXmlFile(pandoraSettings);
+ config->setGeometryFile(geometry);
+ config->useDefaultCalorimeterTypes();
+ config->addInputFile(inputEvents);
+ config->setOutputFile(outputEvents);
+ config->setNumberOfEvents(nevents);
+
+ // Make a new job manager.
+ JobManager* mgr = new JobManager();
+
+ // Set the JobManager's configuration.
+ mgr->setJobConfig(config);
+
+ // Add a processor to mark beginning of event processing.
+ mgr->addEventProcessor(new EventMarkerProcessor());
+
+ // Add a processor to convert LCIO SimCalorimeterHits to LCIO CalorimeterHits.
+ mgr->addEventProcessor(new SimCalorimeterHitProcessor());
+
+ // Add a processor to convert LCIO CalorimeterHits to Pandora CaloHit::Parameters.
+ mgr->addEventProcessor(new CalorimeterHitProcessor());
+
+ // Add a processor to automatically run the registered Pandora algorithms.
+ mgr->addEventProcessor(new PandoraProcessor());
+
+ // Add a processor to create LCIO PFO objects, including clusters and ReconParticles.
+ mgr->addEventProcessor(new PfoProcessor());
+
+ // Add a processor to reset Pandora after the event.
+ mgr->addEventProcessor(new ResetPandoraProcessor());
+
+ // Run the job.
+ mgr->run();
+}
slicPandora/tests
diff -u -r1.5 -r1.6
--- JobManagerTest.cpp 10 Mar 2010 20:16:14 -0000 1.5
+++ JobManagerTest.cpp 11 Mar 2010 19:56:49 -0000 1.6
@@ -1,4 +1,4 @@
-// $Id: JobManagerTest.cpp,v 1.5 2010/03/10 20:16:14 jeremy Exp $
+// $Id: JobManagerTest.cpp,v 1.6 2010/03/11 19:56:49 jeremy Exp $
// slicPandora
#include "JobConfig.h"
@@ -33,7 +33,7 @@
//config->addCalorimeterType("EM_BARREL"); // DEBUG: Just use EM_BARREL collection.
config->addInputFile("./input.slcio");
config->setOutputFile("pandoraRecon.slcio");
- config->setNumberOfEvents(1);
+ config->setNumberOfEvents(2);
config->setSkipEvents(0);
// Make a new job manager.
CVSspam 0.2.8