Small speedup for a very often used function
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Jul 2009 09:13:05 +0000 (09:13 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Jul 2009 09:13:05 +0000 (09:13 +0000)
TRD/AliTRDchamberTimeBin.cxx

index e32c498..2d9057b 100644 (file)
@@ -107,10 +107,10 @@ AliTRDchamberTimeBin &AliTRDchamberTimeBin::operator=(const AliTRDchamberTimeBin
 //_____________________________________________________________________________
 void AliTRDchamberTimeBin::Clear(const Option_t *) 
 { 
-  for(Int_t it = 0; it<kMaxClustersLayer; it++){
-    if(IsOwner()) delete fClusters[it];
-    fClusters[it] = NULL;
-  } 
+  if(IsOwner())
+    for(Int_t it = 0; it<kMaxClustersLayer; it++)
+      delete fClusters[it];
+  memset(fClusters,0,kMaxClustersLayer*sizeof(fClusters[0]));
   fN = 0; 
 }