AliPhysics  9c66e61 (9c66e61)
SummaryDrawer Class Reference
Inheritance diagram for SummaryDrawer:

Classes

struct  DividedPad
 

Public Types

enum  {
  kLogx = 0x1, kLogy = 0x2, kLogz = 0x4, kLegend = 0x10,
  kGridx = 0x100, kGridy = 0x200, kGridz = 0x400, kSilent = 0x800,
  kNorth = 0x1000, kMiddle = 0x2000, kSouth = 0x3000, kEast = 0x10000,
  kCenter = 0x20000, kWest = 0x30000
}
 
enum  { kLandscape = 0x100, kPause = 0x200 }
 

Public Member Functions

 SummaryDrawer ()
 
virtual ~SummaryDrawer ()
 

Protected Member Functions

TLegend * DrawRingLegend (TVirtualPad *p, UInt_t flags)
 
void ClearCanvas ()
 
void CreateCanvas (const TString &pname, Bool_t landscape=false, Bool_t pdf=true, Bool_t useTop=true)
 
void CloseCanvas ()
 
void PrintCanvas (const TString &title, Float_t size=.7)
 
void MakeChapter (const TString &title)
 
TObjectDrawInPad (TVirtualPad *c, Int_t padNo, TObject *h, Option_t *opts="", UInt_t flags=0x0, const char *title="")
 
virtual TObjectDrawObjClone (TObject *o, Option_t *options, const char *title)
 
virtual TObjectDrawObjClone (THStack *o, Option_t *options, const char *title)
 
virtual TObjectDrawObjClone (TH1 *o, Option_t *options, const char *title)
 
TLegend * MakeLegend (TVirtualPad *p, UInt_t flags, Bool_t autoFill)
 
TObjectDrawInPad (TVirtualPad *p, TObject *h, Option_t *opts="", UInt_t flags=0x0, const char *title="")
 
void DrawTwoInPad (TVirtualPad *c, Int_t padNo, TH1 *h1, TH1 *h2, Option_t *opts="", UShort_t flags=0x0)
 
void DrawParameter (Double_t &y, const TString &name, const TString &value, Double_t size=0)
 
template<typename T >
void DrawTParameter (Double_t &y, TList *list, const TString &name)
 
void DivideForRings (Bool_t commonX, Bool_t commonY)
 
TVirtualPad * RingPad (UShort_t d, Char_t r) const
 
TVirtualPad * RingPad (const char *name) const
 
void DrawInRingPad (UShort_t d, Char_t r, TObject *h, Option_t *opts="", UShort_t flags=0x0, const char *title="")
 
void DrawInRingPad (const char *name, TObject *h, Option_t *opts="", UShort_t flags=0x0, const char *title="")
 
void DrawInRingPad (TObject *h, Option_t *opts="", UShort_t flags=0x0, const char *title="")
 
void Pause ()
 
virtual void DrawEventInspector (TCollection *parent)
 
virtual void DrawESDFixer (TCollection *parent)
 
void DrawTrackDensity (TCollection *parent, const char *folderName="mcTrackDensity")
 

Static Protected Member Functions

static const Char_t ** GetRingNames (Bool_t lower=false)
 
static Color_t RingColor (UShort_t d, Char_t r)
 
static void SysString (UShort_t sys, TString &str)
 
static void SNNString (UShort_t sNN, TString &str)
 
static void AppendAnd (TString &trg, const TString &what)
 
static void TriggerString (ULong_t trigger, TString &str)
 
static TObjectGetObject (const TObject *parent, const TString &name, Bool_t verb=true)
 
static Bool_t CheckType (const TObject *o, const TClass *cl, const TString &src)
 
template<typename T >
static TDoGetObject (TObject *o, const TObject *p)
 
template<typename T >
static Bool_t DoGetParameter (TObject *o, const TObject *p, T &value)
 
static Bool_t GetParameter (const TObject *c, const TString &name, Short_t &value, Bool_t verb=true)
 
static Bool_t GetParameter (const TObject *c, const TString &name, UShort_t &value, Bool_t verb=true)
 
