#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::ConvertDigits(AliRawReader* /*rawReader*/,
AliError("local event reconstruction not implemented for raw data input");
}
-//_____________________________________________________________________________
-void AliReconstructor::Reconstruct(AliRunLoader* /*runLoader*/) const
-{
-// run the local reconstruction
-
- AliError("local reconstruction not implemented");
-}
-
-//_____________________________________________________________________________
-void AliReconstructor::Reconstruct(AliRunLoader* /*runLoader*/,
- AliRawReader* /*rawReader*/) const
-{
-// run the local reconstruction with raw data input
-
- AliError("local reconstruction not implemented for raw data input");
-}
-
-
//_____________________________________________________________________________
void AliReconstructor::FillESD(TTree* /*digitsTree*/, TTree* /*clustersTree*/,
- AliESD* /*esd*/) const
+ AliESDEvent* /*esd*/) const
{
// fill the ESD.
// by default nothing is done
//_____________________________________________________________________________
void AliReconstructor::FillESD(AliRawReader* /*rawReader*/,
- TTree* clustersTree, AliESD* esd) const
+ TTree* clustersTree, AliESDEvent* esd) const
{
// fill the ESD in case of raw data input.
// by default the FillESD method for MC is called
}
//_____________________________________________________________________________
-void AliReconstructor::FillESD(AliRunLoader* /*runLoader*/,
- AliESD* /*esd*/) const
+const char* AliReconstructor::GetDetectorName() const
{
-// fill the ESD.
-// by default nothing is done
+// get the name of the detector
+ static TString detName;
+ detName = GetName();
+ detName.Remove(0, 3);
+ detName.Remove(detName.Index("Reconstructor"));
+ return detName.Data();
}
//_____________________________________________________________________________
-void AliReconstructor::FillESD(AliRunLoader* runLoader,
- AliRawReader* /*rawReader*/, AliESD* esd) const
+void AliReconstructor::SetRecoParam(const AliDetectorRecoParam *par)
{
-// fill the ESD in case of raw data input.
-// by default the FillESD method for MC is called
-
- FillESD(runLoader, esd);
+ // 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 char* AliReconstructor::GetDetectorName() const
+const AliDetectorRecoParam* AliReconstructor::GetRecoParam(Int_t iDet)
{
-// get the name of the detector
-
- static TString detName;
- detName = GetName();
- detName.Remove(0, 3);
- detName.Remove(detName.Index("Reconstructor"));
- return detName.Data();
+ // 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;
+ }
}