if ( ! AliMpCDB::LoadDDLStore() )
{
AliFatal("Could not access DDL Store from OCDB !");
- }
-
- fExploded = new AliMUONContourHandler(kTRUE);
+ }
}
//_____________________________________________________________________________
fgInstance = 0;
}
+//_____________________________________________________________________________
+AliMUONContourHandler*
+AliMUONPainterHelper::Exploded() const
+{
+ /// Create exploded contour handler
+ if (!fExploded) fExploded = new AliMUONContourHandler(kTRUE);
+ return fExploded;
+}
+
+//_____________________________________________________________________________
+AliMUONContourHandler*
+AliMUONPainterHelper::Real() const
+{
+ /// Create real contour handler
+ if (!fReal) fReal = new AliMUONContourHandler(kFALSE);
+ return fReal;
+}
+
//_____________________________________________________________________________
AliMUONContour*
AliMUONPainterHelper::GetContour(const char* contourName, Bool_t explodedView) const
/// Get a contour by name
if (explodedView)
{
- return fExploded->GetContour(contourName);
+ return Exploded()->GetContour(contourName);
}
else
{
{
/// Local to global transformation of coordinates
- TGeoHMatrix* matrix = static_cast<TGeoHMatrix*>(fExploded->GetTransformations()->GetValue(detElemId));
+ TGeoHMatrix* matrix = static_cast<TGeoHMatrix*>(Exploded()->GetTransformations()->GetValue(detElemId));
Double_t pg[3] = { xg, yg, zg };
Double_t pl[3] = { 0., 0., 0. };
matrix->MasterToLocal(pg, pl);
{
/// Local to (exploded) global transformation of coordinates
- TGeoHMatrix* matrix = static_cast<TGeoHMatrix*>(fExploded->GetTransformations()->GetValue(detElemId));
+ TGeoHMatrix* matrix = static_cast<TGeoHMatrix*>(Exploded()->GetTransformations()->GetValue(detElemId));
Double_t pl[3] = { xl, yl, zl };
Double_t pg[3] = { 0., 0., 0. };
matrix->LocalToMaster(pl, pg);
AliMUONContourHandler* ch = fReal;
if ( explodedView )
{
- ch = fExploded;
+ ch = Exploded();
}
if (!ch)
{
{
/// Get the contours in a specially arranged array (orderer by hierarchy level)
- if ( explodedView ) return fExploded->AllContourArray(); // fExploded should always be created
-
- if (!fReal) fReal = new AliMUONContourHandler(kFALSE); // fReal might be first asked here.
-
- return fReal->AllContourArray();
+ if ( explodedView )
+ {
+ return Exploded()->AllContourArray();
+ }
+ else
+ {
+ return Real()->AllContourArray();
+ }
}