]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliReconstructor.cxx
Init the TList with refence objects when using the copy ctor, added protection agains...
[u/mrichter/AliRoot.git] / STEER / AliReconstructor.cxx
index 4fe63ea5a0b15597175323e51828c69ff5e50e1d..bf48eddc30b7eec74b7c764e2ba927aac5d27c8f 100644 (file)
 
 #include "AliLog.h"
 #include "AliReconstructor.h"
+#include <TClass.h>
 #include <TString.h>
 
 
 ClassImp(AliReconstructor)
 
+const AliDetectorRecoParam* AliReconstructor::fgRecoParam[AliReconstruction::kNDetectors] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
 
 //_____________________________________________________________________________
-void AliReconstructor::Reconstruct(AliRunLoader* /*runLoader*/, 
-                                  AliRawReader* /*rawReader*/) const
+void AliReconstructor::ConvertDigits(AliRawReader* /*rawReader*/, 
+                                    TTree* /*digitsTree*/) const
+{
+// convert raw data digits into digit objects in a root tree
+
+  AliError("conversion of raw data digits into digit objects not implemented");
+}
+
+
+//_____________________________________________________________________________
+void AliReconstructor::Reconstruct(TTree* /*digitsTree*/,
+                                  TTree* /*clustersTree*/) const
+{
+// run the local reconstruction
+
+  AliError("local event reconstruction not implemented");
+}
+
+//_____________________________________________________________________________
+void AliReconstructor::Reconstruct(AliRawReader* /*rawReader*/, 
+                                  TTree* /*clustersTree*/) const
 {
 // run the local reconstruction with raw data input
 
-  AliError("local reconstruction not implemented for raw data input");
+  AliError("local event reconstruction not implemented for raw data input");
+}
+
+//_____________________________________________________________________________
+void AliReconstructor::FillESD(TTree* /*digitsTree*/, TTree* /*clustersTree*/,
+                              AliESDEvent* /*esd*/) const
+{
+// fill the ESD.
+// by default nothing is done
+
 }
 
 //_____________________________________________________________________________
-void AliReconstructor::FillESD(AliRunLoader* runLoader
-                              AliRawReader* /*rawReader*/, AliESD* esd) const
+void AliReconstructor::FillESD(AliRawReader* /*rawReader*/
+                              TTree* clustersTree, AliESDEvent* esd) const
 {
 // fill the ESD in case of raw data input.
 // by default the FillESD method for MC is called
 
-  FillESD(runLoader, esd);
+  FillESD((TTree*)NULL, clustersTree, esd);
 }
 
-
 //_____________________________________________________________________________
 const char* AliReconstructor::GetDetectorName() const
 {
@@ -73,3 +102,44 @@ const char* AliReconstructor::GetDetectorName() const
   detName.Remove(detName.Index("Reconstructor"));
   return detName.Data();
 }
+
+//_____________________________________________________________________________
+void AliReconstructor::SetRecoParam(const AliDetectorRecoParam *par)
+{
+  // To be implemented by the detectors.
+  // As soon as we manage to remove the static members
+  // and method in the detector reconstructors, we will
+  // implemented this method in the base class and remove
+  // the detectors implementations.
+  Int_t iDet = AliReconstruction::GetDetIndex(GetDetectorName());
+
+  if (iDet >= 0)
+    fgRecoParam[iDet] = par;
+  else
+    AliError(Form("Invalid detector index for (%s)",GetDetectorName()));
+
+  return;
+}
+
+//_____________________________________________________________________________
+const AliDetectorRecoParam* AliReconstructor::GetRecoParam(Int_t iDet)
+{
+  // Get the current reconstruciton parameters
+  // for a given detector 
+  if (iDet >= 0 && iDet < AliReconstruction::kNDetectors)
+    return fgRecoParam[iDet];
+  else {
+    AliErrorClass(Form("Invalid detector index (%d)",iDet));
+    return NULL;
+  }
+}
+
+//_____________________________________________________________________________
+void AliReconstructor::GetPidSettings(AliESDpid */*esdPID*/) {
+  //
+  // Function to set Pid settings in esdPID
+  // based on detector-specific AliRecoParams
+  // to be implemented by detectors separately (e.g TOF)
+  // 
+  return;
+}