Index: trunk/MagicSoft/Mars/macros/CCDataCheck.C
===================================================================
--- trunk/MagicSoft/Mars/macros/CCDataCheck.C	(revision 2888)
+++ trunk/MagicSoft/Mars/macros/CCDataCheck.C	(revision 2895)
@@ -26,8 +26,9 @@
 // It displays 5 tabs:
 //   - Drive system
-//   - Power supplies
+//   - HV power supplies
+//   - LV power supplies
 //   - Cooling system
 //   - Trigger
-//   - Weather station (?)
+//   - Weather station
 //
 ////////////////////////////////////////////////////////////////////////////
@@ -63,5 +64,5 @@
   MHVsTime hDState("MReportDrive.fState");
   hDState.SetName("State");
-  // Power supplies
+  // HV power supplies
   MHVsTime hHVA("MCameraHV.fVoltageA");
   hHVA.SetName("HVA");
@@ -72,4 +73,13 @@
   MHVsTime hCB("MCameraHV.fCurrentB");
   hCB.SetName("CB");
+  // LV power supplies
+  MHVsTime hLVTemp("MCameraLV.fTemp");
+  hLVTemp.SetName("LVTemp");
+  MHVsTime hLVHum("MCameraLV.fHumidity");
+  hLVHum.SetName("LVHum");
+  MHVsTime hLVStatus("MCameraHV.fStatus");
+  hLVStatus.SetName("LVStatus");
+  MHVsTime hLVRPS("MCameraLV.fRequestPowerSupply");
+  hLVRPS.SetName("LVRPS");
   // Cooling system
   MHVsTime hTCenter("MCameraCooling.fTempCenter");
@@ -109,4 +119,5 @@
   read.AddToBranchList("MReportDrive.*");
   read.AddToBranchList("MCameraHV.*");
+  read.AddToBranchList("MCameraLV.*");
   read.AddToBranchList("MCameraCooling.*");
   read.AddToBranchList("MReportCC.*");
@@ -143,4 +154,8 @@
   MFillH fillCA(&hCA,             "MTimeCamera");
   MFillH fillCB(&hCB,             "MTimeCamera");
+  MFillH fillLVTemp(&hLVTemp,     "MTimeCamera");
+  MFillH fillLVHum(&hLVHum,       "MTimeCamera");
+  MFillH fillLVStatus(&hLVStatus, "MTimeCamera");
+  MFillH fillLVRPS(&hLVRPS,       "MTimeCamera");
   MFillH fillTCenter(&hTCenter,   "MTimeCamera");
   MFillH fillTWall(&hTWall,       "MTimeCamera");
@@ -167,4 +182,8 @@
   fillCA.SetBit(MFillH::kDoNotDisplay);
   fillCB.SetBit(MFillH::kDoNotDisplay);
+  fillLVTemp.SetBit(MFillH::kDoNotDisplay);
+  fillLVHum.SetBit(MFillH::kDoNotDisplay);
+  fillLVStatus.SetBit(MFillH::kDoNotDisplay);
+  fillLVRPS.SetBit(MFillH::kDoNotDisplay);
   fillTCenter.SetBit(MFillH::kDoNotDisplay);
   fillTWall.SetBit(MFillH::kDoNotDisplay);
@@ -187,9 +206,13 @@
   tlist.AddToList(&fillError,    "Drive");
   tlist.AddToList(&fillDState,   "Drive");
-  tlist.AddToList(&fillError2,    "Drive");
+  tlist.AddToList(&fillError2,   "Drive");
   tlist.AddToList(&fillHVA,      "Camera");
   tlist.AddToList(&fillHVB,      "Camera");
   tlist.AddToList(&fillCA,       "Camera");
   tlist.AddToList(&fillCB,       "Camera");
+  tlist.AddToList(&fillLVTemp,   "Camera");
+  tlist.AddToList(&fillLVHum,    "Camera");
+  tlist.AddToList(&fillLVStatus, "Camera");
+  tlist.AddToList(&fillLVRPS,    "Camera");
   tlist.AddToList(&fillTCenter,  "Camera");
   tlist.AddToList(&fillTWall,    "Camera");
@@ -220,4 +243,7 @@
  
   tlist.PrintStatistics();
+
+  gStyle->SetPadGridX(kTRUE);
+  gStyle->SetPadGridY(kTRUE);
 
   //
@@ -344,9 +370,9 @@
   // Camera report 
   // 
-  // HV and currents
+  // HV and currents of power supplies
   TCanvas &c2 = d->AddTab("HV");
   c2->Divide(1,2);
   c2->cd(1);
-  // High voltages of the power supplies
+  // High voltages 
   TLegend *legHV = new TLegend(0.85,0.75,0.99,0.99);
   TGraph *g = hHVA.GetGraph();
@@ -367,5 +393,5 @@
   legHV->DrawClone();
   c2->cd(2);
-  // Currents of power supplies
+  // Currents 
   TLegend *legC = new TLegend(0.85,0.75,0.99,0.99);
   TGraph *g = hCA.GetGraph();
