/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/tb2012_data/SPS_H2_may_2012/Slow_control/plot.C

Go to the documentation of this file.
00001 {gROOT->Reset();
00002 
00003   ifstream in("slow_control_tb_2012.txt");
00004 
00005   float time0 = 1.33518485094400000e12;
00006 
00007   TString timestamp;
00008   float time = 0;
00009   float temp = 0;
00010   float pres = 0;
00011   float overp = 0;
00012   float temp = 0;
00013 
00014   TGraph * tgpt = new TGraph();
00015   TGraph * tgp = new TGraph();
00016   TGraph * tgt = new TGraph();
00017 
00018   TH1F * hpres = new TH1F("hpres","pres (mbar)",200,900,1000);
00019   TH1F * htemp = new TH1F("htemp","temp (deg C)",200,10,30);
00020 
00021   while (in>>timestamp)
00022     {
00023       time = timestamp.Atof();
00024 
00025       if (time>1e12)
00026         {
00027           for (int i=0;i<72;i++)
00028             {
00029               in>>temp;
00030             }
00031 
00032           in>>pres>>overp>>temp;
00033           
00034           if (time < time0)
00035             {
00036               time0 = time;
00037             }
00038 
00039           hpres->Fill(pres);
00040           htemp->Fill(temp);
00041 
00042           tgp->SetPoint(tgp->GetN(),time-time0,pres);
00043           tgt->SetPoint(tgp->GetN(),time-time0,temp);
00044 
00045           //cout<<time<<" "<<pres<<" "<<temp<<endl;
00046         }
00047     }
00048 
00049 }

Generated on Mon Jan 7 13:15:22 2013 for MicromegasFramework by  doxygen 1.4.7