#include "AliEMCALSensorTempArray.h"
#include "TLinearFitter.h"
#include "TVectorD.h"
#include "AliLog.h"
ClassImp(AliEMCALSensorTempArray)
AliEMCALSensorTempArray::AliEMCALSensorTempArray():AliDCSSensorArray()
{
}
AliEMCALSensorTempArray::AliEMCALSensorTempArray(Int_t run) : AliDCSSensorArray()
{
AliCDBEntry *entry =
AliCDBManager::Instance()->Get("EMCAL/Config/Temperature",run);
if(entry){
TTree *tree = (TTree*) entry->GetObject();
fSensors = AliEMCALSensorTemp::ReadTree(tree);
fSensors->BypassStreamer(kFALSE);
}
else AliFatal("CDB entry null!");
}
AliEMCALSensorTempArray::AliEMCALSensorTempArray(UInt_t startTime, UInt_t endTime,
TTree* confTree, const TString& amandaString)
:AliDCSSensorArray()
{
fSensors = AliEMCALSensorTemp::ReadTree(confTree,amandaString);
fSensors->BypassStreamer(kFALSE);
fStartTime = TTimeStamp((time_t)startTime,0);
fEndTime = TTimeStamp((time_t)endTime,0);
}
AliEMCALSensorTempArray::AliEMCALSensorTempArray(const char *fname,
const TString& amandaString) :
AliDCSSensorArray()
{
fSensors = AliEMCALSensorTemp::ReadList(fname,amandaString);
fSensors->BypassStreamer(kFALSE);
}
AliEMCALSensorTempArray::AliEMCALSensorTempArray(const AliEMCALSensorTempArray &c):
AliDCSSensorArray(c)
{
}
AliEMCALSensorTempArray::~AliEMCALSensorTempArray()
{
}
AliEMCALSensorTempArray &AliEMCALSensorTempArray::operator=(const AliEMCALSensorTempArray &c)
{
if (this != &c) {
fSensors->Delete();
new (this) AliEMCALSensorTempArray(c);
fSensors = (TClonesArray*)c.fSensors->Clone();
}
return *this;
}
void AliEMCALSensorTempArray::ReadSensors(const char *dbEntry)
{
AliCDBEntry *entry = AliCDBManager::Instance()->Get(dbEntry);
if(entry){
TTree *tree = (TTree*) entry->GetObject();
fSensors = AliEMCALSensorTemp::ReadTree(tree);
}
else AliFatal("NULL CDB entry!");
}
AliEMCALSensorTemp* AliEMCALSensorTempArray::GetSensor(Int_t side, Int_t sector, Int_t num)
{
Int_t nsensors = fSensors->GetEntries();
for (Int_t isensor=0; isensor<nsensors; isensor++) {
AliEMCALSensorTemp *entry = (AliEMCALSensorTemp*)fSensors->At(isensor);
if (entry->GetSide() == side &&
entry->GetSector() == sector &&
entry->GetNum() == num ) return entry;
}
return 0;
}
AliEMCALSensorTemp* AliEMCALSensorTempArray::GetSensor(Int_t IdDCS){
return dynamic_cast<AliEMCALSensorTemp*>(AliDCSSensorArray::GetSensor(IdDCS));
}
AliEMCALSensorTemp* AliEMCALSensorTempArray::GetSensor(Double_t x, Double_t y, Double_t z){
return dynamic_cast<AliEMCALSensorTemp*>(AliDCSSensorArray::GetSensor(x,y,z));
}
Double_t AliEMCALSensorTempArray::GetTempGradientY(UInt_t timeSec, Int_t side){
TLinearFitter fitter(3,"x0++x1++x2");
TVectorD param(3);
Int_t i = 0;
Int_t nsensors = fSensors->GetEntries();
for (Int_t isensor=0; isensor<nsensors; isensor++) {
AliEMCALSensorTemp *entry = (AliEMCALSensorTemp*)fSensors->At(isensor);
if (entry->GetSide()==side) {
Double_t x[3];
x[0]=1;
x[1]=entry->GetX();
x[2]=entry->GetY();
Double_t y = entry->GetValue(timeSec);
fitter.AddPoint(x,y,1);
i++;
}
}
fitter.Eval();
fitter.GetParameters(param);
return param[2];
}
AliEMCALSensorTempArray.cxx:1 AliEMCALSensorTempArray.cxx:2 AliEMCALSensorTempArray.cxx:3 AliEMCALSensorTempArray.cxx:4 AliEMCALSensorTempArray.cxx:5 AliEMCALSensorTempArray.cxx:6 AliEMCALSensorTempArray.cxx:7 AliEMCALSensorTempArray.cxx:8 AliEMCALSensorTempArray.cxx:9 AliEMCALSensorTempArray.cxx:10 AliEMCALSensorTempArray.cxx:11 AliEMCALSensorTempArray.cxx:12 AliEMCALSensorTempArray.cxx:13 AliEMCALSensorTempArray.cxx:14 AliEMCALSensorTempArray.cxx:15 AliEMCALSensorTempArray.cxx:16 AliEMCALSensorTempArray.cxx:17 AliEMCALSensorTempArray.cxx:18 AliEMCALSensorTempArray.cxx:19 AliEMCALSensorTempArray.cxx:20 AliEMCALSensorTempArray.cxx:21 AliEMCALSensorTempArray.cxx:22 AliEMCALSensorTempArray.cxx:23 AliEMCALSensorTempArray.cxx:24 AliEMCALSensorTempArray.cxx:25 AliEMCALSensorTempArray.cxx:26 AliEMCALSensorTempArray.cxx:27 AliEMCALSensorTempArray.cxx:28 AliEMCALSensorTempArray.cxx:29 AliEMCALSensorTempArray.cxx:30 AliEMCALSensorTempArray.cxx:31 AliEMCALSensorTempArray.cxx:32 AliEMCALSensorTempArray.cxx:33 AliEMCALSensorTempArray.cxx:34 AliEMCALSensorTempArray.cxx:35 AliEMCALSensorTempArray.cxx:36 AliEMCALSensorTempArray.cxx:37 AliEMCALSensorTempArray.cxx:38 AliEMCALSensorTempArray.cxx:39 AliEMCALSensorTempArray.cxx:40 AliEMCALSensorTempArray.cxx:41 AliEMCALSensorTempArray.cxx:42 AliEMCALSensorTempArray.cxx:43 AliEMCALSensorTempArray.cxx:44 AliEMCALSensorTempArray.cxx:45 AliEMCALSensorTempArray.cxx:46 AliEMCALSensorTempArray.cxx:47 AliEMCALSensorTempArray.cxx:48 AliEMCALSensorTempArray.cxx:49 AliEMCALSensorTempArray.cxx:50 AliEMCALSensorTempArray.cxx:51 AliEMCALSensorTempArray.cxx:52 AliEMCALSensorTempArray.cxx:53 AliEMCALSensorTempArray.cxx:54 AliEMCALSensorTempArray.cxx:55 AliEMCALSensorTempArray.cxx:56 AliEMCALSensorTempArray.cxx:57 AliEMCALSensorTempArray.cxx:58 AliEMCALSensorTempArray.cxx:59 AliEMCALSensorTempArray.cxx:60 AliEMCALSensorTempArray.cxx:61 AliEMCALSensorTempArray.cxx:62 AliEMCALSensorTempArray.cxx:63 AliEMCALSensorTempArray.cxx:64 AliEMCALSensorTempArray.cxx:65 AliEMCALSensorTempArray.cxx:66 AliEMCALSensorTempArray.cxx:67 AliEMCALSensorTempArray.cxx:68 AliEMCALSensorTempArray.cxx:69 AliEMCALSensorTempArray.cxx:70 AliEMCALSensorTempArray.cxx:71 AliEMCALSensorTempArray.cxx:72 AliEMCALSensorTempArray.cxx:73 AliEMCALSensorTempArray.cxx:74 AliEMCALSensorTempArray.cxx:75 AliEMCALSensorTempArray.cxx:76 AliEMCALSensorTempArray.cxx:77 AliEMCALSensorTempArray.cxx:78 AliEMCALSensorTempArray.cxx:79 AliEMCALSensorTempArray.cxx:80 AliEMCALSensorTempArray.cxx:81 AliEMCALSensorTempArray.cxx:82 AliEMCALSensorTempArray.cxx:83 AliEMCALSensorTempArray.cxx:84 AliEMCALSensorTempArray.cxx:85 AliEMCALSensorTempArray.cxx:86 AliEMCALSensorTempArray.cxx:87 AliEMCALSensorTempArray.cxx:88 AliEMCALSensorTempArray.cxx:89 AliEMCALSensorTempArray.cxx:90 AliEMCALSensorTempArray.cxx:91 AliEMCALSensorTempArray.cxx:92 AliEMCALSensorTempArray.cxx:93 AliEMCALSensorTempArray.cxx:94 AliEMCALSensorTempArray.cxx:95 AliEMCALSensorTempArray.cxx:96 AliEMCALSensorTempArray.cxx:97 AliEMCALSensorTempArray.cxx:98 AliEMCALSensorTempArray.cxx:99 AliEMCALSensorTempArray.cxx:100 AliEMCALSensorTempArray.cxx:101 AliEMCALSensorTempArray.cxx:102 AliEMCALSensorTempArray.cxx:103 AliEMCALSensorTempArray.cxx:104 AliEMCALSensorTempArray.cxx:105 AliEMCALSensorTempArray.cxx:106 AliEMCALSensorTempArray.cxx:107 AliEMCALSensorTempArray.cxx:108 AliEMCALSensorTempArray.cxx:109 AliEMCALSensorTempArray.cxx:110 AliEMCALSensorTempArray.cxx:111 AliEMCALSensorTempArray.cxx:112 AliEMCALSensorTempArray.cxx:113 AliEMCALSensorTempArray.cxx:114 AliEMCALSensorTempArray.cxx:115 AliEMCALSensorTempArray.cxx:116 AliEMCALSensorTempArray.cxx:117 AliEMCALSensorTempArray.cxx:118 AliEMCALSensorTempArray.cxx:119 AliEMCALSensorTempArray.cxx:120 AliEMCALSensorTempArray.cxx:121 AliEMCALSensorTempArray.cxx:122 AliEMCALSensorTempArray.cxx:123 AliEMCALSensorTempArray.cxx:124 AliEMCALSensorTempArray.cxx:125 AliEMCALSensorTempArray.cxx:126 AliEMCALSensorTempArray.cxx:127 AliEMCALSensorTempArray.cxx:128 AliEMCALSensorTempArray.cxx:129 AliEMCALSensorTempArray.cxx:130 AliEMCALSensorTempArray.cxx:131 AliEMCALSensorTempArray.cxx:132 AliEMCALSensorTempArray.cxx:133 AliEMCALSensorTempArray.cxx:134 AliEMCALSensorTempArray.cxx:135 AliEMCALSensorTempArray.cxx:136 AliEMCALSensorTempArray.cxx:137 AliEMCALSensorTempArray.cxx:138 AliEMCALSensorTempArray.cxx:139 AliEMCALSensorTempArray.cxx:140 AliEMCALSensorTempArray.cxx:141 AliEMCALSensorTempArray.cxx:142 AliEMCALSensorTempArray.cxx:143 AliEMCALSensorTempArray.cxx:144 AliEMCALSensorTempArray.cxx:145 AliEMCALSensorTempArray.cxx:146 AliEMCALSensorTempArray.cxx:147 AliEMCALSensorTempArray.cxx:148 AliEMCALSensorTempArray.cxx:149 AliEMCALSensorTempArray.cxx:150 AliEMCALSensorTempArray.cxx:151 AliEMCALSensorTempArray.cxx:152 AliEMCALSensorTempArray.cxx:153 AliEMCALSensorTempArray.cxx:154 AliEMCALSensorTempArray.cxx:155 AliEMCALSensorTempArray.cxx:156 AliEMCALSensorTempArray.cxx:157 AliEMCALSensorTempArray.cxx:158 AliEMCALSensorTempArray.cxx:159 AliEMCALSensorTempArray.cxx:160 AliEMCALSensorTempArray.cxx:161 AliEMCALSensorTempArray.cxx:162 AliEMCALSensorTempArray.cxx:163 AliEMCALSensorTempArray.cxx:164 AliEMCALSensorTempArray.cxx:165 AliEMCALSensorTempArray.cxx:166 AliEMCALSensorTempArray.cxx:167 AliEMCALSensorTempArray.cxx:168 AliEMCALSensorTempArray.cxx:169 AliEMCALSensorTempArray.cxx:170 AliEMCALSensorTempArray.cxx:171 AliEMCALSensorTempArray.cxx:172 AliEMCALSensorTempArray.cxx:173 AliEMCALSensorTempArray.cxx:174 AliEMCALSensorTempArray.cxx:175 AliEMCALSensorTempArray.cxx:176 AliEMCALSensorTempArray.cxx:177 AliEMCALSensorTempArray.cxx:178 AliEMCALSensorTempArray.cxx:179 AliEMCALSensorTempArray.cxx:180 AliEMCALSensorTempArray.cxx:181 AliEMCALSensorTempArray.cxx:182 AliEMCALSensorTempArray.cxx:183 AliEMCALSensorTempArray.cxx:184 AliEMCALSensorTempArray.cxx:185 AliEMCALSensorTempArray.cxx:186 AliEMCALSensorTempArray.cxx:187 AliEMCALSensorTempArray.cxx:188 AliEMCALSensorTempArray.cxx:189