]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCSensorTemp.cxx
Update variable description file
[u/mrichter/AliRoot.git] / TPC / AliTPCSensorTemp.cxx
index e35be9f9f93ddf386b87504aec761a7a3917e492..7f52bf0d44ad12c49609dfe85e8bcc8b418efa1c 100644 (file)
 
 // Running instructions:
 /*
-  TClonesArray * arr = AliTPCSensorTemp::ReadList("TempSensor.txt");
+  TClonesArray * arr = AliTPCSensorTemp::ReadList("TempSensor.txt","tpc_PT_%d.Temperature");
   TFile f("TempSensors.root","RECREATE");
   TTree * tree = new TTree("TempSensor", "TempSensor");
   tree->Branch("Temp",&arr);
   tree->Fill();
   tree->Write();
   
- */
-//
+*/
 
+//
 
+#include <strings.h>
 #include "AliTPCSensorTemp.h"
 ClassImp(AliTPCSensorTemp)
 
-const char kAmandaString[] = "tpc_temp:PT_%d.Temperature";
+
 
 const Float_t kASideX[18][5]={
         { 99.56,  117.59,  160.82,  186.92,  213.11},
@@ -73,7 +74,7 @@ const Float_t kASideY[18][5]={
        {-50.55,  -59.7,  -81.65,  -94.9, -108.2},
        {-77.45,  -91.47, -125.1, -145.4, -165.77},
        {-95.0, -112.2, -153.45, -178.35, -203.35},
-       {-101.1, -119.4, -163.3,  -189.8, -216.4},
+        {-101.1, -119.4, -163.3,  -189.8, -216.4},
         {-95.0, -112.2, -153.45, -178.35, -203.35},
        {-77.45,  -91.47, -125.1, -145.4, -165.77},
        {-50.55,  -59.7,  -81.65,  -94.9, -108.2},
@@ -113,7 +114,7 @@ const Float_t kCSideY[18][5]={
        {-50.55,  -59.7,   -81.56,  -94.9,  -108.2},
        {-77.45,  -91.47, -125.1,  -145.4,  -165.77},
        {-95.0,  -112.2,  -153.45, -178.35, -203.35},
-       {-101.1, -119.4, -163.3, -189.8, -216.4},
+        {-101.1, -119.4, -163.3, -189.8, -216.4},
         {-95.0, -112.2, -153.45, -178.35, -203.35},
        {-77.45,  -91.47, -125.1, -145.4, -165.77},
        {-50.55,  -59.7,  -81.65,  -94.9, -108.2},
@@ -162,20 +163,22 @@ AliTPCSensorTemp& AliTPCSensorTemp::operator=(const AliTPCSensorTemp& source){
 }
 //______________________________________________________________________________________________
 
-TClonesArray * AliTPCSensorTemp::ReadList(const char *fname) {
+TClonesArray * AliTPCSensorTemp::ReadList(const char *fname,
+                                          const TString& amandaString) {
   //
   // read values from ascii file
   //
   TTree * tree = new TTree("asci","asci");
   tree->ReadFile(fname,"");
-  TClonesArray *arr = ReadTree(tree);
+  TClonesArray *arr = ReadTree(tree, amandaString);
   delete tree;
   return arr;
 }
      
 //______________________________________________________________________________________________
 
-TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree) {
+TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree, 
+                                          const TString& amandaString) {
   
   Int_t nentries = tree->GetEntries();
   Int_t sensor=0;
@@ -209,7 +212,7 @@ TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree) {
     tree->GetEntry(isensor);
     temp->SetId(sensor);
     temp->SetIdDCS(echa);
-    TString stringID = Form (kAmandaString,echa);
+    TString stringID = Form (amandaString.Data(),echa);
     temp->SetStringID(stringID);
     if (side[0]=='C') temp->SetSide(1);
     temp->SetSector(sector);