From: ihrivnac Date: Wed, 23 Oct 2013 09:15:44 +0000 (+0000) Subject: Fix for ROOT Git transition X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=8b8f8fd4db46acb6ea1b9559ca7523344369f2c9 Fix for ROOT Git transition (according to the suggestion by Ch. H. Christensen) --- diff --git a/MUON/mapping/AliMpExMapIterator.cxx b/MUON/mapping/AliMpExMapIterator.cxx index 012246b2b6b..778243602ae 100644 --- a/MUON/mapping/AliMpExMapIterator.cxx +++ b/MUON/mapping/AliMpExMapIterator.cxx @@ -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); diff --git a/MUON/mapping/AliMpExMapIterator.h b/MUON/mapping/AliMpExMapIterator.h index 672afa90236..2c2c5b9d836 100644 --- a/MUON/mapping/AliMpExMapIterator.h +++ b/MUON/mapping/AliMpExMapIterator.h @@ -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 }; diff --git a/MUON/mapping/AliMpManuStore.cxx b/MUON/mapping/AliMpManuStore.cxx index 6199d0ea42c..6aeace1a7e5 100644 --- a/MUON/mapping/AliMpManuStore.cxx +++ b/MUON/mapping/AliMpManuStore.cxx @@ -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