static Bool_t GetParameter (const TObject *c, const TString &name, ULong_t &value, Bool_t verb=true)
 
static Bool_t GetParameter (const TObject *c, const TString &name, Int_t &value, Bool_t verb=true)
 
static Bool_t GetParameter (const TObject *c, const TString &name, Double_t &value, Bool_t verb=true)
 
static Bool_t GetParameter (const TObject *c, const TString &name, Bool_t &value, Bool_t verb=true)
 
static TCollectionGetCollection (const TObject *parent, const TString &name, Bool_t verb=true)
 
static TH1GetH1 (const TObject *parent, const TString &name, Bool_t verb=true)
 
static TH2GetH2 (const TObject *parent, const TString &name, Bool_t verb=true)
 
static TH3GetH3 (const TCollection *parent, const TString &name, Bool_t verb=true)
 
static THStack * GetStack (const TObject *parent, const TString &name, const char *sub=0, Bool_t verb=true)
 
static void GetLegendPosition (UInt_t flags, TVirtualPad *p, Double_t &x1, Double_t &y1, Double_t &x2, Double_t &y2)
 
static void CompileScript (const TString &name, const TString &sub, const TString &check, Bool_t force)
 

Protected Attributes

TCanvas * fCanvas
 
TPad * fTop
 
TPad * fBody
 
TLatex * fHeader
 
TLatex * fParName
 
TLatex * fParVal
 
Bool_t fPause
 
Bool_t fLandscape
 
TVirtualPad ** fRingMap
 
Bool_t fPDF
 
TString fLastTitle
 

Detailed Description

Base class for summary drawers

Definition at line 55 of file SummaryDrawer.C.

Member Enumeration Documentation

anonymous enum
Enumerator
kLogx 
kLogy 
kLogz 
kLegend 
kGridx 
kGridy 
kGridz 
kSilent 
kNorth 
kMiddle 
kSouth 
kEast 
kCenter 
kWest 

Definition at line 58 of file SummaryDrawer.C.

anonymous enum
Enumerator
kLandscape 
kPause 

Definition at line 74 of file SummaryDrawer.C.

Constructor & Destructor Documentation

SummaryDrawer::SummaryDrawer ( )
inline

Definition at line 78 of file SummaryDrawer.C.

virtual SummaryDrawer::~SummaryDrawer ( )
inlinevirtual

Definition at line 99 of file SummaryDrawer.C.

Member Function Documentation

static void SummaryDrawer::AppendAnd ( TString trg,
const TString what 
)
inlinestaticprotected

Append an & to a string and the next term.

Parameters
trgOutput string
whatTerm

Definition at line 174 of file SummaryDrawer.C.

Referenced by TriggerString().

static Bool_t SummaryDrawer::CheckType ( const TObject o,
const TClass *  cl,
const TString src 
)
inlinestaticprotected

Check the type of a found object

Parameters
oObject
clClass
srcSource of object
Returns
true on success, false otherwise

Definition at line 282 of file SummaryDrawer.C.

Referenced by DoGetObject().

void SummaryDrawer::ClearCanvas ( )
inlineprotected

Clear canvas

Definition at line 568 of file SummaryDrawer.C.

Referenced by CorrDrawer::DrawIt(), and PrintCanvas().

static void SummaryDrawer::CompileScript ( const TString name,
const TString sub,
const TString check,
Bool_t  force 
)
inlinestaticprotected

Definition at line 1459 of file SummaryDrawer.C.

void SummaryDrawer::CreateCanvas ( const TString pname,
Bool_t  landscape = false,
Bool_t  pdf = true,
Bool_t  useTop = true 
)
inlineprotected
template<typename T >
static T* SummaryDrawer::DoGetObject ( TObject o,
const TObject p 
)
inlinestaticprotected

Check a possibly returned object.

Parameters
oObject found - if any
pParent of object
Returns
A pointer to the object cast to the right type

Definition at line 304 of file SummaryDrawer.C.

template<typename T >
static Bool_t SummaryDrawer::DoGetParameter ( TObject o,
const TObject p,
T value 
)
inlinestaticprotected

