Instead of deleting the AliTRDcalibDB singleton in the end of AliReconstruction,...
authorshahoian <ruben.shahoyan@cern.ch>
Thu, 9 Oct 2014 17:24:34 +0000 (19:24 +0200)
committershahoian <ruben.shahoyan@cern.ch>
Thu, 9 Oct 2014 17:40:46 +0000 (19:40 +0200)
TRD/AliTRDReconstructor.cxx
TRD/AliTRDcalibDB.h
TRD/AliTRDtransform.cxx

index ce3c1c3..1e93ab8 100644 (file)
@@ -46,6 +46,7 @@
 #include "AliTRDtrackletWord.h"
 #include "AliTRDtrackletMCM.h"
 #include "AliTRDonlineTrackMatching.h"
+#include "AliTRDcalibDB.h"
 
 #define SETFLG(n,f) ((n) |= f)
 #define CLRFLG(n,f) ((n) &= ~f)
@@ -122,7 +123,9 @@ AliTRDReconstructor::~AliTRDReconstructor()
   //
   // Destructor
   //
-
+  AliTRDcalibDB* calib = AliTRDcalibDB::Instance();
+  if (calib) calib->Invalidate();
+  //
   if(fClusterizer){
     delete fClusterizer;
     fClusterizer = NULL;
index bdd8140..c133bc4 100644 (file)
@@ -57,7 +57,6 @@ class AliTRDcalibDB : public TObject {
 
   static AliTRDcalibDB               *Instance();
   static void                         Terminate();
-  virtual                            ~AliTRDcalibDB();
   void                                SetRun(Long64_t run);
   Long64_t                            GetRun() const { return fRun; }
 
@@ -139,12 +138,13 @@ class AliTRDcalibDB : public TObject {
   void                                GetTrapConfig(TString &name, TString &version) { name = fTrapConfigName; version = fTrapConfigVersion; }
   void                                SetTrapConfig(const TString name, const TString version) { fTrapConfigName = name; fTrapConfigVersion = version; }
   void                                SetTrapConfig(AliTRDtrapConfig *trapcfg) { fTrapConfig = trapcfg; }
+  void                                Invalidate();
 
  protected:
 
   AliTRDtrapConfig*                   LoadTrapConfig(const TString &name = "", const TString &version = "");
   Int_t                               GetNumberOfTimeBinsDCSBoard(); // Old method as fallback for patched OCDB 
-
+  virtual                            ~AliTRDcalibDB();
   // For caching see also implentation of GetCachedCDBObject in the .cxx file
   enum { kIDVdriftPad = 0
        , kIDVdriftChamber
@@ -176,7 +176,6 @@ class AliTRDcalibDB : public TObject {
 
   const TObject *GetCachedCDBObject(Int_t id);
   
-  void           Invalidate();
   void           SamplePRF();
   
   AliCDBEntry   *GetCDBEntry(const Char_t *cdbPath);
index 6aab7a3..93ceaed 100644 (file)
@@ -168,7 +168,7 @@ AliTRDtransform::~AliTRDtransform()
   //
   // AliTRDtransform destructor
   //
-  delete fCalibration;
+  //  delete fCalibration;
 }
 
 //_____________________________________________________________________________