// 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)
}
//______________________________________________________________________________________________
-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;
}
Int_t sector=0;
char type[100];
char side[100];
- Int_t num=0;
+ UInt_t num=0;
Int_t echa=0;
//Double_t x=0;
//Double_t y=0;
temp->SetZ(-240);
}
- if(temp->GetType()==5 && temp->GetSide()==0) {
+ if ( num < (sizeof(kTSz)/sizeof(kTSz[0]))) {
+ if(temp->GetType()==5 && temp->GetSide()==0) {
temp->SetZ(kTSz[num]);
}
- if(temp->GetType()==5 && temp->GetSide()==1) {
+ if(temp->GetType()==5 && temp->GetSide()==1) {
temp->SetZ(-kTSz[num]);
}
-
+ }
}
return array;