Check a returned parameter from a parent

Parameters
oPossibly found object
pParent object
valueValue
Returns
true on success, false otherwise

Definition at line 321 of file SummaryDrawer.C.

Referenced by GetParameter().

virtual void SummaryDrawer::DrawESDFixer ( TCollection parent)
inlineprotectedvirtual

Definition at line 1667 of file SummaryDrawer.C.

Referenced by SummaryAODDrawer::Run().

virtual void SummaryDrawer::DrawEventInspector ( TCollection parent)
inlineprotectedvirtual
TObject* SummaryDrawer::DrawInPad ( TVirtualPad *  p,
TObject h,
Option_t opts = "",
UInt_t  flags = 0x0,
const char *  title = "" 
)
inlineprotected

Draw an object in pad

Parameters
pPad
hObject to draw
optsOptions
flagsFlags
titleTitle on plot
Returns
Drawn object - if any

Definition at line 946 of file SummaryDrawer.C.

void SummaryDrawer::DrawInRingPad ( UShort_t  d,
Char_t  r,
TObject h,
Option_t opts = "",
UShort_t  flags = 0x0,
const char *  title = "" 
)
inlineprotected
void SummaryDrawer::DrawInRingPad ( const char *  name,
TObject h,
Option_t opts = "",
UShort_t  flags = 0x0,
const char *  title = "" 
)
inlineprotected

Draw object in a ring pad

Parameters
nameName of ring
hObject to draw
optsOptions
flagsFlags
titlePossible new title

Definition at line 1405 of file SummaryDrawer.C.

void SummaryDrawer::DrawInRingPad ( TObject h,
Option_t opts = "",
UShort_t  flags = 0x0,
const char *  title = "" 
)
inlineprotected

Draw object in a ring pad. Which pad to draw in depends on the name or title of the drawn object (must contain the ring name as a sub-string).

Parameters
hObject to draw
optsOptions
flagsFlags
titlePossible new title

Definition at line 1428 of file SummaryDrawer.C.

virtual TObject* SummaryDrawer::DrawObjClone ( TObject o,
Option_t options,
const char *  title 
)
inlineprotectedvirtual

Draw a clone of an object

Parameters
oObject
optionsDraw options
titleTitle of object
Returns
Drawn object - if any

Definition at line 809 of file SummaryDrawer.C.

Referenced by DrawInPad().

virtual TObject* SummaryDrawer::DrawObjClone ( THStack *  o,
Option_t options,
const char *  title 
)
inlineprotectedvirtual

Draw an object clone

Parameters
oStack object
optionsDraw options
titleTitle on plot
Returns
Drawn object - if any

Definition at line 831 of file SummaryDrawer.C.

virtual TObject* SummaryDrawer::DrawObjClone ( TH1 o,
Option_t options,
const char *  title 
)
inlineprotectedvirtual

Draw an object clone

Parameters
oHistogram
optionsDraw options
titleTitle on plot
Returns
Drawn object - if any

Definition at line 871 of file SummaryDrawer.C.

TLegend* SummaryDrawer::DrawRingLegend ( TVirtualPad *  p,
UInt_t  flags 
)
inlineprotected

Definition at line 132 of file SummaryDrawer.C.

Referenced by MultCutDrawer::Run().

template<typename T >
void SummaryDrawer::DrawTParameter ( Double_t y,
TList list,
const TString name 
)
inlineprotected

Definition at line 1098 of file SummaryDrawer.C.

void SummaryDrawer::DrawTrackDensity ( TCollection parent,
const char *  folderName = "mcTrackDensity" 
)
inlineprotected
void SummaryDrawer::DrawTwoInPad ( TVirtualPad *  c,
Int_t  padNo,
TH1 h1,
TH1 h2,
Option_t opts = "",
UShort_t  flags = 0x0 
)
inlineprotected

Draw two graphs in the same frame, but with separate y-axis

Parameters
cMother pad
padNoSub-pad number (0 is self)
h1First histogram
h2Second histogram
optsOptions
flagsFlags

Definition at line 1002 of file SummaryDrawer.C.

Referenced by DrawEventInspector().

static TCollection* SummaryDrawer::GetCollection ( const TObject parent,
const TString name,
Bool_t  verb = true 
)
inlinestaticprotected
static TH3* SummaryDrawer::GetH3 ( const TCollection parent,
const TString name,
Bool_t  verb = true 
)
inlinestaticprotected

Get a 2D histogram from a collection

Parameters
parentParent collection
nameName of histogram
verbIf true and not found, complain
Returns
pointer or null

Definition at line 502 of file SummaryDrawer.C.

Referenced by SummaryAODDrawer::DrawHistCollector().

static void SummaryDrawer::GetLegendPosition ( UInt_t  flags,
TVirtualPad *  p,
Double_t x1,
Double_t y1,
Double_t x2,
Double_t y2 
)
inlinestaticprotected

Definition at line 878 of file SummaryDrawer.C.

Referenced by MakeLegend().

static Bool_t SummaryDrawer::GetParameter ( const TObject c,
const TString name,
UShort_t value,
Bool_t  verb = true 
)
inlinestaticprotected

Get a UShort_t parameter value

Parameters
cParent collection
nameName of parameter
valueOn return the value
verbIf true, complain if not found

Definition at line 370 of file SummaryDrawer.C.

static Bool_t SummaryDrawer::GetParameter ( const TObject c,
const TString name,
ULong_t value,
Bool_t  verb = true 
)
inlinestaticprotected

Get a ULong_t parameter value

Parameters
cParent collection
nameName of parameter
valueOn return the value
verbIf true, complain if not found

Definition at line 389 of file SummaryDrawer.C.

static Bool_t SummaryDrawer::GetParameter ( const TObject c,
const TString name,
Int_t value,
Bool_t  verb = true 
)
inlinestaticprotected

Get a Int_t parameter value

Parameters
cParent collection
nameName of parameter
valueOn return the value
verbIf true, complain if not found

Definition at line 408 of file SummaryDrawer.C.

Bool_t SummaryDrawer::GetParameter ( const TObject c,
const TString name,
Double_t value,
Bool_t  verb = true 
)
inlinestaticprotected

Get a Double_t parameter value

Parameters
cParent collection
nameName of parameter
valueOn return the value
verbIf true, complain if not found

Definition at line 1760 of file SummaryDrawer.C.

static Bool_t SummaryDrawer::GetParameter ( const TObject c,
const TString name,
Bool_t value,
Bool_t  verb = true 
)
inlinestaticprotected

Get a Bool_t parameter value

Parameters
cParent collection
nameName of parameter
valueOn return the value
verbIf true, complain if not found

Definition at line 437 of file SummaryDrawer.C.

static const Char_t** SummaryDrawer::GetRingNames ( Bool_t  lower = false)
inlinestaticprotected

Get null terminated array of ring names

Parameters
lowerIf true, return in the form FMD[1-3][io], otherwise in the form FMD[1-3][IO]
Returns
Null terminated array of ring names

Definition at line 111 of file SummaryDrawer.C.

Referenced by SummaryAODDrawer::DrawCorrector(), SummaryAODDrawer::DrawDensityCalculator(), SummaryMCTrackDrawer::DrawELossFits(), SummaryAODDrawer::DrawHistCollector(), SummaryAODDrawer::DrawResults(), SummaryAODDrawer::DrawSharingFilter(), GetStack(), and SummaryAODDrawer::SummarizeSharing().

static THStack* SummaryDrawer::GetStack ( const TObject parent,
const TString name,
const char *  sub = 0,
Bool_t  verb = true 
)
inlinestaticprotected

Get a histogram stack from a collection

Parameters
parentParent collection
nameName of histogram
subIf set, fill from sub-component
verbIf true and not found, complain
Returns
pointer or null

Definition at line 521 of file SummaryDrawer.C.

Referenced by SummarydNdetaDrawer::DrawRes(), SummaryMultDistsDrawer::DrawResCollection(), SummaryUnfoldedDrawer::DrawResults(), SummaryAODDrawer::DrawResults(), SummaryAODDrawer::DrawSteps(), and SummaryUnfoldedDrawer::ProcessBin().

