]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix for ROOT Git transition
authorihrivnac <ihrivnac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Oct 2013 09:15:44 +0000 (09:15 +0000)
committerihrivnac <ihrivnac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Oct 2013 09:15:44 +0000 (09:15 +0000)
(according to the suggestion by  Ch. H. Christensen)

MUON/mapping/AliMpExMapIterator.cxx
MUON/mapping/AliMpExMapIterator.h
MUON/mapping/AliMpManuStore.cxx

index 012246b2b6b4fc1515fb7ea66394ced6fd91bf8b..778243602ae3dd4cf7c89e7b3b167ac21cf7a782 100644 (file)
@@ -87,21 +87,12 @@ AliMpExMapIterator::~AliMpExMapIterator()
 }
 
 //_____________________________________________________________________________
-#if ROOT_SVN_REVISION >= 29598
 Bool_t 
-AliMpExMapIterator::Next(Long64_t& index, TObject*& object)
-#else
-Bool_t 
-AliMpExMapIterator::Next(Long_t& index, TObject*& object)
-#endif
+AliMpExMapIterator::Next(Index_t& index, TObject*& object)
 {
 /// Move to next object in iteration
 
-#if ROOT_SVN_REVISION >= 29598
-  Long64_t value(0);
-#else
-  Long_t value(0);
-#endif
+  Index_t value  = 0;
 
   object = 0;
   
@@ -121,12 +112,7 @@ AliMpExMapIterator::Next()
 {
 /// Return the next object in iteration.
 /// The returned object must not be deleted by the user.  
-
-#if ROOT_SVN_REVISION >= 29598
-  Long64_t dummy;
-#else
-  Long_t dummy;
-#endif
+  Index_t dummy;
   TObject* o(0x0);
   Next(dummy,o);
   return o;
@@ -140,11 +126,7 @@ AliMpExMapIterator::Next(Int_t& key)
 /// The returned object must not be deleted by the user.  
 
   TObject* o;
-#if ROOT_SVN_REVISION >= 29598
-  Long64_t index;
-#else
-  Long_t index;
-#endif
+  Index_t index;
   Next(index,o);
   key = (Int_t)(index);
   return o;
@@ -156,12 +138,7 @@ AliMpExMapIterator::Next(Int_t& keyFirst, Int_t& keySecond)
 {
 /// Return the next object in iteration and fill the key.
 /// The returned object must not be deleted by the user.  
-
-#if ROOT_SVN_REVISION >= 29598
-  Long64_t index;
-#else
-  Long_t index;
-#endif
+  Index_t index;
   TObject* o(0x0);
   Next(index,o);
   keyFirst = AliMpExMap::GetPairFirst(index);
@@ -175,12 +152,7 @@ AliMpExMapIterator::Next(TString& key)
 {
 /// Return the next object in iteration and fill the key.
 /// The returned object must not be deleted by the user.  
-
-#if ROOT_SVN_REVISION >= 29598
-  Long64_t index;
-#else
-  Long_t index;
-#endif
+  Index_t index;
   TObject* o(0x0);
   Next(index,o);
   key = AliMpExMap::GetString(index);
index 672afa90236fed37a38455f0add0572ca4fb95fc..2c2c5b9d836d5a1822c5247811b85ee193d96f89 100644 (file)
@@ -48,13 +48,17 @@ public:
   virtual const TCollection* GetCollection() const;
 
 private:
-#if ROOT_SVN_REVISION >= 29598
-    Bool_t Next(Long64_t& index, TObject*& object);
+#if (defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE >= 334082) || \
+  (defined(ROOT_SVN_REVISION) && ROOT_SVN_REVISION >= 29598) 
+  // ROOT_VERSION_CODE = 334082 corresponds to Root version 5.25/02
+  // ROOT_SVN_REVISION is not defined in Root versions after moving in git
+  typedef Long64_t Index_t;
 #else    
-    Bool_t Next(Long_t& index, TObject*& object);
+  typedef Long_t Index_t;
 #endif    
+  Bool_t Next(Index_t& index, TObject*& object);
   
-    TExMapIter* fIterator; ///< iterator we are wrapping
+  TExMapIter* fIterator; ///< iterator we are wrapping
 
   ClassDef(AliMpExMapIterator,0) // TIterator for AliMpExMap
 };
index 6199d0ea42c776f698ffb94910a8121b90441466..6aeace1a7e5ba2446f753f871ae1281a62bea7cd 100644 (file)
@@ -249,7 +249,8 @@ void  AliMpManuStore::ReplaceManu(Int_t detElemId, Int_t manuId, Int_t serialNb)
   // Loop over map
   TExMapIter it(&fManuToSerialNbs);
 
-#if ROOT_SVN_REVISION >= 29598
+#if (defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE >= 334082) || \
+  (defined(ROOT_SVN_REVISION) && ROOT_SVN_REVISION >= 29598) 
   Long64_t key;
   Long64_t value;
 #else
@@ -344,7 +345,8 @@ Bool_t  AliMpManuStore::WriteData(const TString& outDir)
     
     // Loop over map
     TExMapIter it2(&fManuToSerialNbs);
-#if ROOT_SVN_REVISION >= 29598
+#if (defined(ROOT_SVN_REVISION) && ROOT_SVN_REVISION >= 29598) || \
+  (defined(ROOT_VERSION_CODE) && ROOT_VERSION_CODE >= ROOT_VERSION(5,25,02))
     Long64_t key;
     Long64_t value;
 #else