Commit in slic on MAIN | |||
include/LcioHitsCollectionBuilder.hh | +2 | -2 | 1.10 -> 1.11 |
src/LcioHitsCollectionBuilder.cc | +16 | -9 | 1.28 -> 1.29 |
+18 | -11 |
fix compilation problem from LCDD class rename (reported by Sho)
diff -u -r1.10 -r1.11 --- LcioHitsCollectionBuilder.hh 9 Jul 2013 18:47:14 -0000 1.10 +++ LcioHitsCollectionBuilder.hh 6 Sep 2013 22:07:47 -0000 1.11 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/include/LcioHitsCollectionBuilder.hh,v 1.10 2013/07/09 18:47:14 jeremy Exp $
+// $Header: /cvs/lcd/slic/include/LcioHitsCollectionBuilder.hh,v 1.11 2013/09/06 22:07:47 jeremy Exp $
#ifndef SLIC_LCIOHITSCOLLECTIONBUILDER_HH #define SLIC_LCIOHITSCOLLECTIONBUILDER_HH
@@ -67,7 +67,7 @@
IMPL::LCCollectionVec* createCalorimeterCollectionVec(G4VHitsCollection* g4HC); // save cal hits
- void saveHits(G4CalorimeterHitsCollection* calHits, IMPL::LCCollectionVec* lcioColl);
+ void saveHits(CalorimeterHitsCollection* calHits, IMPL::LCCollectionVec* lcioColl);
// save trk hits void saveHits(G4TrackerHitsCollection* trkHits, IMPL::LCCollectionVec* lcioColl);
diff -u -r1.28 -r1.29 --- LcioHitsCollectionBuilder.cc 9 Jul 2013 18:47:14 -0000 1.28 +++ LcioHitsCollectionBuilder.cc 6 Sep 2013 22:07:47 -0000 1.29 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/slic/src/LcioHitsCollectionBuilder.cc,v 1.28 2013/07/09 18:47:14 jeremy Exp $
+// $Header: /cvs/lcd/slic/src/LcioHitsCollectionBuilder.cc,v 1.29 2013/09/06 22:07:47 jeremy Exp $
// SLIC #include "LcioHitsCollectionBuilder.hh"
@@ -17,6 +17,8 @@
#include "IMPL/LCFlagImpl.h" #include "IMPL/MCParticleImpl.h"
+#include <iostream> +
using IMPL::SimCalorimeterHitImpl; using IMPL::SimTrackerHitImpl; using IMPL::MCParticleImpl;
@@ -25,6 +27,7 @@
using IMPL::LCCollectionVec; using EVENT::LCIO;
+// FIXME: Is this dummy declaration still needed?
namespace CLHEP { } using namespace CLHEP;
@@ -51,6 +54,7 @@
// create the hit collections void LcioHitsCollectionBuilder::createHitCollections() {
+
// fetch HCIDs std::vector<int> hcids = HitsCollectionUtil::getHCIDs();
@@ -66,16 +70,17 @@
LCCollectionVec* collVec = 0; for (std::vector<int>::const_iterator iter = hcids.begin(); iter != hcids.end(); iter++) {
+
hcid = *iter; #ifdef SLIC_LOG
- log().debug(" Creating hits collections for HCID: " + StringUtil::toString( hcid ) );
+ //log().debug("Creating hits collections for HCID: " + StringUtil::toString( hcid ) );
+ log() << LOG::debug << LOG::head << "Creating hits collections for HCID - " << StringUtil::toString(hcid) << LOG::done;
#endif // retrieve Sensitive Detector ptr
- SensitiveDetector *SD = - static_cast<SensitiveDetector*>(G4SDManager::GetSDMpointer()->FindSensitiveDetector( - HCtbl->GetSDname(hcid)));
+ SensitiveDetector *SD = static_cast<SensitiveDetector*> + (G4SDManager::GetSDMpointer()->FindSensitiveDetector(HCtbl->GetSDname(hcid)));
// get hits collection for (int i = 0; i < SD->getNumberOfHitsCollections(); i++) {
@@ -103,7 +108,7 @@
// Check for existing collection. if (containsCollection(m_currentLCEvent, HC->GetName())) { #ifdef SLIC_LOG
- log().debug("Adding hits to existing collection " + HC->GetName() + ".");
+ log().debug("Adding hits to existing collection: " + HC->GetName());
#endif // Update existing collection. // TODO: Check for matching id scheme and flags!
@@ -114,7 +119,7 @@
// No collection found. else { #ifdef SLIC_LOG
- log().debug("Creating new hit collection collection " + HC->GetName() + ".");
+ log().debug("Creating new hit collection: " + HC->GetName());
#endif // Add new collection vector to LCEvent. m_currentLCEvent->addCollection(collVec, HC->GetName());
@@ -127,7 +132,9 @@
} } }
+ //std::cout << std::endl;
}
+
} // create the CollectionVec (decides which overloaded subfunction to call)
@@ -173,7 +180,7 @@
LCCollectionVec* collVec = new LCCollectionVec(LCIO::SIMCALORIMETERHIT); // cast to G4 cal HC
- G4CalorimeterHitsCollection* calHits = dynamic_cast<G4CalorimeterHitsCollection*>(g4HC);
+ CalorimeterHitsCollection* calHits = dynamic_cast<CalorimeterHitsCollection*>(g4HC);
// call overloaded save function for cal hits saveHits(calHits, collVec);
@@ -211,7 +218,7 @@
} // save cal hits
-void LcioHitsCollectionBuilder::saveHits(G4CalorimeterHitsCollection* calHits,
+void LcioHitsCollectionBuilder::saveHits(CalorimeterHitsCollection* calHits,
IMPL::LCCollectionVec* lcioColl) { size_t s = calHits->GetSize(); for (size_t i = 0; i < s; i++) {
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