#include #include #include #include #include #include #include #include "ISlowControlDatabase.hxx" #include "ITPCTemperature.hxx" #include "ITPCTempAvg.hxx" #include "ITPCGas.hxx" #include "ITPCGasAvg.hxx" void mypalette(){ int nbCol=36; int offset=0; int iJul; TColor **colJul; colJul = new TColor*[36]; for (iJul=0;iJul<36;iJul++) colJul[iJul] = new TColor(999-iJul,0.0,0.7,0.7); colJul[0]->SetRGB(1.0,0.9,1.0); colJul[1]->SetRGB(1.0,0.8,1.0); colJul[2]->SetRGB(1.0,0.6,1.0); colJul[3]->SetRGB(1.0,0.0,1.0); colJul[4]->SetRGB(0.88,0.0,1.0); colJul[5]->SetRGB(0.7,0.0,1.0); colJul[6]->SetRGB(0.55,0.0,1.0); colJul[7]->SetRGB(0.0,0.0,0.98); colJul[8]->SetRGB(0.0,0.5,1.0); colJul[9]->SetRGB(0.0,0.65,1.0); colJul[10]->SetRGB(0.0,0.8,1.0); colJul[11]->SetRGB(0.0,0.9,1.0); colJul[12]->SetRGB(0.0,1.0,1.0); colJul[13]->SetRGB(0.0,0.97,0.85); colJul[14]->SetRGB(0.0,0.95,0.7); colJul[15]->SetRGB(0.0,0.9,0.58); colJul[16]->SetRGB(0.0,0.87,0.0); colJul[17]->SetRGB(0.5,0.9,0.0); colJul[18]->SetRGB(0.65,0.93,0.0); colJul[19]->SetRGB(0.80,0.96,0.0); colJul[20]->SetRGB(0.9,0.98,0.0); colJul[21]->SetRGB(1.0,1.0,0.0); colJul[22]->SetRGB(1.0,0.95,0.0); colJul[23]->SetRGB(1.0,0.90,0.0); colJul[24]->SetRGB(1.0,0.85,0.0); colJul[25]->SetRGB(1.0,0.78,0.0); colJul[26]->SetRGB(1.0,0.68,0.0); colJul[27]->SetRGB(1.0,0.58,0.0); colJul[28]->SetRGB(1.0,0.48,0.0); colJul[29]->SetRGB(1.0,0.0,0.0); colJul[30]->SetRGB(0.92,0.0,0.0); colJul[31]->SetRGB(0.85,0.0,0.0); colJul[32]->SetRGB(0.74,0.0,0.0); colJul[33]->SetRGB(0.62,0.0,0.0); colJul[34]->SetRGB(0.5,0.0,0.0); colJul[35]->SetRGB(0.0,0.0,0.0); int tabColJul[36]; for (iJul=0;iJul<36;iJul++) tabColJul[iJul]=999-iJul; gStyle->SetPalette(nbCol,tabColJul+offset); } /// Get recent ~1 minute ago? temperature plot. /// for TPCs. /// Blair Jamieson (C) 2009, 2010 /// int main(int argc,char **argv){ gROOT->SetStyle("Pub"); //gStyle->SetPalette(1); mypalette(); gStyle->SetOptTitle(1); gStyle->SetNdivisions(0,"X"); gStyle->SetNdivisions(0,"Y"); // make sure timezone is Japan setenv( "TZ", "Japan", 1 ); tzset(); long fCurTime = time(NULL); long fInitTime = fCurTime; float Tmin, Tmax; long tmin, tmax; ITPCTemperature TPCTemps( fCurTime ); TPCTemps.GetMinMaxT( Tmin, Tmax ); char aCtmin[256]; char aCtmax[256]; while (Tmin > 200.0 && Tmax < -200.0){ TPCTemps.GetTimeInterval( tmin, tmax ); ctime_r( (const time_t*)&tmin, aCtmin ); ctime_r( (const time_t*)&tmax, aCtmax ); // std::cout<<"t="<SetTextSize(0.025); tt->Draw(); aHist->Draw("colz"); tc->Print("TpcTempCurPlot.root"); tc->Print("TpcTempCurPlot.gif"); ctime_r( (const time_t*)&fInitTime, aCtmin ); ctime_r( (const time_t*)&fCurTime, aCtmax ); std::cout<<"Request time was "<