@@ -385,11 +411,54 @@
   hist->SetMinimum(0);
   legC->DrawClone();
-  
+
+  // LV power supplies
+  TCanvas &c3 = d->AddTab("LV");
+  c3->Divide(2,2);
+  c3->cd(1);
+  TGraph *g = hLVTemp.GetGraph();
+  g->SetMarkerColor(2);
+  g->SetLineColor(2);
+  g->SetTitle("LV temperature");
+  MHVsTime *clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew");
+  TH1 *hist = clone1->GetGraph()->GetHistogram();
+  hist->SetXTitle("Time");
+  hist->SetYTitle("Temperature [\\circ]");
+  c3->cd(2);
+  TGraph *g = hLVHum.GetGraph();
+  g->SetMarkerColor(4);
+  g->SetLineColor(4);
+  g->SetTitle("LV humidity");
+  MHVsTime *clone1 = (MHVsTime*)hLVHum.DrawClone("nonew");
+  TH1 *hist = clone1->GetGraph()->GetHistogram();
+  hist->SetXTitle("Time");
+  hist->SetYTitle("Humidity [%]");
+  c3->cd(3);
+  TGraph *g = hLVStatus.GetGraph();
+  g->SetMarkerColor(8);
+  g->SetLineColor(8);
+  g->SetTitle("LV status");
+  MHVsTime *clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew");
+  TH1 *hist = clone1->GetGraph()->GetHistogram();
+  hist->SetXTitle("Time");
+  hist->SetYTitle("Status");
+  c3->cd(4);
+  TGraph *g = hLVRPS.GetGraph();
+  g->SetMarkerColor(3);
+  g->SetLineColor(3);
+  g->SetTitle("LV request power supply");
+  MHVsTime *clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew");
+  TH1 *hist = clone1->GetGraph()->GetHistogram();
+  hist->SetXTitle("Time");
+  hist->SetYTitle("Request power supply");
+  TAxis *axey = hist->GetYaxis();
+  axey->Set(2, -0.5, 1.5);
+  axey->SetBinLabel(axey->FindFixBin(0), "OFF");
+  axey->SetBinLabel(axey->FindFixBin(1), "ON");
   // Cooling
-  TCanvas &c3 = d->AddTab("Cooling");
+  TCanvas &c4 = d->AddTab("Cooling");
   gStyle->SetPadGridX(kTRUE);
   gStyle->SetPadGridY(kTRUE);
-  c3->Divide(1,2);
-  c3->cd(1);
+  c4->Divide(1,2);
+  c4->cd(1);
   // Camera temperatures
   TLegend *legtemp = new TLegend(0.85,0.75,0.99,0.99);
@@ -421,5 +490,5 @@
   legtemp->DrawClone();
   // Camera relative humidity
-  c3->cd(2);
+  c4->cd(2);
   gPad->SetBorderMode(0);
   gPad->Divide(2, 1);
@@ -457,5 +526,5 @@
   // Trigger report
   //
-  TCanvas &c4 = d->AddTab("Trigger");
+  TCanvas &c5 = d->AddTab("Trigger");
   gStyle->SetPadGridX(kTRUE);
   gStyle->SetPadGridY(kTRUE);
@@ -481,10 +550,8 @@
   // CC report (Weather station)
   //
-  TCanvas &c5 = d->AddTab("Central Control");
-  gStyle->SetPadGridX(kTRUE);
-  gStyle->SetPadGridY(kTRUE);
-  c5->Divide(2,2);
+  TCanvas &c6 = d->AddTab("Central Control");
+  c6->Divide(2,2);
   // Relative humidity
-  c5->cd(1);
+  c6->cd(1);
   TGraph *g = hCCHum.GetGraph();
   g->SetMarkerStyle(kFullDotSmall);
@@ -497,5 +564,5 @@
   hist->SetYTitle("Humidity [%]"); 
   // Temperature
-  c5->cd(2);
+  c6->cd(2);
   TGraph *g = hCCTemp.GetGraph();
   g->SetMarkerStyle(kFullDotSmall);
@@ -508,5 +575,5 @@
   hist->SetYTitle("Temperature [\\circ C]"); 
   // Wind speed
-  c5->cd(3);
+  c6->cd(3);
   TGraph *g = hCCWS.GetGraph();
   g->SetMarkerStyle(kFullDotSmall);
@@ -519,5 +586,5 @@
   hist->SetYTitle("Wind speed [km/h]"); 
   // Solar radiation
-  c5->cd(4);
+  c6->cd(4);
   TGraph *g = hCCSR.GetGraph();
   g->SetMarkerStyle(kFullDotSmall);
@@ -536,5 +603,9 @@
   if ((d = evtloop.GetDisplay()))
     {
-      TString file = filename.Remove(filename.Index("."),5);
+      TString file;
+      if (filename.Last('.')>0)
+	file = filename(0, filename.Last('.')); 
+
+//  	TString file = filename.Remove(filename.Index("."),5);
       // Save data in a postscriptfile (status.ps)
       d->SaveAsPS(-1,Form("%s.ps",file));
