]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSIntMap.cxx
New plots for trending injector efficiencies (Melinda)
[u/mrichter/AliRoot.git] / ITS / AliITSIntMap.cxx
index b65aaf960f159be146215c0e1bb75fd3a349eafb..3d5b2ca41fec252c130febf39f1631128c1115d2 100644 (file)
@@ -104,7 +104,7 @@ void AliITSIntMap::InsertNode(Int_t key, Int_t val, AliITSIntMapNode* &node, UIn
     fNrEntries++;
     fFastAccess=kFALSE;
     fFastAccessSerialize=kFALSE;
-    UInt_t balanceHeight = (UInt_t) (log(fNrEntries+1)/log(2)+1);
+    UInt_t balanceHeight = (UInt_t) (TMath::Log(fNrEntries+1)/TMath::Log(2)+1);
     if ( (height-balanceHeight)*(height-balanceHeight) > fNrEntries ) {
       Balance();
     }
@@ -198,7 +198,7 @@ AliITSIntMapNode*  AliITSIntMap::FindNode(Int_t key, AliITSIntMapNode* node, UIn
   else if (key>node->Key()) return FindNode(key,node->Right(),height);
   else { // Match
 //    //*** balance if height too high. const above have to be removed if this is needed ***
-//    UInt_t balanceHeight = (UInt_t) (log(fNrEntries+1)/log(2)+1);
+//    UInt_t balanceHeight = (UInt_t) (TMath::Log(fNrEntries+1)/TMath::Log(2)+1);
 //    if ( (height-balanceHeight)*(height-balanceHeight) > fNrEntries ) {
 //      Balance();
 //    }
@@ -249,6 +249,7 @@ void AliITSIntMap::ClearFastAccess(){
 
 void AliITSIntMap::InitFastAccess(){
   // initializes the fast access array
+  if (fFastAccess) return;
   ClearFastAccess();
   if (fNrEntries>0) {
     fFastAccessArray = new AliITSIntMapNode*[fNrEntries];
@@ -268,6 +269,7 @@ void AliITSIntMap::InitFastAccessNode(AliITSIntMapNode* node) {
 
 void AliITSIntMap::InitFastAccessSerialize(){
   // initializes the fast access array
+  if (fFastAccessSerialize) return;
   ClearFastAccess();
   if (fNrEntries>0) {
     fFastAccessArray = new AliITSIntMapNode*[fNrEntries];