Ignore:
Timestamp:
08/16/02 08:58:34 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r1483 r1502  
    130130    fHName = hist;
    131131    fParContainerName = par;
     132
     133    if (title)
     134        return;
     135
     136    fTitle = "Fill " + fHName;
     137    if (!par)
     138        return;
     139
     140    fTitle += " from " + fParContainerName;
    132141}
    133142
     
    163172    fParContainer = par;
    164173    fParContainerName = par->GetName();
     174
     175    if (!title)
     176        fTitle = "Fill " + fHName + " from " + par->GetDescriptor();
    165177}
    166178
     
    181193    fHName = hist->GetName();
    182194    fParContainerName = par;
     195
     196    if (title)
     197        return;
     198
     199    fTitle = (TString)"Fill " + hist->GetDescriptor();
     200    if (!par)
     201        return;
     202
     203    fTitle += " from " + fParContainerName;
    183204}
    184205
     
    200221    fParContainer = par;
    201222    fParContainerName = par->GetName();
     223
     224    if (!title)
     225        fTitle = (TString)"Fill " + hist->GetDescriptor() + " from " + par->GetDescriptor();
    202226}
    203227
  • trunk/MagicSoft/Mars/mhist/MHHillas.cc

    r1489 r1502  
    4141#include <TStyle.h>
    4242#include <TCanvas.h>
     43#include <TLegend.h>
    4344
    4445#include "MLog.h"
     
    7374    fUsedPix = new TH1F("UsedPix", "Number of used pixels",           150,   0, 150);
    7475    fCorePix = new TH1F("CorePix", "Number of core pixels",           150,   0, 150);
     76
     77    fLength->SetLineColor(kBlue);
     78    fCorePix->SetLineColor(kRed);
     79    fUsedPix->SetLineColor(kGreen);
    7580
    7681    fLength->SetDirectory(NULL);
     
    290295
    291296    c->cd(1);
    292     fWidth->DrawCopy();
    293     fLength->SetLineColor(kBlue);
    294     fLength->DrawCopy("same");
     297
     298    TObject *obj;
     299    TLegend *l = new TLegend(0.75, 0.8, 0.9, 0.9);
     300    obj = fWidth->DrawCopy();
     301    ((TH1*)obj)->SetTitle(" Width / Length ");
     302    l->AddEntry(obj, "Width");
     303    obj = fLength->DrawCopy("same");
     304    l->AddEntry(obj,  "Length");
     305    l->SetBit(kCanDelete);
     306    l->Draw();
    295307
    296308    c->cd(2);
     
    299311
    300312    c->cd(3);
    301     fCorePix->SetLineColor(kRed);
    302     fCorePix->DrawCopy();
    303     fUsedPix->SetLineColor(kGreen);
    304     fUsedPix->DrawCopy("same");
     313    l = new TLegend(0.70, 0.8, 0.9, 0.9);
     314    obj = fCorePix->DrawCopy();
     315    ((TH1*)obj)->SetTitle(" Number of core/used Pixels ");
     316    l->AddEntry(obj, "# Core Pixels");
     317    obj = fUsedPix->DrawCopy("same");
     318    l->AddEntry(obj,  "# Used Pixels");
     319    l->SetBit(kCanDelete);
     320    l->Draw();
    305321
    306322    c->cd(4);
     
    335351    gPad->cd(1);
    336352    fWidth->Draw();
    337     fLength->SetLineColor(kBlue);
    338353    fLength->Draw("same");
    339354
     
    343358
    344359    gPad->cd(3);
    345     fCorePix->SetLineColor(kRed);
    346360    fCorePix->Draw();
    347     fUsedPix->SetLineColor(kGreen);
    348361    fUsedPix->Draw("same");
    349362
  • trunk/MagicSoft/Mars/mhist/MHHillasExt.cc

    r1490 r1502  
    3737#include <TH1.h>
    3838#include <TPad.h>
     39#include <TLegend.h>
    3940#include <TCanvas.h>
    4041
     
    259260    gROOT->SetSelectedPad(NULL);
    260261
    261 
    262262    c.cd(1);
    263     ((TH1F)fHConc1).DrawCopy();
    264     ((TH1F)fHConc).DrawCopy("same");
     263    TObject *obj;
     264    TLegend *l = new TLegend(0.75, 0.8, 0.9, 0.9);
     265    obj = ((TH1F)fHConc1).DrawCopy();
     266    ((TH1*)obj)->SetTitle(" Concentrations ");
     267    l->AddEntry(obj, "Conc1");
     268    obj = ((TH1F)fHConc).DrawCopy("same");
     269    l->AddEntry(obj,  "Conc2");
     270    l->SetBit(kCanDelete);
     271    l->Draw();
    265272
    266273    c.cd(2);
     
    293300
    294301    gPad->cd(1);
    295     fHConc1.SetLineColor(kBlue);
    296302    fHConc1.Draw();
    297303    fHConc.Draw("same");
    298304
     305    TLegend *l = new TLegend(0.75, 0.8, 0.9, 0.9);
     306    l->AddEntry((TH1*)&fHConc1, "Conc 1");
     307    l->AddEntry((TH1*)&fHConc,  "Conc");
     308    l->SetBit(kCanDelete);
     309    l->Draw();
     310
    299311    gPad->cd(2);
    300312    fHAsym.Draw();
Note: See TracChangeset for help on using the changeset viewer.