2 // .L /afs/cern.ch/user/h/haavard/alice/tpc/temperature/AliTPCGenDBTemp.C+
3 // TTimeStamp startTime(2006,10,18,0,0,0,0,kFALSE)
4 // TTimeStamp endTime(2006,10,19,0,0,0,0,kFALSE)
7 // db->Init(run,"TPC/Config/Temperature","TPC/*/*")
8 // db->MakeCalib("TempSensor.txt","DCSMap.root",startTime,endTime,run)
11 #include "AliTPCGenDBTemp.h"
14 ClassImp(AliTPCGenDBTemp)
16 const Int_t kValCut = 100; // discard temperatures > 100 degrees
17 const Int_t kDiffCut = 5; // discard temperature differences > 5 degrees
19 //______________________________________________________________________________________________
21 AliTPCGenDBTemp::AliTPCGenDBTemp():
26 //______________________________________________________________________________________________
28 AliTPCGenDBTemp::AliTPCGenDBTemp(const char *defaultStorage, const char *specificStorage) :
29 AliDCSGenDB(defaultStorage,specificStorage)
33 //______________________________________________________________________________________________
35 AliTPCGenDBTemp::AliTPCGenDBTemp(const AliTPCGenDBTemp& org) : AliDCSGenDB(org)
41 AliError("copy constructor not implemented");
45 //______________________________________________________________________________________________
46 AliTPCGenDBTemp::~AliTPCGenDBTemp(){
52 //______________________________________________________________________________________________
53 AliTPCGenDBTemp& AliTPCGenDBTemp::operator= (const AliTPCGenDBTemp& org )
56 // assignment operator
58 AliError("assignment operator not implemented");
63 //______________________________________________________________________________________________
65 void AliTPCGenDBTemp::MakeCalib(const char *fList, const char *fMap,
66 const TTimeStamp& startTime,
67 const TTimeStamp& endTime,
70 // The Terminate() function is the last function to be called during
71 // a query. It always runs on the client, it can be used to present
72 // the results graphically or save the results to file.
74 AliTPCSensorTempArray *temperature = new AliTPCSensorTempArray(fList);
75 temperature->SetStartTime(startTime);
76 temperature->SetEndTime(endTime);
77 temperature->SetValCut(kValCut);
78 temperature->SetDiffCut(kDiffCut);
79 TMap* map = SetGraphFile(fMap);
81 temperature->MakeSplineFit(map);
89 SetSensorArray(temperature);
90 StoreObject("TPC/Calib/Temperature",temperature, fMetaData);
93 //______________________________________________________________________________________________
95 TClonesArray * AliTPCGenDBTemp::ReadList(const char *fname) {
97 // read values from ascii file
99 TTree* tree = new TTree("tempConf","tempConf");
100 tree->ReadFile(fname,"");
101 TClonesArray *arr = AliTPCSensorTemp::ReadTree(tree);
106 //______________________________________________________________________________________________
108 TTree * AliTPCGenDBTemp::ReadListTree(const char *fname) {
110 // read values from ascii file
112 TTree* tree = new TTree("tempConf","tempConf");
113 tree->ReadFile(fname,"");
114 TClonesArray *arr = AliTPCSensorTemp::ReadTree(tree);