]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentationSlat.cxx
Changes needed to work with Root 3.01 (substitute lhs [] operator). (Jiri Chudoba)
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationSlat.cxx
index 74cfdbd8a92cbaa79f8d3518817fd466d5a3515e..55aea71d38d4d5f0e20bbb9ab393b1a71fdaeee1 100644 (file)
 
 /*
 $Log$
+Revision 1.12  2001/05/16 14:57:17  alibrary
+New files for folders and Stack
+
+Revision 1.11  2001/01/26 21:25:48  morsch
+Empty default constructors and.
+
+Revision 1.10  2001/01/23 18:58:19  hristov
+Initialisation of some pointers
+
 Revision 1.9  2001/01/17 20:53:40  hristov
 Destructors corrected to avoid memory leaks
 
@@ -65,6 +74,11 @@ ClassImp(AliMUONSegmentationSlat)
 AliMUONSegmentationSlat::AliMUONSegmentationSlat() 
 {
 // Default constructor
+}
+
+AliMUONSegmentationSlat::AliMUONSegmentationSlat(Int_t nsec) 
+{
+// Non default constructor
     fSlats=0;            
     fNDiv = new TArrayI(4);
     fChamber = 0;
@@ -77,6 +91,11 @@ AliMUONSegmentationSlat::~AliMUONSegmentationSlat(){
     fSlats->Delete();
     delete fSlats;
   }
+
+  if (fNDiv) {
+    delete fNDiv;
+  }
+
 }
 
 void AliMUONSegmentationSlat::SetPadSize(Float_t p1, Float_t p2)
@@ -455,7 +474,7 @@ void AliMUONSegmentationSlat::Init(Int_t chamber)
 // Initialize slat modules of quadrant +/+    
 // The other three quadrants are handled through symmetry transformations
 //
-    printf("\n Initialise Segmentation Slat \n");
+  //printf("\n Initialise Segmentation Slat \n");
 //
 
 // Initialize Slat modules
@@ -476,7 +495,7 @@ void AliMUONSegmentationSlat::Init(Int_t chamber)
     fNpx=0;
 // for each slat in the quadrant (+,+)    
     for (islat=0; islat<fNSlats; islat++) {
-       (*fSlats)[islat] = CreateSlatModule();
+        fSlats->AddAt(CreateSlatModule(),islat);
 
        AliMUONSegmentationSlatModule *slat =  Slat(islat);
        // Configure Slat
@@ -539,7 +558,7 @@ AliMUONSegmentationSlatModule* AliMUONSegmentationSlat::
 CreateSlatModule()
 {
     // Factory method for slat module
-    return new AliMUONSegmentationSlatModule();
+    return new AliMUONSegmentationSlatModule(4);
 }