Print

Print


Commit in projects/slic/branches/v00-00-01_SLIC-218-dev on MAIN
include/EventSource.hh+1-12891 -> 2892
       /EventSourceManager.hh+13-72891 -> 2892
       /EventSourceWithInputFile.hh+1-12891 -> 2892
       /GPSEventSource.hh+1-12891 -> 2892
       /GeneratorMessenger.hh+1-12891 -> 2892
       /LcioEventSource.hh+1-12891 -> 2892
       /LcioManager.hh+1-282891 -> 2892
       /LcioMessenger.hh+1-12891 -> 2892
       /ParticleGunEventSource.hh+1-12891 -> 2892
       /StdHepEventSource.hh+1-12891 -> 2892
scratch/LcioEventSource.cc+1-12891 -> 2892
       /LcioEventSource.hh+1-12891 -> 2892
src/EventAction.cc+3-32891 -> 2892
   /EventSourceManager.cc+6-22891 -> 2892
   /GPSEventSource.cc+1-12891 -> 2892
   /GeneratorMessenger.cc+5-42891 -> 2892
   /LcioEventSource.cc+3-22891 -> 2892
   /LcioManager.cc+5-212891 -> 2892
   /LcioMessenger.cc+7-72891 -> 2892
   /ParticleGunEventSource.cc+1-12891 -> 2892
   /StdHepEventSource.cc+3-22891 -> 2892
+58-88
21 modified files
rename of some functions and G4 macro commands

projects/slic/branches/v00-00-01_SLIC-218-dev/include
EventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -45,7 +45,7 @@
     /**
      * Dump information about the current event.
      */
-    virtual void dumpCurrentEvent() = 0;
+    virtual void printCurrentEvent() = 0;
 
     /**
      * Reset the event source.

projects/slic/branches/v00-00-01_SLIC-218-dev/include
EventSourceManager.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSourceManager.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSourceManager.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -281,14 +281,18 @@
         m_zSmearingParam = zSmear;
         G4cout << "Set m_zSmearingParam = " << m_zSmearingParam << G4endl;}
 
-        /**
-         * Get the Z smearing parameter.
-         * @return The Z smearing parameter.
-         */
-        G4double getZSmearing() {
-            return m_zSmearingParam;
-        }
+    /**
+     * Get the Z smearing parameter.
+     * @return The Z smearing parameter.
+     */
+    G4double getZSmearing() {
+        return m_zSmearingParam;
+    }
 
+    void enablePrintEvent(G4bool enablePrintEvent) {
+        _enablePrintEvent = enablePrintEvent;
+    }
+
     public:
 
         virtual void generateNextEvent(G4Event* evt);
@@ -333,6 +337,8 @@
 
         // Parameter which will be used to smear vertex Z position.
         G4double m_zSmearingParam;
+
+        G4bool _enablePrintEvent;
 };
 }
 

projects/slic/branches/v00-00-01_SLIC-218-dev/include
EventSourceWithInputFile.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSourceWithInputFile.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/EventSourceWithInputFile.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -95,7 +95,7 @@
     /**
      * Dump the current event to std::cout.
      */
-    virtual void dumpCurrentEvent() = 0;
+    virtual void printCurrentEvent() = 0;
 
 protected:
 

projects/slic/branches/v00-00-01_SLIC-218-dev/include
GPSEventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/GPSEventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/GPSEventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -40,7 +40,7 @@
     /**
      * Dump the current event to std::cout.
      */
-    void dumpCurrentEvent();
+    void printCurrentEvent();
 
     /**
      * Get the Geant4 general particle source class.

projects/slic/branches/v00-00-01_SLIC-218-dev/include
GeneratorMessenger.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/GeneratorMessenger.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/GeneratorMessenger.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -56,7 +56,7 @@
     G4UIcommand* m_resetCmd;
     G4UIcmdWithAnInteger* m_skipEventsCmd;
     G4UIcommand* m_filenameCmd;
-    G4UIcommand* m_dumpCurrentEventCmd;
+    G4UIcommand* m_enablePrintEventCmd;
     G4UIcommand* m_printNumEventsGeneratedCmd;
     G4UIcmdWithADoubleAndUnit* m_setLorentzTransformationAngleCmd;
     G4UIcmdWithADouble* m_setZSmearingParameterCmd;

projects/slic/branches/v00-00-01_SLIC-218-dev/include
LcioEventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioEventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioEventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -39,7 +39,7 @@
 	// read the next event
 	void readNextEvent();
 
-	void dumpCurrentEvent();
+	void printCurrentEvent();
 
 	void generate(G4Event* anEvent);
 

projects/slic/branches/v00-00-01_SLIC-218-dev/include
LcioManager.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioManager.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioManager.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -95,18 +95,6 @@
     void setAutonameFields(const std::vector<std::string>& fields);
 
     /**
-     * Get the output path for the LCIO files.
-     * @return The output path for the LCIO files.
-     */
-    const std::string& getPath() const;
-
-    /**
-     * Get the output file name.
-     * @return The output file path.
-     */
-    const std::string& getFilename() const;
-
-    /**
      * Get the path plus the filename and optionally include the extension.
      * @param[in] withExtension Whether or not to include the file extension.
      * @return The full output file path.
@@ -152,11 +140,6 @@
     IMPL::LCEventImpl* createLCEvent();
 
     /**
-     * Create the final output particle collction.
-     */
-    void createFinalMcpCollection();
-
-    /**
      * Add a collection to the LCEvent.
      * @param[in] lcsevent The LCEvent.
      * @param[in] collection The collection.
@@ -171,11 +154,6 @@
     void addCollection(EVENT::LCCollection* collection, const std::string& name);
 
     /**
-     * Add the initial particle collection.
-     */
-    void addInitialMCParticleCollection();
-
-    /**
      * End of event hook to write out an LCIO file.
      * @param[in] The physics event.
      */
@@ -232,7 +210,7 @@
      * Get the LcioHitsCollectionBuilder for creating output hit collections.
      * @return The LcioHitsCollectionBuilder.
      */
-    inline LcioHitsCollectionBuilder* getHCBuilder() {
+    inline LcioHitsCollectionBuilder* getHitsCollectionBuilder() {
         return m_HCBuilder;
     }
 
@@ -300,11 +278,6 @@
      */
     void addActiveSubdetectors();
 
-    /**
-     * Reset the instance variables of this class.
-     */
-    void reset();
-
 private:
 
     // writer

projects/slic/branches/v00-00-01_SLIC-218-dev/include
LcioMessenger.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioMessenger.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/LcioMessenger.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -62,7 +62,7 @@
 	G4UIcommand* m_mcpFilenameCmd;
 	G4UIcmdWithAnInteger* m_setRunNumberCmd;
 	G4UIcommand* m_autonameCmd;
-	G4UIcmdWithABool* m_dumpEventCmd;
+	G4UIcmdWithABool* m_printEventCmd;
 };
 }
 

projects/slic/branches/v00-00-01_SLIC-218-dev/include
ParticleGunEventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/ParticleGunEventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/ParticleGunEventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -40,7 +40,7 @@
     /**
      * Dump information on the current event to the log.
      */
-    void dumpCurrentEvent();
+    void printCurrentEvent();
 
     /**
      * Get the associated G4ParticleGun.

projects/slic/branches/v00-00-01_SLIC-218-dev/include
StdHepEventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/include/StdHepEventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/include/StdHepEventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -49,7 +49,7 @@
     /**
      * Print out the current event.
      */
-    void dumpCurrentEvent();
+    void printCurrentEvent();
 
     /**
      * Begin of run action.

projects/slic/branches/v00-00-01_SLIC-218-dev/scratch
LcioEventSource.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/scratch/LcioEventSource.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/scratch/LcioEventSource.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -49,7 +49,7 @@
 	}
 }
 
-void LcioEventSource::dumpCurrentEvent() {
+void LcioEventSource::printCurrentEvent() {
 	log() << LOG::debug << "LcioEventSource - Initial MCParticle Collection" << LOG::done;
 
 	LcioMcpManager::instance()->printMcpCollection("initial");

projects/slic/branches/v00-00-01_SLIC-218-dev/scratch
LcioEventSource.hh 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/scratch/LcioEventSource.hh	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/scratch/LcioEventSource.hh	2014-01-17 00:54:24 UTC (rev 2892)
@@ -56,7 +56,7 @@
     /**
      * Dump the current event.
      */
-    void dumpCurrentEvent();
+    void printCurrentEvent();
 
     /**
      * Generate a Geant4 event.

projects/slic/branches/v00-00-01_SLIC-218-dev/src
EventAction.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/EventAction.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/EventAction.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -42,11 +42,11 @@
 	    /* Save track information to MCParticle collection in LCIO output event. */
 	    TrackManager::instance()->saveTrackSummaries(anEvent, LcioManager::instance()->getCurrentLCEvent());
 
+        /* End of event processing for the current event generator. */
+        EventSourceManager::instance()->endEvent(anEvent);
+
 		/* Execute LcioManager's end of event action. */
 		LcioManager::instance()->endEvent(anEvent);
-
-	    /* Begin of event processing for the current event generator. */
-	    EventSourceManager::instance()->endEvent(anEvent);
 	}
 
 	/* Stop the event timer. */

projects/slic/branches/v00-00-01_SLIC-218-dev/src
EventSourceManager.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/EventSourceManager.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/EventSourceManager.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -27,7 +27,7 @@
 EventSourceManager::EventSourceManager() :
 		Module("EventSourceManager"), m_currentEventSource(0), m_filename(""), m_fileIsSet(false),
 		m_newFilename(false), m_ngen(0), m_nskip(0), m_newSource(true), m_sourceType(eUnknown),
-		m_lorentzTransformationAngle(0.), m_zSmearingParam(0.) {
+		m_lorentzTransformationAngle(0.), m_zSmearingParam(0.), _enablePrintEvent(false) {
 
 	// messenger with generator command macro bindings
 	m_messenger = new GeneratorMessenger();
@@ -139,7 +139,7 @@
 }
 
 void EventSourceManager::dumpCurrentEvent() {
-	m_currentEventSource->dumpCurrentEvent();
+	m_currentEventSource->printCurrentEvent();
 }
 
 void EventSourceManager::printNumEventsGenerated() {
@@ -243,6 +243,10 @@
 
 void EventSourceManager::endEvent(const G4Event* anEvent) {
 	m_currentEventSource->endEvent(anEvent);
+
+	if (_enablePrintEvent) {
+	    m_currentEventSource->printCurrentEvent();
+	}
 }
 
 void EventSourceManager::beginRun(const G4Run* aRun) {

projects/slic/branches/v00-00-01_SLIC-218-dev/src
GPSEventSource.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/GPSEventSource.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/GPSEventSource.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -35,7 +35,7 @@
 }
 
 /** This is mostly wrong until after the first event generation. */
-void GPSEventSource::dumpCurrentEvent() {
+void GPSEventSource::printCurrentEvent() {
 	log() << LOG::okay << "Dumping GPS Event info..." << LOG::done;
 
 	G4ParticleDefinition* pdef = m_generator->GetParticleDefinition();

projects/slic/branches/v00-00-01_SLIC-218-dev/src
GeneratorMessenger.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/GeneratorMessenger.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/GeneratorMessenger.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -58,8 +58,9 @@
 		mgr->setFilename(s);
 	}
 	// dumpCurrentEvent
-	else if (cmd == m_dumpCurrentEventCmd) {
-		mgr->dumpCurrentEvent();
+	else if (cmd == m_enablePrintEventCmd) {
+	    G4bool enablePrintEvent = StringUtil::toBool(s);
+		mgr->enablePrintEvent(true);
 	}
 	// printNumEventsGenerated
 	else if (cmd == m_printNumEventsGeneratedCmd) {
@@ -124,8 +125,8 @@
 	m_filenameCmd->SetParameter(p);
 
 	// dumpCurrentEvent
-	m_dumpCurrentEventCmd = new G4UIcommand("/generator/dumpEvent", this);
-	m_dumpCurrentEventCmd->SetGuidance("Dump information about the current generator event.");
+	m_enablePrintEventCmd = new G4UIcommand("/generator/printEvent", this);
+	m_enablePrintEventCmd->SetGuidance("Dump information about the current generator event.");
 
 	// printNumEventsGenerated
 	m_printNumEventsGeneratedCmd = new G4UIcommand("/generator/printNumEventsGenerated", this);

projects/slic/branches/v00-00-01_SLIC-218-dev/src
LcioEventSource.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioEventSource.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioEventSource.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -38,8 +38,9 @@
     }
 }
 
-void LcioEventSource::dumpCurrentEvent() {
-    UTIL::LCTOOLS::printMCParticles(MCParticleManager::instance()->getMCParticleCollection());
+void LcioEventSource::printCurrentEvent() {
+    if (MCParticleManager::instance()->getMCParticleCollection() != NULL)
+        UTIL::LCTOOLS::printMCParticles(MCParticleManager::instance()->getMCParticleCollection());
 }
 
 void LcioEventSource::generate(G4Event* anEvent) {

projects/slic/branches/v00-00-01_SLIC-218-dev/src
LcioManager.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioManager.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioManager.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -50,7 +50,7 @@
 
 namespace slic {
 
-string LcioManager::m_defaultFileName = "outfile";
+string LcioManager::m_defaultFileName = "slicEvents";
 
 LcioManager::LcioManager() :
 		Module("LcioManager"), m_writer(0), m_runHdr(0), m_fileExistsAction(LcioManager::eFail),
@@ -72,12 +72,12 @@
 }
 
 LcioManager::~LcioManager() {
-	deleteWriter();
 
+    deleteWriter();
+
 	if (m_messenger != 0) {
 		delete m_messenger;
 	}
-
 }
 
 void LcioManager::openLcioFile() {
@@ -320,18 +320,8 @@
 	}
 }
 
-const string& LcioManager::getPath() const {
-	return m_path;
-}
-
-const string& LcioManager::getFilename() const {
-	return m_filename;
-}
-
 LCEventImpl* LcioManager::createLCEvent(const G4Event* anEvent) {
 
-    //std::cout << "creating LCEvent" << std::endl;
-
 	/* Create the LCEvent and set basic parameters. */
 	LCEventImpl* lcevt = new LCEventImpl();
 	lcevt->setEventNumber(anEvent->GetEventID());
@@ -386,7 +376,8 @@
     m_writer->flush();
 
     // delete event's transient objects, including current LCEvent
-    reset();
+    delete m_currentLCEvent;
+    m_currentLCEvent = 0;
 }
 
 void LcioManager::setEventTimeStamp() {
@@ -397,13 +388,6 @@
 	m_HCBuilder->createHitCollectionsFromEvent(G4EventManager::GetEventManager()->GetNonconstCurrentEvent(), m_currentLCEvent);
 }
 
-void LcioManager::reset() {
-    //std::cout << "deleting LCEvent..." << std::endl;
-	// delete transient event container
-	delete m_currentLCEvent;
-	m_currentLCEvent = 0;
-}
-
 void LcioManager::addCollection(EVENT::LCEvent* event, EVENT::LCCollection* collection,
 		const std::string& collectionName) {
 	event->addCollection(collection, collectionName);

projects/slic/branches/v00-00-01_SLIC-218-dev/src
LcioMessenger.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioMessenger.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/LcioMessenger.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -60,8 +60,8 @@
 		m_mgr->setAutonameFields(fields);
 	}
 	/* dump event */
-	else if (cmd == m_dumpEventCmd) {
-		m_mgr->enableDumpEvent(m_dumpEventCmd->GetNewBoolValue(newVals.c_str()));
+	else if (cmd == m_printEventCmd) {
+		m_mgr->enableDumpEvent(m_printEventCmd->GetNewBoolValue(newVals.c_str()));
 	}
 	// flags
 	else if (cmd == m_setLongFlagCmd || cmd == m_setPDGFlagCmd) {
@@ -74,7 +74,7 @@
 			flag_set = StringUtil::toBool(s);
 		}
 
-		LcioHitsCollectionBuilder* hcb = m_mgr->getHCBuilder();
+		LcioHitsCollectionBuilder* hcb = m_mgr->getHitsCollectionBuilder();
 
 		if (hcb) {
 
@@ -152,9 +152,9 @@
 	m_autonameCmd->SetParameter(p);
 
 	/* dumping of event data */
-	m_dumpEventCmd = new G4UIcmdWithABool("/lcio/dumpEvent", this);
-	m_dumpEventCmd->SetGuidance("Dump information about collections in the event");
-	m_dumpEventCmd->SetParameterName("enable", true);
-	m_dumpEventCmd->SetDefaultValue(true);
+	m_printEventCmd = new G4UIcmdWithABool("/lcio/printEvent", this);
+	m_printEventCmd->SetGuidance("Dump information about collections in the event");
+	m_printEventCmd->SetParameterName("enable", true);
+	m_printEventCmd->SetDefaultValue(true);
 }
 }

projects/slic/branches/v00-00-01_SLIC-218-dev/src
ParticleGunEventSource.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/ParticleGunEventSource.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/ParticleGunEventSource.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -19,7 +19,7 @@
 	m_generator->GeneratePrimaryVertex(evt);
 }
 
-void ParticleGunEventSource::dumpCurrentEvent() {
+void ParticleGunEventSource::printCurrentEvent() {
 	log() << LOG::okay << "Dumping ParticleGun Event info..." << LOG::done;
 
 	G4ParticleDefinition* pdef = m_generator->GetParticleDefinition();

projects/slic/branches/v00-00-01_SLIC-218-dev/src
StdHepEventSource.cc 2891 -> 2892
--- projects/slic/branches/v00-00-01_SLIC-218-dev/src/StdHepEventSource.cc	2014-01-16 23:43:10 UTC (rev 2891)
+++ projects/slic/branches/v00-00-01_SLIC-218-dev/src/StdHepEventSource.cc	2014-01-17 00:54:24 UTC (rev 2892)
@@ -44,8 +44,9 @@
 	}
 }
 
-void StdHepEventSource::dumpCurrentEvent() {
-    UTIL::LCTOOLS::printMCParticles(MCParticleManager::instance()->getMCParticleCollection());
+void StdHepEventSource::printCurrentEvent() {
+    if (MCParticleManager::instance()->getMCParticleCollection() != NULL)
+        UTIL::LCTOOLS::printMCParticles(MCParticleManager::instance()->getMCParticleCollection());
 }
 
 void StdHepEventSource::beginRun(const G4Run* aRun) {
SVNspam 0.1


Use REPLY-ALL to reply to list

To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1