]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSensorTempArray.cxx
preliminary update of the rec-hlt-tpc.C macro: adding the CA tracker and merger
[u/mrichter/AliRoot.git] / TPC / AliTPCSensorTempArray.cxx
index 42e6e290a000441bdfd47b734fff3bf872ea8ce8..b1dda2c40cb8946f05dd1bcefbbbabbc65fa103a 100644 (file)
@@ -24,6 +24,9 @@
 #include "AliTPCSensorTempArray.h"
 #include "TLinearFitter.h"
 #include "TVectorD.h"
+#include "AliLog.h"
+
+
 
 ClassImp(AliTPCSensorTempArray)
 
@@ -53,27 +56,28 @@ AliTPCSensorTempArray::AliTPCSensorTempArray(Int_t run) : AliDCSSensorArray()
 }
 //_____________________________________________________________________________
 AliTPCSensorTempArray::AliTPCSensorTempArray(UInt_t startTime, UInt_t endTime,
-                       TTree* confTree)
+                       TTree* confTree, const TString& amandaString)
              :AliDCSSensorArray()
 {
   //
   // AliTPCSensorTempArray constructor for Shuttle preprocessor 
   //  (confTree read from OCDB)
   //
-  fSensors = AliTPCSensorTemp::ReadTree(confTree);
+  fSensors = AliTPCSensorTemp::ReadTree(confTree,amandaString);
   fSensors->BypassStreamer(kFALSE);
-  fStartTime = TTimeStamp(startTime);
-  fEndTime   = TTimeStamp(endTime);
+  fStartTime = TTimeStamp((time_t)startTime,0);
+  fEndTime   = TTimeStamp((time_t)endTime,0);
 }
 
 //_____________________________________________________________________________
-AliTPCSensorTempArray::AliTPCSensorTempArray(const char *fname) : 
+AliTPCSensorTempArray::AliTPCSensorTempArray(const char *fname,
+                                          const TString& amandaString) :
                                                   AliDCSSensorArray()
 {
   //
   // AliTPCSensorTempArray constructor
   //
-  fSensors = AliTPCSensorTemp::ReadList(fname);
+  fSensors = AliTPCSensorTemp::ReadList(fname,amandaString);
   fSensors->BypassStreamer(kFALSE);
 }
 
@@ -102,28 +106,22 @@ AliTPCSensorTempArray &AliTPCSensorTempArray::operator=(const AliTPCSensorTempAr
   //
   // Assignment operator
   //
-
-  if (this != &c) ((AliTPCSensorTempArray &) c).Copy(*this);
+  if (this != &c) {
+     fSensors->Delete();
+     new (this) AliTPCSensorTempArray(c);
+     fSensors = (TClonesArray*)c.fSensors->Clone();
+  }
   return *this;
-
 }
 
-//_____________________________________________________________________________
-void AliTPCSensorTempArray::Copy(TObject &c) const
-{
-  //
-  // Copy function
-  //
 
-  TObject::Copy(c);
-}
 //_____________________________________________________________________________
-void AliTPCSensorTempArray::ReadSensors(const char *dbEntry) 
+void AliTPCSensorTempArray::ReadSensors(const char *dbEntry)
 {
   //
   // Read list of temperature sensors from text file
   //
-  AliCDBEntry *entry = AliCDBManager::Instance()->Get(dbEntry); 
+  AliCDBEntry *entry = AliCDBManager::Instance()->Get(dbEntry);
   TTree *tree = (TTree*) entry->GetObject();
   fSensors = AliTPCSensorTemp::ReadTree(tree);