]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCGenDBTemp.cxx
Too tigight outlyer cut removed
[u/mrichter/AliRoot.git] / TPC / AliTPCGenDBTemp.cxx
index 27a27a79333e218feb8a2506dec0c2b6173d95ee..95392c68e2b282f9c96fd8ec34f26b5c3d548898 100644 (file)
@@ -9,7 +9,7 @@
 //  Data base entry generation:
   
 //  AliTPCGenDBTemp db
-//  db->SetDefaultStorage("local://$ALICE_ROOT");
+//  db->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
 //  db->SetSpecificStorage("local:///afs/cern.ch/alice/tpctest/Calib/");
 //  db->Init(0,"TPC/Config/Temperature","TPC/*/*")
 //  db->MakeConfig("TempSensor.txt",0,999999999,"TPC/Config/Temperature")
@@ -43,7 +43,7 @@ AliTPCGenDBTemp::AliTPCGenDBTemp(const char *defaultStorage, const char *specifi
 
 //______________________________________________________________________________________________
 
-AliTPCGenDBTemp::AliTPCGenDBTemp(const AliTPCGenDBTemp& org) : AliDCSGenDB(org)
+AliTPCGenDBTemp::AliTPCGenDBTemp(const AliTPCGenDBTemp& ) : AliDCSGenDB()
 {
 
 //
@@ -76,13 +76,18 @@ AliTPCGenDBTemp& AliTPCGenDBTemp::operator= (const AliTPCGenDBTemp&  )
 void AliTPCGenDBTemp::MakeCalib(const char *fList, const char *fMap,
                              const TTimeStamp& startTime,
                             const TTimeStamp& endTime,
-                            Int_t run )
+                            Int_t run, const TString& amandaString )
 {
    // The Terminate() function is the last function to be called during
    // a query. It always runs on the client, it can be used to present
    // the results graphically or save the results to file.
 
-   AliTPCSensorTempArray *temperature = new AliTPCSensorTempArray(fList);
+   AliTPCSensorTempArray *temperature=0;
+   if ( amandaString.Length()== 0 ) {
+    temperature = new AliTPCSensorTempArray(fList);
+   } else {
+    temperature = new AliTPCSensorTempArray(fList,amandaString);
+   }
    temperature->SetStartTime(startTime);
    temperature->SetEndTime(endTime);
    temperature->SetValCut(kValCut);
@@ -122,32 +127,24 @@ TClonesArray * AliTPCGenDBTemp::ReadList(const char *fname, const char *title,
 
 //______________________________________________________________________________________________
 
-TTree * AliTPCGenDBTemp::ReadListTree(const char *fname, const char *title,
-                         const TString& amandaString) {
+TTree * AliTPCGenDBTemp::ReadListTree(const char *fname, const char *title) {
   //
   // read values from ascii file
   //
   TTree* tree = new TTree(title,title);
   tree->ReadFile(fname,"");
-  TClonesArray *arr;
-  if ( amandaString.Length()== 0 ) {
-    arr = AliTPCSensorTemp::ReadTree(tree);
-  } else {
-    arr = AliTPCSensorTemp::ReadTree(tree,amandaString);
-  }
-  arr->Delete();
-  delete arr;
   return tree;
 }
+
 //______________________________________________________________________________________________
 void AliTPCGenDBTemp::MakeConfig(const char *file, Int_t firstRun, Int_t lastRun, 
-                             const char *confDir, const TString& amandaString)
+                             const char *confDir)
 {
    //
    // Store Configuration file to OCDB
    //
 
-   TTree *tree = ReadListTree(file,amandaString);
+   TTree *tree = ReadListTree(file,"tempConf");
    SetConfTree(tree);
    SetFirstRun(firstRun);
    SetLastRun(lastRun);