Ignore:
Timestamp:
01/23/04 17:22:46 (21 years ago)
Author:
reyes
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/CCDataCheck.C

    r2888 r2895  
    2626// It displays 5 tabs:
    2727//   - Drive system
    28 //   - Power supplies
     28//   - HV power supplies
     29//   - LV power supplies
    2930//   - Cooling system
    3031//   - Trigger
    31 //   - Weather station (?)
     32//   - Weather station
    3233//
    3334////////////////////////////////////////////////////////////////////////////
     
    6364  MHVsTime hDState("MReportDrive.fState");
    6465  hDState.SetName("State");
    65   // Power supplies
     66  // HV power supplies
    6667  MHVsTime hHVA("MCameraHV.fVoltageA");
    6768  hHVA.SetName("HVA");
     
    7273  MHVsTime hCB("MCameraHV.fCurrentB");
    7374  hCB.SetName("CB");
     75  // LV power supplies
     76  MHVsTime hLVTemp("MCameraLV.fTemp");
     77  hLVTemp.SetName("LVTemp");
     78  MHVsTime hLVHum("MCameraLV.fHumidity");
     79  hLVHum.SetName("LVHum");
     80  MHVsTime hLVStatus("MCameraHV.fStatus");
     81  hLVStatus.SetName("LVStatus");
     82  MHVsTime hLVRPS("MCameraLV.fRequestPowerSupply");
     83  hLVRPS.SetName("LVRPS");
    7484  // Cooling system
    7585  MHVsTime hTCenter("MCameraCooling.fTempCenter");
     
    109119  read.AddToBranchList("MReportDrive.*");
    110120  read.AddToBranchList("MCameraHV.*");
     121  read.AddToBranchList("MCameraLV.*");
    111122  read.AddToBranchList("MCameraCooling.*");
    112123  read.AddToBranchList("MReportCC.*");
     
    143154  MFillH fillCA(&hCA,             "MTimeCamera");
    144155  MFillH fillCB(&hCB,             "MTimeCamera");
     156  MFillH fillLVTemp(&hLVTemp,     "MTimeCamera");
     157  MFillH fillLVHum(&hLVHum,       "MTimeCamera");
     158  MFillH fillLVStatus(&hLVStatus, "MTimeCamera");
     159  MFillH fillLVRPS(&hLVRPS,       "MTimeCamera");
    145160  MFillH fillTCenter(&hTCenter,   "MTimeCamera");
    146161  MFillH fillTWall(&hTWall,       "MTimeCamera");
     
    167182  fillCA.SetBit(MFillH::kDoNotDisplay);
    168183  fillCB.SetBit(MFillH::kDoNotDisplay);
     184  fillLVTemp.SetBit(MFillH::kDoNotDisplay);
     185  fillLVHum.SetBit(MFillH::kDoNotDisplay);
     186  fillLVStatus.SetBit(MFillH::kDoNotDisplay);
     187  fillLVRPS.SetBit(MFillH::kDoNotDisplay);
    169188  fillTCenter.SetBit(MFillH::kDoNotDisplay);
    170189  fillTWall.SetBit(MFillH::kDoNotDisplay);
     
    187206  tlist.AddToList(&fillError,    "Drive");
    188207  tlist.AddToList(&fillDState,   "Drive");
    189   tlist.AddToList(&fillError2,    "Drive");
     208  tlist.AddToList(&fillError2,   "Drive");
    190209  tlist.AddToList(&fillHVA,      "Camera");
    191210  tlist.AddToList(&fillHVB,      "Camera");
    192211  tlist.AddToList(&fillCA,       "Camera");
    193212  tlist.AddToList(&fillCB,       "Camera");
     213  tlist.AddToList(&fillLVTemp,   "Camera");
     214  tlist.AddToList(&fillLVHum,    "Camera");
     215  tlist.AddToList(&fillLVStatus, "Camera");
     216  tlist.AddToList(&fillLVRPS,    "Camera");
    194217  tlist.AddToList(&fillTCenter,  "Camera");
    195218  tlist.AddToList(&fillTWall,    "Camera");
     
    220243 
    221244  tlist.PrintStatistics();
     245
     246  gStyle->SetPadGridX(kTRUE);
     247  gStyle->SetPadGridY(kTRUE);
    222248
    223249  //
     
    344370  // Camera report
    345371  //
    346   // HV and currents
     372  // HV and currents of power supplies
    347373  TCanvas &c2 = d->AddTab("HV");
    348374  c2->Divide(1,2);
    349375  c2->cd(1);
    350   // High voltages of the power supplies
     376  // High voltages
    351377  TLegend *legHV = new TLegend(0.85,0.75,0.99,0.99);
    352378  TGraph *g = hHVA.GetGraph();
     
    367393  legHV->DrawClone();
    368394  c2->cd(2);
    369   // Currents of power supplies
     395  // Currents
    370396  TLegend *legC = new TLegend(0.85,0.75,0.99,0.99);
    371397  TGraph *g = hCA.GetGraph();
     
    385411  hist->SetMinimum(0);
    386412  legC->DrawClone();
    387  
     413
     414  // LV power supplies
     415  TCanvas &c3 = d->AddTab("LV");
     416  c3->Divide(2,2);
     417  c3->cd(1);
     418  TGraph *g = hLVTemp.GetGraph();
     419  g->SetMarkerColor(2);
     420  g->SetLineColor(2);
     421  g->SetTitle("LV temperature");
     422  MHVsTime *clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew");
     423  TH1 *hist = clone1->GetGraph()->GetHistogram();
     424  hist->SetXTitle("Time");
     425  hist->SetYTitle("Temperature [\\circ]");
     426  c3->cd(2);
     427  TGraph *g = hLVHum.GetGraph();
     428  g->SetMarkerColor(4);
     429  g->SetLineColor(4);
     430  g->SetTitle("LV humidity");
     431  MHVsTime *clone1 = (MHVsTime*)hLVHum.DrawClone("nonew");
     432  TH1 *hist = clone1->GetGraph()->GetHistogram();
     433  hist->SetXTitle("Time");
     434  hist->SetYTitle("Humidity [%]");
     435  c3->cd(3);
     436  TGraph *g = hLVStatus.GetGraph();
     437  g->SetMarkerColor(8);
     438  g->SetLineColor(8);
     439  g->SetTitle("LV status");
     440  MHVsTime *clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew");
     441  TH1 *hist = clone1->GetGraph()->GetHistogram();
     442  hist->SetXTitle("Time");
     443  hist->SetYTitle("Status");
     444  c3->cd(4);
     445  TGraph *g = hLVRPS.GetGraph();
     446  g->SetMarkerColor(3);
     447  g->SetLineColor(3);
     448  g->SetTitle("LV request power supply");
     449  MHVsTime *clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew");
     450  TH1 *hist = clone1->GetGraph()->GetHistogram();
     451  hist->SetXTitle("Time");
     452  hist->SetYTitle("Request power supply");
     453  TAxis *axey = hist->GetYaxis();
     454  axey->Set(2, -0.5, 1.5);
     455  axey->SetBinLabel(axey->FindFixBin(0), "OFF");
     456  axey->SetBinLabel(axey->FindFixBin(1), "ON");
    388457  // Cooling
    389   TCanvas &c3 = d->AddTab("Cooling");
     458  TCanvas &c4 = d->AddTab("Cooling");
    390459  gStyle->SetPadGridX(kTRUE);
    391460  gStyle->SetPadGridY(kTRUE);
    392   c3->Divide(1,2);
    393   c3->cd(1);
     461  c4->Divide(1,2);
     462  c4->cd(1);
    394463  // Camera temperatures
    395464  TLegend *legtemp = new TLegend(0.85,0.75,0.99,0.99);
     
    421490  legtemp->DrawClone();
    422491  // Camera relative humidity
    423   c3->cd(2);
     492  c4->cd(2);
    424493  gPad->SetBorderMode(0);
    425494  gPad->Divide(2, 1);
     
    457526  // Trigger report
    458527  //
    459   TCanvas &c4 = d->AddTab("Trigger");
     528  TCanvas &c5 = d->AddTab("Trigger");
    460529  gStyle->SetPadGridX(kTRUE);
    461530  gStyle->SetPadGridY(kTRUE);
     
    481550  // CC report (Weather station)
    482551  //
    483   TCanvas &c5 = d->AddTab("Central Control");
    484   gStyle->SetPadGridX(kTRUE);
    485   gStyle->SetPadGridY(kTRUE);
    486   c5->Divide(2,2);
     552  TCanvas &c6 = d->AddTab("Central Control");
     553  c6->Divide(2,2);
    487554  // Relative humidity
    488   c5->cd(1);
     555  c6->cd(1);
    489556  TGraph *g = hCCHum.GetGraph();
    490557  g->SetMarkerStyle(kFullDotSmall);
     
    497564  hist->SetYTitle("Humidity [%]");
    498565  // Temperature
    499   c5->cd(2);
     566  c6->cd(2);
    500567  TGraph *g = hCCTemp.GetGraph();
    501568  g->SetMarkerStyle(kFullDotSmall);
     
    508575  hist->SetYTitle("Temperature [\\circ C]");
    509576  // Wind speed
    510   c5->cd(3);
     577  c6->cd(3);
    511578  TGraph *g = hCCWS.GetGraph();
    512579  g->SetMarkerStyle(kFullDotSmall);
     
    519586  hist->SetYTitle("Wind speed [km/h]");
    520587  // Solar radiation
    521   c5->cd(4);
     588  c6->cd(4);
    522589  TGraph *g = hCCSR.GetGraph();
    523590  g->SetMarkerStyle(kFullDotSmall);
     
    536603  if ((d = evtloop.GetDisplay()))
    537604    {
    538       TString file = filename.Remove(filename.Index("."),5);
     605      TString file;
     606      if (filename.Last('.')>0)
     607        file = filename(0, filename.Last('.'));
     608
     609//      TString file = filename.Remove(filename.Index("."),5);
    539610      // Save data in a postscriptfile (status.ps)
    540611      d->SaveAsPS(-1,Form("%s.ps",file));
Note: See TracChangeset for help on using the changeset viewer.