// 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 Float_t kASideX[18][5]={
{ 99.56, 117.59, 160.82, 186.92, 213.11},
{ 87.56, 103.4, 141.42, 164.37, 187.41},
{-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},
{-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},
const Float_t kTSrad[4] = {67.2, 61.5, 67.2, 61.5};
const Float_t kTSz[4] = {240.0, 90.0, 240.0, 90.0};
+//______________________________________________________________________________________________
AliTPCSensorTemp::AliTPCSensorTemp(): AliDCSSensor(),
fType(0),
// Standard constructor
//
}
+//______________________________________________________________________________________________
AliTPCSensorTemp::AliTPCSensorTemp(const AliTPCSensorTemp& source) :
AliDCSSensor(source),
// Copy constructor
//
{ }
+//______________________________________________________________________________________________
AliTPCSensorTemp& AliTPCSensorTemp::operator=(const AliTPCSensorTemp& source){
//
return *this;
}
+//______________________________________________________________________________________________
-
-
-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, amandaString);
+ delete tree;
+ return arr;
+}
+
+//______________________________________________________________________________________________
+
+TClonesArray * AliTPCSensorTemp::ReadTree(TTree *tree,
+ const TString& amandaString) {
Int_t nentries = tree->GetEntries();
Int_t sensor=0;
tree->GetEntry(isensor);
temp->SetId(sensor);
temp->SetIdDCS(echa);
+ TString stringID = Form (amandaString.Data(),echa);
+ temp->SetStringID(stringID);
if (side[0]=='C') temp->SetSide(1);
temp->SetSector(sector);
temp->SetNum(num);
}
- delete tree;
return array;
}