void SummaryDrawer::MakeChapter ( const TString title)
inlineprotected

Make a chapter page

Parameters
titleTitle

Definition at line 762 of file SummaryDrawer.C.

Referenced by SummaryUnfoldedDrawer::ProcessType(), SummaryMCCorrDrawer::Run(), Trend::Run(), and SummaryAODDrawer::Run().

TLegend* SummaryDrawer::MakeLegend ( TVirtualPad *  p,
UInt_t  flags,
Bool_t  autoFill 
)
inlineprotected

Make a legend

Parameters
p
flags
autoFill
Returns

Definition at line 915 of file SummaryDrawer.C.

Referenced by Trend::BuildCentLegend(), Trend::BuildCutLegend(), DrawInPad(), DrawRingLegend(), and DrawTwoInPad().

void SummaryDrawer::Pause ( )
inlineprotected

Pause after each plot

Definition at line 1452 of file SummaryDrawer.C.

Referenced by PrintCanvas().

void SummaryDrawer::PrintCanvas ( const TString title,
Float_t  size = .7 
)
inlineprotected

Print the canvas

Parameters
titleTitle
sizeSize of text

Definition at line 723 of file SummaryDrawer.C.

Referenced by SummaryMCTrackDrawer::DrawBetaGammadEdx(), SummarydNdetaDrawer::DrawBoth(), SummaryAODDrawer::DrawBoth(), SummaryAODDrawer::DrawCentral(), SummaryAODDrawer::DrawCentralResults(), SummarydNdetaDrawer::DrawCentRes(), SummarydNdetaDrawer::DrawCentResDetails(), SummarydNdetaDrawer::DrawCentSum(), SummaryAODDrawer::DrawCorrector(), SummaryAODDrawer::DrawDensityCalculator(), SummaryMCTrackDrawer::DrawELossFits(), CorrDrawer::DrawELossFits(), DrawESDFixer(), DrawEventInspector(), SummaryAODDrawer::DrawHistCollector(), CorrDrawer::DrawIt(), SummarydNdetaDrawer::DrawRes(), SummaryMultDistsDrawer::DrawResCollection(), SummaryUnfoldedDrawer::DrawResults(), SummaryMCCorrDrawer::DrawResults(), SummaryAODDrawer::DrawResults(), SummaryAODDrawer::DrawSharingFilter(), SummaryUnfoldedDrawer::DrawSteps(), SummaryAODDrawer::DrawSteps(), SummaryMultDistsDrawer::DrawSumCollection(), SummarydNdetaDrawer::DrawSums(), SummaryUnfoldedDrawer::DrawTitlePage(), SummaryMCCorrDrawer::DrawTitlePage(), SummarydNdetaDrawer::DrawTitlePage(), SummaryMultDistsDrawer::DrawTitlePage(), SummaryMCTrackDrawer::DrawTitlePage(), SummaryAODDrawer::DrawTitlePage(), DrawTrackDensity(), SummaryMCCorrDrawer::DrawVertexBins(), MultCutDrawer::Init(), Trend::LoopCuts(), MakeChapter(), Trend::NextFile(), SummaryUnfoldedDrawer::ProcessBin(), SummaryMultDistsDrawer::Run(), MultCutDrawer::Run(), CorrDrawer::Run(), SummaryAODDrawer::Run(), and SummaryAODDrawer::SummarizeSharing().

static Color_t SummaryDrawer::RingColor ( UShort_t  d,
Char_t  r 
)
inlinestaticprotected

Get the standard color for a ring

Parameters
dDetector
rRing
Returns

Definition at line 126 of file SummaryDrawer.C.

Referenced by SummaryAODDrawer::DrawCut(), SummaryMCCorrDrawer::DrawResults(), and DrawRingLegend().

TVirtualPad* SummaryDrawer::RingPad ( UShort_t  d,
Char_t  r 
) const
inlineprotected
TVirtualPad* SummaryDrawer::RingPad ( const char *  name) const
inlineprotected

