TMulticanvas.cxx

Go to the documentation of this file.
00001 #include "TMulticanvas.h"
00002 
00003 
00004 TMulticanvas::TMulticanvas(std::string CanvasName): TCanvasHandleBase(CanvasName.c_str()){
00005 
00006   for(int i = 0; i < gMaxSubCanvasesMuCa; i++){
00007                 fHasHistoSingle[i] = false;
00008                 fHasHisto2D[i] = false;
00009                 fHasGraphSingle[i] = false;
00010     fSummaryHistoSingle[i] = 0;
00011     fSummaryHisto2D[i] = 0;
00012     fSummaryGraphSingle[i] = 0;      
00013   }
00014 
00015 };
00016 
00017 
00018 /// Plot the histograms for this canvas for a particular index; 
00019 /// this is the function that user must provide.
00020 void TMulticanvas::PlotCanvas(TDataContainer& dataContainer, TRootEmbeddedCanvas *embedCanvas){
00021   
00022   TCanvas* c1 = embedCanvas->GetCanvas();
00023   c1->Clear();
00024   c1->Divide(2,2);
00025   for(int i = 0; i < gMaxSubCanvasesMuCa; i++){
00026 
00027     c1->cd(i+1);
00028 
00029     // Try plotting the histogram, then the graph.
00030 
00031     if(fHasHistoSingle[i]){
00032       fSummaryHistoSingle[i]->Draw();      
00033     }else if(fHasHisto2D[i]){
00034       fSummaryHisto2D[i]->Draw("COLZ");
00035     }else if(fHasGraphSingle[i]){
00036       fSummaryGraphSingle[i]->Draw("AP*");
00037       fSummaryGraphSingle[i]->SetMarkerStyle(20);
00038     }
00039 
00040   }
00041 
00042   //fSumm[index]->Draw();
00043   
00044   
00045   c1->Modified();
00046   c1->Update();
00047 
00048 }
00049 
00050 
00051 

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1