From baded786159bc1009874dfa542570bf0655f4503 Mon Sep 17 00:00:00 2001 From: Florian Uhlig <f.uhlig@gsi.de> Date: Tue, 17 Jan 2023 15:13:15 +0100 Subject: [PATCH] Use fSensorMap when forwarding data to plugin The map directly connects the detecor id with the corresponding sensor. This allows to get rid of a loop over all sensors to find the correct one. --- mvd/CbmMvdDigitizer.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mvd/CbmMvdDigitizer.cxx b/mvd/CbmMvdDigitizer.cxx index e7c748bca5..1891f6cf37 100644 --- a/mvd/CbmMvdDigitizer.cxx +++ b/mvd/CbmMvdDigitizer.cxx @@ -154,13 +154,19 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/) LOG(debug) << fName << ": Send Input"; // Get the sensor array from the Detector +/* TObjArray* sensorArray=fDetector->GetSensorArray(); CbmMvdSensor* sensor=0; Int_t nSensors= sensorArray->GetEntriesFast(); +*/ Int_t nTargetPlugin=DetectPlugin(100); for (Int_t i=0; i< nPoints; i++) { //loop over all points + point=(CbmMvdPoint*) fInputPoints->At(i); + fDetector->SendInputToSensorPlugin(point->GetDetectorID(), nTargetPlugin, static_cast<TObject*>(point)); + +/* for (Int_t k=0; k< nSensors; k++) { //lool over all sensors point=(CbmMvdPoint*) fInputPoints->At(i); sensor=(CbmMvdSensor*) sensorArray->At(k); @@ -169,6 +175,7 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/) break; } } +*/ } -- GitLab