]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/MUONGenerateGentleGeometry.C
In AliMUONTriggerTrack: fixing memory leak
[u/mrichter/AliRoot.git] / MUON / MUONGenerateGentleGeometry.C
index e8474c62b33dc5ec64646da0b0026031246e091e..2f9e2c5d16e552c1b6fe6b8742ba63509b14b4bb 100644 (file)
@@ -1,3 +1,20 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// $Id$
+//
 /// \ingroup macros
 /// \file MUONGenerateGentleGeometry.C
 /// \brief Macro for generating a simplified geometry used by the
 ///
 /// \author: M. Tadel, CERN and B. Vulpescu LPC, Clermont-Ferrand
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+
+#include <TSystem.h>
+#include <TEveManager.h>
+#include <TEveGeoNode.h>
+#include <TGeoManager.h>
+#include <TGeoNode.h>
+#include <TString.h>
+#include <TObjArray.h>
+#include <Riostream.h>
+
+#endif
+
+void AddNodes(TGeoNode *node, TEveGeoNode *parent, Int_t depth, Int_t depthmax,
+              TObjArray *list);
+
 void MUONGenerateGentleGeometry() {
 
   gSystem->Load("libGeom");
@@ -50,7 +83,8 @@ void MUONGenerateGentleGeometry() {
 }
 
 //_____________________________________________________________________________
-void AddNodes(TGeoNode *node, TEveGeoNode *parent, Int_t depth, Int_t depthmax, TObjArray *list)
+void AddNodes(TGeoNode *node, TEveGeoNode *parent, Int_t depth, Int_t depthmax, 
+              TObjArray *list)
 {  
   if (--depth <= 0)
     return;
@@ -64,20 +98,20 @@ void AddNodes(TGeoNode *node, TEveGeoNode *parent, Int_t depth, Int_t depthmax,
  
  for (Int_t in = 0; in < nNodes; in++)
  {
-    TGeoNode *node = (TGeoNode*) nlist->At(in);
+    TGeoNode *node2 = (TGeoNode*) nlist->At(in);
     TEveGeoNode *son;
-    if (strcmp(node->GetName(),sname.Data()) == 0)
+    if (strcmp(node2->GetName(),sname.Data()) == 0)
     {
       son = dynamic_cast<TEveGeoNode*>(parent->FindChild(nname->GetName()));
       if (!son)
       {
-       son = new TEveGeoNode(node);
+       son = new TEveGeoNode(node2);
        parent->AddElement(son);
       }
     } else {
       continue;
     }
-    AddNodes(node,son, depth, depthmax, list);
+    AddNodes(node2,son, depth, depthmax, list);
   }
 
 }