Added iterator object (Laurent)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Mar 2007 14:10:48 +0000 (14:10 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Mar 2007 14:10:48 +0000 (14:10 +0000)
MUON/mapping/AliMpVPainter.cxx

index 3f98a61..677c1c8 100755 (executable)
 #include "AliMpPCBPainter.h"
 #include "AliMpSlat.h"
 #include "AliMpSlatPainter.h"
+#include "AliMpIteratorPainter.h"
+#include "AliMpVPadIterator.h"
+#include "AliMpSlatSegmentation.h"
+//#include "AliMpSectorSegmentation.h"
 
 #include <TList.h>
 #include <TVirtualX.h>
@@ -164,6 +168,22 @@ AliMpVPainter *AliMpVPainter::CreatePainter(TObject *object)
     painter = new AliMpPCBPainter((AliMpPCB *)object);
   else if (object->InheritsFrom(AliMpSlat::Class()))
     painter = new AliMpSlatPainter((AliMpSlat*)object);
+  else if (object->InheritsFrom(AliMpVPadIterator::Class()))
+    painter = new AliMpIteratorPainter((AliMpVPadIterator*)object);
+  else if (object->InheritsFrom(AliMpVSegmentation::Class()))
+  {
+ //   const AliMpSectorSegmentation* sectorSegmentation = dynamic_cast<const AliMpSectorSegmentation*>(object);
+//    if (sectorSegmentation)
+//    {
+//      return new AliMpSectorPainter(sectorSegmentation->GetSector());
+//    }
+
+    const AliMpSlatSegmentation* slatSegmentation = dynamic_cast<const AliMpSlatSegmentation*>(object);
+    if (slatSegmentation)
+    {
+      return new AliMpSlatPainter(slatSegmentation->Slat());
+    }
+  }
   return painter;
 }