]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliPoints.cxx
Improved version of online detector-algorithm makefile
[u/mrichter/AliRoot.git] / STEER / AliPoints.cxx
index 42124931f4b1a1b7f7dfe2b99da2a2978f9fc341..8e7e9ffc7cb57a199041d34be1393d3446684395 100644 (file)
@@ -33,6 +33,7 @@
 #include "TView.h"
 
 #include "AliDetector.h"
+#include "AliMC.h"
 #include "AliPoints.h"
 #include "AliRun.h"
  
@@ -81,17 +82,17 @@ AliPoints::~AliPoints()
 }
 
 //_______________________________________________________________________
-void AliPoints::Copy(AliPoints &pts) const
+void AliPoints::Copy(TObject &pts) const
 {
   //
   // Copy *this onto pts
   //
-  if(this != &pts) {
+  if((TObject*)this != &pts) {
     ((TPolyMarker3D*)this)->Copy(dynamic_cast<TPolyMarker3D&>(pts));
-    pts.fGLList = fGLList;
-    pts.fLastPoint = fLastPoint;
-    pts.fDetector = fDetector;
-    pts.fIndex = fIndex;
+    (dynamic_cast<AliPoints&>(pts)).fGLList = fGLList;
+    (dynamic_cast<AliPoints&>(pts)).fLastPoint = fLastPoint;
+    (dynamic_cast<AliPoints&>(pts)).fDetector = fDetector;
+    (dynamic_cast<AliPoints&>(pts)).fIndex = fIndex;
   }
 }
 
@@ -174,8 +175,8 @@ TParticle *AliPoints::GetParticle() const
   //
   //   Returns pointer to particle index in AliRun::fParticles
   //
-  if (fIndex < 0 || fIndex >= gAlice->GetNtrack()) return 0;
-  else return gAlice->Particle(fIndex);
+  if (fIndex < 0 || fIndex >= gAlice->GetMCApp()->GetNtrack()) return 0;
+  else return gAlice->GetMCApp()->Particle(fIndex);
 }
 
 //_______________________________________________________________________
@@ -200,7 +201,7 @@ void AliPoints::Propagate()
   //  
   TIter next(gAlice->Detectors());
   AliDetector *detector;
-  while((detector = dynamic_cast<AliDetector*>(next()))) {
+  while((detector = (AliDetector*)(next()))) {
     if (!detector->IsActive()) continue;
     points = detector->Points();
     if (!points) continue;