Definition at line 1360 of file SummaryDrawer.C.

static void SummaryDrawer::TriggerString ( ULong_t  trigger,
TString str 
)
inlinestaticprotected

Bits of the trigger pattern

In-elastic collision

In-elastic collision with at least one SPD tracklet

Non-single diffractive collision

Empty bunch crossing

A-side trigger

B(arrel) trigger

C-side trigger

Empty trigger

pileup from SPD

true NSD from MC

Offline MB triggered

At least one SPD cluster

V0-AND trigger

Satellite event

Definition at line 180 of file SummaryDrawer.C.

Referenced by SummarydNdetaDrawer::DrawSums(), and SummaryMultDistsDrawer::DrawTitlePage().

Member Data Documentation

TPad* SummaryDrawer::fBody
protected

Definition at line 1736 of file SummaryDrawer.C.

Referenced by ClearCanvas(), CreateCanvas(), DivideForRings(), SummaryMCTrackDrawer::DrawBetaGammadEdx(), SummarydNdetaDrawer::DrawBoth(), SummaryAODDrawer::DrawBoth(), SummaryAODDrawer::DrawCentral(), SummaryAODDrawer::DrawCentralResults(), SummarydNdetaDrawer::DrawCentRes(), SummarydNdetaDrawer::DrawCentResDetails(), SummarydNdetaDrawer::DrawCentSum(), SummaryAODDrawer::DrawCorrector(), SummaryAODDrawer::DrawDensityCalculator(), SummaryMCTrackDrawer::DrawELossFits(), CorrDrawer::DrawELossFits(), DrawESDFixer(), DrawEventInspector(), SummaryAODDrawer::DrawHistCollector(), CorrDrawer::DrawIt(), SummarydNdetaDrawer::DrawRes(), SummaryMultDistsDrawer::DrawResCollection(), SummaryUnfoldedDrawer::DrawResults(), SummaryMCCorrDrawer::DrawResults(), SummaryAODDrawer::DrawResults(), SummaryAODDrawer::DrawSharingFilter(), SummaryUnfoldedDrawer::DrawSteps(), SummaryAODDrawer::DrawSteps(), SummaryMultDistsDrawer::DrawSumCollection(), SummarydNdetaDrawer::DrawSums(), SummaryUnfoldedDrawer::DrawTitlePage(), SummaryMCCorrDrawer::DrawTitlePage(), SummarydNdetaDrawer::DrawTitlePage(), SummaryMultDistsDrawer::DrawTitlePage(), SummaryMCTrackDrawer::DrawTitlePage(), SummaryAODDrawer::DrawTitlePage(), DrawTrackDensity(), SummaryMCCorrDrawer::DrawVertexBins(), CorrDrawer::DrawVtxStacks(), MultCutDrawer::Init(), Trend::LoopCuts(), MakeChapter(), Trend::NextFile(), SummaryUnfoldedDrawer::ProcessBin(), SummaryMultDistsDrawer::Run(), MultCutDrawer::Run(), CorrDrawer::Run(), and SummaryAODDrawer::Run().

TCanvas* SummaryDrawer::fCanvas
protected
TLatex* SummaryDrawer::fHeader
protected

Definition at line 1737 of file SummaryDrawer.C.

Referenced by CreateCanvas(), and PrintCanvas().

TString SummaryDrawer::fLastTitle
protected

Definition at line 1744 of file SummaryDrawer.C.

Referenced by CloseCanvas(), and PrintCanvas().

Bool_t SummaryDrawer::fPDF
protected

Definition at line 1743 of file SummaryDrawer.C.

Referenced by CloseCanvas(), CreateCanvas(), and PrintCanvas().

TVirtualPad** SummaryDrawer::fRingMap
protected

Definition at line 1742 of file SummaryDrawer.C.

Referenced by ClearCanvas(), DivideForRings(), RingPad(), and SummaryDrawer().

TPad* SummaryDrawer::fTop
protected

Definition at line 1735 of file SummaryDrawer.C.

Referenced by ClearCanvas(), CreateCanvas(), and PrintCanvas().


The documentation for this class was generated from the following file: