ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/analysis/Layout.cpp
(Generate patch)

Comparing UserCode/IPHCalignment2/analysis/Layout.cpp (file contents):
Revision 1.5 by econte, Mon Nov 28 16:14:23 2011 UTC vs.
Revision 1.9 by cgoetzma, Thu Dec 1 13:46:25 2011 UTC

# Line 17 | Line 17 | void Layout::DrawInit()
17    gStyle->SetFrameBorderMode(0);
18    gStyle->SetFrameBorderSize(0);
19    gStyle->SetFrameFillColor(0);
20 <  gStyle->SetOptStat(0);
20 >  //  gStyle->SetOptStat(0);
21  
22    gStyle->SetLabelOffset(0.005,"X");
23    gStyle->SetLabelSize(0.03,"X");
# Line 75 | Line 75 | void Layout::DrawInit()
75   }
76  
77  
78 < void Layout::Draw(const std::vector<HistoBlock>& histos,
78 > void Layout::Draw(const std::string title, const std::vector<HistoBlock>& histos,
79                    const std::string& xlabel, bool fit, float K, float MU, float SIG)
80   {
81    std::cout << "----------------- Draw : " << histos[0].histo->GetName() << std::endl;
# Line 87 | Line 87 | void Layout::Draw(const std::vector<Hist
87    TCanvas* mycanvas = new TCanvas((std::string(histos[0].histo->GetName())+
88                                    "_canvas").c_str(),
89                                    histos[0].histo->GetTitle());
90
90    // SetLineColor
91    for (unsigned int i=0;i<histos.size();i++)
92    {
# Line 109 | Line 108 | void Layout::Draw(const std::vector<Hist
108    float xmax = mystack->GetXaxis()->GetXmin();
109  
110    // Draw legend
111 <  TLegend* mylegend = new TLegend(0.40,0.85-(0.04*histos.size()),0.90,0.85);
111 >  TLegend* mylegend = new TLegend(0.55,0.90-(0.04*histos.size()),0.90,0.90);
112    mylegend->SetFillColor(0);
113    for (unsigned int i=0;i<histos.size();i++)
114    {
# Line 154 | Line 153 | void Layout::Draw(const std::vector<Hist
153    }
154  
155    // Save
156 <  std::string filename = GetFileName(histos[0].histo->GetTitle());
156 >  std::string filename = GetFileName(title);
157    mycanvas->SaveAs((filename+".gif").c_str());
158    mycanvas->SaveAs((filename+".root").c_str());
159  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines