]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDdigitsManager.cxx
Include a reset of the digits arrays in order to process several events
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitsManager.cxx
index 5aedb358336812eb1b11e5af7820ceb44885b3dc..0454a6d5bddd395f51ea28c9a7a0342a63446717 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.20  2002/10/22 15:53:08  alibrary
+Introducing Riostream.h
+
 Revision 1.19  2002/10/14 14:57:43  hristov
 Merging the VirtualMC branch to the main development branch (HEAD)
 
@@ -213,6 +216,27 @@ void AliTRDdigitsManager::CreateArrays()
                                                ,AliTRDgeometry::Ndet());
   }
 
+}
+//_____________________________________________________________________________
+void AliTRDdigitsManager::ResetArrays()
+{
+  //
+  // Reset the data arrays
+  //
+
+  if (fDigits) {
+    delete fDigits;
+  }
+  fDigits = new AliTRDsegmentArray("AliTRDdataArrayI",AliTRDgeometry::Ndet());
+
+  for (Int_t iDict = 0; iDict < kNDict; iDict++) {
+    if (fDictionary[iDict]) {  
+      delete fDictionary[iDict];
+    }
+    fDictionary[iDict] = new AliTRDsegmentArray("AliTRDdataArrayI"
+                                               ,AliTRDgeometry::Ndet());
+  }
+
 }
 
 //_____________________________________________________________________________