From af13d4050cfcb479d54bec93c27a74b68c3cfbc5 Mon Sep 17 00:00:00 2001
From: Michael Deveaux <deveaux@physik.uni-frankfurt.de>
Date: Tue, 17 Jan 2023 16:42:01 +0100
Subject: [PATCH] Comment out obsolete code in CbmMvdDetector and CbmMvdSensor

---
 mvd/CbmMvdDetector.cxx  | 12 ++++--------
 mvd/CbmMvdDetector.h    |  2 +-
 mvd/CbmMvdDigitizer.cxx | 37 -------------------------------------
 mvd/CbmMvdSensor.cxx    |  3 +++
 4 files changed, 8 insertions(+), 46 deletions(-)

diff --git a/mvd/CbmMvdDetector.cxx b/mvd/CbmMvdDetector.cxx
index a00cc45f98..21c151ed82 100644
--- a/mvd/CbmMvdDetector.cxx
+++ b/mvd/CbmMvdDetector.cxx
@@ -374,16 +374,11 @@ void CbmMvdDetector::SendInputToSensorPlugin(Int_t nSensor, Int_t nPlugin, TObje
 }
 */
 //-----------------------------------------------------------------------
+
+/*
 void CbmMvdDetector::SendInput(TClonesArray* input)
 {
-  /**
-   *
-   * Sending event to sensors,
-   * each sensor gets only his own points
-   *
-   *
-   *
-   * **/
+
 
   CbmMvdPoint* point;
   Int_t nEntries = input->GetEntriesFast();
@@ -404,6 +399,7 @@ void CbmMvdDetector::SendInput(TClonesArray* input)
     if (!send) LOG(warn) << "Point not send to any sensor: " << point->GetDetectorID();
   }
 }
+*/
 //-----------------------------------------------------------------------
 
 //-----------------------------------------------------------------------
diff --git a/mvd/CbmMvdDetector.h b/mvd/CbmMvdDetector.h
index 6ad02200d9..12d78061fd 100644
--- a/mvd/CbmMvdDetector.h
+++ b/mvd/CbmMvdDetector.h
@@ -57,7 +57,7 @@ public:
   virtual ~CbmMvdDetector();
 
   /** Data interface */
-  void SendInput(TClonesArray* input);
+  //void SendInput(TClonesArray* input);
   void SendInputNeutral(TClonesArray* input);
 //  void SendInputToSensorPlugin(Int_t nSensor, Int_t nPlugin, TObject* input);
   void SendInputToSensorPlugin(Int_t detectorid, Int_t nPlugin, TObject* input);
diff --git a/mvd/CbmMvdDigitizer.cxx b/mvd/CbmMvdDigitizer.cxx
index 1f7cd05373..cbb8e4668b 100644
--- a/mvd/CbmMvdDigitizer.cxx
+++ b/mvd/CbmMvdDigitizer.cxx
@@ -126,56 +126,19 @@ void CbmMvdDigitizer::Exec(Option_t* /*opt*/)
   Int_t nDigis  = 0;
   CbmMvdPoint* point=0;
 
-  /*
-
- CbmMvdPoint* point;
-  Int_t nEntries = input->GetEntriesFast();
-  Int_t nSensors = fSensorArray->GetEntriesFast();
-  CbmMvdSensor* sensor;
-  Bool_t send = kFALSE;
-  for (Int_t i = 0; i < nEntries; i++) {
-    point = (CbmMvdPoint*) input->At(i);
-    point->SetPointId(i);
-    for (Int_t k = 0; k < nSensors; k++) {
-      sensor = (CbmMvdSensor*) fSensorArray->At(k);
-
-      if (point->GetDetectorID() == sensor->GetDetectorID()) {
-        sensor->SendInputToPlugin(sensor->GetDigiPlugin(),(TObject*) point);
-        send = true;
-      }
-    }
-    if (!send) LOG(warn) << "Point not send to any sensor: " << point->GetDetectorID();
-  }
-}
 
- */
   if (fInputPoints->GetEntriesFast() > 0) {
     LOG(debug) << "//----------------------------------------//";
     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);
 
-        if (point->GetDetectorID() == sensor-> GetDetectorID()) {fDetector->SendInputToSensorPlugin(k, nTargetPlugin, (TObject*) point);
-                                                           break;
-        }
-      }
-*/
     }
 
 
diff --git a/mvd/CbmMvdSensor.cxx b/mvd/CbmMvdSensor.cxx
index 84f5bbcf90..894f703b22 100644
--- a/mvd/CbmMvdSensor.cxx
+++ b/mvd/CbmMvdSensor.cxx
@@ -300,6 +300,8 @@ void CbmMvdSensor::SetProduceNoise()
 // -------------------------------------------------------------------------
 
 // -------------------------------------------------------------------------
+
+/*
 void CbmMvdSensor::SendInput(CbmMvdPoint* point)
 {
 
@@ -326,6 +328,7 @@ void CbmMvdSensor::SendInput(CbmMvdPoint* point)
     cout << endl << "ERROR!! undefind plugin!" << endl;
   }
 }
+*/
 // -------------------------------------------------------------------------
 
 void CbmMvdSensor::SendInputToPlugin(Int_t nPlugin, TObject* input)
-- 
GitLab