Print

Print


Commit in lcdd on LCDD-102_BRANCH
include/lcdd/detectors/SensitiveDetectorFactory.hh+2-21.4.2.1 -> 1.4.2.2
src/lcdd/detectors/SensitiveDetectorFactory.cc+5-41.4.2.2 -> 1.4.2.3
+7-6
2 modified files
fix bug where default hit processor was not added; add hits collections to createTracker function arguments

lcdd/include/lcdd/detectors
SensitiveDetectorFactory.hh 1.4.2.1 -> 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- SensitiveDetectorFactory.hh	14 Aug 2013 00:23:22 -0000	1.4.2.1
+++ SensitiveDetectorFactory.hh	14 Aug 2013 02:34:40 -0000	1.4.2.2
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SensitiveDetectorFactory.hh,v 1.4.2.1 2013/08/14 00:23:22 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SensitiveDetectorFactory.hh,v 1.4.2.2 2013/08/14 02:34:40 jeremy Exp $
 
 #ifndef LCDD_DETECTORS_SENSITIVEDETECTORFACTORY_HH
 #define LCDD_DETECTORS_SENSITIVEDETECTORFACTORY_HH 1
@@ -68,7 +68,7 @@
      * Create a TrackerSD object.
      * @param[in] object The SAXObject of the detector.
      */
-    static TrackerSD* createTracker(const SAXObject* object);
+    static TrackerSD* createTracker(const SAXObject* object, const std::vector<G4String>& hitsCollections);
 
     /**
      * Compute the ecut for a detector.

lcdd/src/lcdd/detectors
SensitiveDetectorFactory.cc 1.4.2.2 -> 1.4.2.3
diff -u -r1.4.2.2 -r1.4.2.3
--- SensitiveDetectorFactory.cc	14 Aug 2013 02:19:45 -0000	1.4.2.2
+++ SensitiveDetectorFactory.cc	14 Aug 2013 02:34:40 -0000	1.4.2.3
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetectorFactory.cc,v 1.4.2.2 2013/08/14 02:19:45 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetectorFactory.cc,v 1.4.2.3 2013/08/14 02:34:40 jeremy Exp $
 
 // LCDD
 #include "lcdd/detectors/SensitiveDetectorFactory.hh"
@@ -121,16 +121,17 @@
             // Need to add default HitProcessors because none were specified.
             if (sensitiveDetectorTypeName == "tracker") {
                 // Default TrackerHitProcessor.
-                HitProcessorManager::instance()->getFactory("BasicTrackerHitProcessor")->createHitProcessor(sensitiveDetector);
+                sensitiveDetector->addHitProcessor(HitProcessorManager::instance()->getFactory("BasicTrackerHitProcessor")->createHitProcessor(sensitiveDetector));
             } else if (sensitiveDetectorTypeName == "calorimeter" ) {
                 // Default CalorimeterHitProcessor.
-                HitProcessorManager::instance()->getFactory("LegacyCalorimeterHitProcessor")->createHitProcessor(sensitiveDetector);
+                sensitiveDetector->addHitProcessor(HitProcessorManager::instance()->getFactory("LegacyCalorimeterHitProcessor")->createHitProcessor(sensitiveDetector));
             }
         }
 
         // Register the SensitiveDetector with the LCDDProcessor.
         std::string sensitiveDetectorName = sensitiveDetector->GetName();
-        //std::cout << "registering SD: " << sensitiveDetectorName << std::endl;
+        std::cout << "registering SD: " << sensitiveDetectorName << std::endl;
+        std::cout << "  # hit processors: " << sensitiveDetector->getHitProcessors().size() << std::endl;
         LCDDProcessor::instance()->addSensitiveDetector(sensitiveDetectorName, sensitiveDetector);
     } else {
         // This should never really happen.
CVSspam 0.2.12


Use REPLY-ALL to reply to list

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