Skip to content
Snippets Groups Projects
Commit baded786 authored by Administrator's avatar Administrator Committed by Florian Uhlig
Browse files

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.
parent d83e98a0
No related branches found
No related tags found
1 merge request!1125Restructure MVD code
...@@ -154,13 +154,19 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/) ...@@ -154,13 +154,19 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/)
LOG(debug) << fName << ": Send Input"; LOG(debug) << fName << ": Send Input";
// Get the sensor array from the Detector // Get the sensor array from the Detector
/*
TObjArray* sensorArray=fDetector->GetSensorArray(); TObjArray* sensorArray=fDetector->GetSensorArray();
CbmMvdSensor* sensor=0; CbmMvdSensor* sensor=0;
Int_t nSensors= sensorArray->GetEntriesFast(); Int_t nSensors= sensorArray->GetEntriesFast();
*/
Int_t nTargetPlugin=DetectPlugin(100); Int_t nTargetPlugin=DetectPlugin(100);
for (Int_t i=0; i< nPoints; i++) { //loop over all points 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 for (Int_t k=0; k< nSensors; k++) { //lool over all sensors
point=(CbmMvdPoint*) fInputPoints->At(i); point=(CbmMvdPoint*) fInputPoints->At(i);
sensor=(CbmMvdSensor*) sensorArray->At(k); sensor=(CbmMvdSensor*) sensorArray->At(k);
...@@ -169,6 +175,7 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/) ...@@ -169,6 +175,7 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/)
break; break;
} }
} }
*/
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment