#include "AliMUONVPainter.h"
-#include "AliCodeTimer.h"
#include "AliLog.h"
#include "AliMUON2DMap.h"
#include "AliMUONCalibParamND.h"
-#include "AliMUONPainterRegistry.h"
-#include "AliMpManuUID.h"
+#include "AliMUONContour.h"
+#include "AliMUONContourPainter.h"
#include "AliMUONObjectPair.h"
-#include "AliMUONPainterContour.h"
#include "AliMUONPainterGroup.h"
#include "AliMUONPainterHelper.h"
+#include "AliMUONPainterDataRegistry.h"
#include "AliMUONTrackerDataHistogrammer.h"
#include "AliMUONVTrackerData.h"
+#include "AliMpManuUID.h"
#include <Riostream.h>
#include <TCanvas.h>
#include <TClass.h>
///
/// \author Laurent Aphecetche, Subatech
+using std::cout;
+using std::endl;
///\cond CLASSIMP
ClassImp(AliMUONVPainter)
///\endcond
AliMUONVPainter::AliMUONVPainter(TRootIOCtor*) : TObject(),
TQObject(),
fHistogram(0x0),
+fPainterGroups(0x0),
+fResponderGroup(0x0),
fName(""),
fPathName(""),
fType(""),
fMother(0x0),
fGroup(0x0),
fContour(0x0),
-fPainterGroups(0x0),
fChildren(0x0),
-fResponderGroup(0x0),
fPlotterGroup(0x0),
fBorderFactor(1.1),
fPad(0x0),
fIsValid(kTRUE)
{
/// streamer ctor
+ SetID(-1,-1);
}
//_____________________________________________________________________________
: TObject(),
TQObject(),
fHistogram(0x0),
+ fPainterGroups(0x0),
+ fResponderGroup(0x0),
fName(""),
fPathName(""),
fType(type),
fMother(0x0),
fGroup(0x0),
fContour(0x0),
- fPainterGroups(0x0),
fChildren(0x0),
- fResponderGroup(0x0),
fPlotterGroup(0x0),
fBorderFactor(1.1),
fPad(0x0),
: TObject(rhs),
TQObject(),
fHistogram(0x0),
+fPainterGroups(0x0),
+fResponderGroup(0x0),
fName(""),
fPathName(""),
fType(""),
fMother(0x0),
fGroup(0x0),
fContour(0x0),
-fPainterGroups(0x0),
fChildren(0x0),
-fResponderGroup(0x0),
fPlotterGroup(0x0),
fBorderFactor(1.0),
fPad(0x0),
Double_t& x2, Double_t& y2) const
{
/// Get the bounding box = our area
- AliMpArea area(Area().Position(),Area().Dimensions()*fBorderFactor);
+ AliMpArea area(Area().GetPositionX(),
+ Area().GetPositionY(),
+ Area().GetDimensionX()*fBorderFactor,
+ Area().GetDimensionY()*fBorderFactor);
x1 = area.LeftBorder();
y1 = area.DownBorder();
if ( IsExcluded() )
{
- fContour->PaintArea(2);
- fContour->PaintOutline(1,1);
+ AliMUONContourPainter::Paint(*fContour,1,1,2); // red fill with black thin outline
}
}
Int_t c = color >= 0 ? color : GetLineColor();
Int_t w = width >= 0 ? width : GetLineWidth();
- fContour->PaintOutline(c,w);
+ AliMUONContourPainter::Paint(*fContour,c,w);
}
//_____________________________________________________________________________
//_____________________________________________________________________________
void
-AliMUONVPainter::SetContour(AliMUONPainterContour* contour)
+AliMUONVPainter::SetContour(AliMUONContour* contour)
{
/// Set out contour
if (!contour)
{
TList* l = p->IsA()->GetMenuList();
-// l->Clear();
l->Delete();
TClassMenuItem* n(0x0);
if ( group )
{
- Int_t dim = group->Data()->InternalToExternal(group->DataIndex());
- if ( dim < group->Data()->ExternalDimension() )
- {
- if ( data && data->IsHistogrammed(dim) )
- {
- // Add histo drawing to the popup menu
- n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction,p->IsA(),
- "Draw histogram","DrawHistogram0",p,"",-1,kTRUE);
- l->Add(n);
-
- n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction,p->IsA(),
- "Draw histogram clone","DrawHistogramClone0",p,"",-1,kTRUE);
- l->Add(n);
- }
+ if ( data && data->IsHistogrammed(0) )
+ {
+ // Add histo drawing to the popup menu
+ TString name("Draw histogram of ");
+
+ name += data->ExternalDimensionName(0);
+
+ n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction,p->IsA(),
+ name.Data(),"DrawHistogram0",p,"",-1,kTRUE);
+ l->Add(n);
+
+ name += " clone";
+ n = new TClassMenuItem(TClassMenuItem::kPopupUserFunction,p->IsA(),
+ name.Data(),"DrawHistogramClone0",p,"",-1,kTRUE);
+ l->Add(n);
}
Int_t nd = data->IsSingleEvent() ? data->ExternalDimension() : data->ExternalDimension()*2;
AliMUONVPainter::InteractiveReadOutConfig() const
{
/// get the interactive readout config object
- return AliMUONPainterRegistry::Instance()->InteractiveReadOutConfig();
+ return AliMUONPainterDataRegistry::Instance()->InteractiveReadOutConfig();
}
//_____________________________________________________________________________
return rv;
}
+//_____________________________________________________________________________
+void
+AliMUONVPainter::PaintArea(Int_t fillColor)
+{
+ /// Draw a filled area
+ AliMUONContourPainter::Paint(*(Contour()),-1,-1,fillColor);
+}