]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In mapping:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Mar 2009 16:30:13 +0000 (16:30 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Mar 2009 16:30:13 +0000 (16:30 +0000)
Removing compilation options WITH_STL, WITH_ROOT;
kept code within WITH_ROOT option only.

35 files changed:
MUON/AliMUONSt1GeometryBuilderV2.cxx
MUON/AliMUONSt1GeometryBuilderV2.h
MUON/MUONmappingLinkDef.h
MUON/mapping/AliMpGraphContext.cxx
MUON/mapping/AliMpGraphContext.h
MUON/mapping/AliMpMotifMap.cxx
MUON/mapping/AliMpMotifMap.h
MUON/mapping/AliMpMotifReader.cxx
MUON/mapping/AliMpMotifReader.h
MUON/mapping/AliMpMotifSpecial.cxx
MUON/mapping/AliMpMotifSpecial.h
MUON/mapping/AliMpMotifType.h
MUON/mapping/AliMpNeighboursPadIterator.cxx
MUON/mapping/AliMpNeighboursPadIterator.h
MUON/mapping/AliMpPCB.cxx
MUON/mapping/AliMpPCB.h
MUON/mapping/AliMpPad.cxx
MUON/mapping/AliMpPad.h
MUON/mapping/AliMpPadRow.cxx
MUON/mapping/AliMpPadRow.h
MUON/mapping/AliMpRow.cxx
MUON/mapping/AliMpRow.h
MUON/mapping/AliMpSector.cxx
MUON/mapping/AliMpSector.h
MUON/mapping/AliMpSectorReader.cxx
MUON/mapping/AliMpSectorSegmentation.cxx
MUON/mapping/AliMpSectorSegmentation.h
MUON/mapping/AliMpSlat.cxx
MUON/mapping/AliMpSlat.h
MUON/mapping/AliMpSubZone.cxx
MUON/mapping/AliMpSubZone.h
MUON/mapping/AliMpVRowSegmentSpecial.cxx
MUON/mapping/AliMpVRowSegmentSpecial.h
MUON/mapping/AliMpZone.cxx
MUON/mapping/AliMpZone.h

index b2049b4894689bb077635ac73fa47bd239550f83..12cf8253d76bd251954d4d6ab1153e48a63aa7d7 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "AliMpSegmentation.h"
 #include "AliMpDEManager.h"
-#include "AliMpContainers.h"
 #include "AliMpConstants.h"
 #include "AliMpCDB.h"
 #include "AliMpSector.h"
 #include <TVector2.h>
 #include <TVector3.h>
 #include <TVirtualMC.h>
-
-#ifdef WITH_STL
-  #include <vector>
-#endif
-
-#ifdef WITH_ROOT
-  #include "TArrayI.h"
-#endif
+#include <TArrayI.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMUONSt1GeometryBuilderV2)
@@ -1976,14 +1968,8 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
   
   GReal_t posX,posY,posZ;
   
-#ifdef WITH_STL  
-  vector<Int_t> alreadyDone;
-#endif
-
-#ifdef WITH_ROOT  
   TArrayI alreadyDone(20);
   Int_t nofAlreadyDone = 0;
-#endif  
 
   for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
     AliMpRow* row = sector->GetRow(irow);
@@ -2035,12 +2021,6 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
 
           Int_t motifPosId = seg->GetMotifPositionId(motifNum);
           
-#ifdef WITH_STL
-          if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
-              != alreadyDone.end()) continue; // don't treat the same motif twice
-
-#endif
-#ifdef WITH_ROOT
           Bool_t isDone = false;
          Int_t i=0;
          while (i<nofAlreadyDone && !isDone) {
@@ -2048,7 +2028,6 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
            i++;
          }  
          if (isDone) continue; // don't treat the same motif twice
-#endif
 
           AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
          AliDebugStream(2) << chamber << " processing special motif: " << motifPosId << endl;  
@@ -2083,14 +2062,10 @@ void AliMUONSt1GeometryBuilderV2::PlaceSector(const AliMpSector* sector,
          posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter()); 
           gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
 
-#ifdef WITH_STL
-          alreadyDone.push_back(motifPosId);// mark this motif as done
-#endif
-#ifdef WITH_ROOT
           if (nofAlreadyDone == alreadyDone.GetSize()) 
             alreadyDone.Set(2*nofAlreadyDone); 
           alreadyDone.AddAt(motifPosId, nofAlreadyDone++);               
-#endif
+
          AliDebugStream(2) << chamber << " processed motifPosId: " << motifPosId << endl;
        }               
 // COMMENT OUT END
index a9e4b4676207afeaef1dc6afccf44a2c8bcab1ca..72c161f4369b1d533db6c750bbf70df82d7d5f46 100644 (file)
 
 #include "AliMUONVGeometryBuilder.h"
 
-#include "AliMpContainers.h"
-
 #include <TExMap.h>
 
-#ifdef WITH_STL
-  #include <map>
-#endif
-
 // typedef Float_t GReal_t; // for AliGeant3
 typedef Double_t GReal_t;  // for VirtualMC
 
index 6f4810413b8dfc4c6c0ff880966eb86d4d8c0c08..7db7ae7ea0e119d9d988bc4f194bdabe79526f4e 100644 (file)
 #pragma link C++ class  AliMpPCBPainter+;
 #pragma link C++ class  AliMpDEVisu+;
 #pragma link C++ class  AliMpIteratorPainter+;
-
-#ifdef WITH_STL
-#pragma link C++ class  std::pair<Int_t, TVector2>+;
-#pragma link C++ class  std::pair<Int_t, AliMpMotifPosition*>+;
-#pragma link C++ class  std::pair<TString, AliMpVMotif*>+;
-#pragma link C++ class  std::pair<TString, AliMpMotifType*>+;
-#pragma link C++ class  std::pair<AliMpIntPair, AliMpConnection*>+;
-#pragma link C++ class  std::pair<AliMpIntPair, AliMpMotifPosition*>+;
-#endif
index 6fc1410c811787c4a987f955e988bea79550f901..bbd96ba5ca40293a4b7dc54cac8e60344bfc02d6 100755 (executable)
 ClassImp(AliMpGraphContext)
 /// \endcond
 
-AliMpGraphContext *AliMpGraphContext::fgInstance = 0;
-AliMpGraphContext::GraphContextVector AliMpGraphContext::fgStack;
-
-#ifdef WITH_ROOT
+AliMpGraphContext* AliMpGraphContext::fgInstance = 0;
+TObjArray          AliMpGraphContext::fgStack;
 Int_t              AliMpGraphContext::fgStackSize = 0;
-#endif
 
 //_____________________________________________________________________________
 AliMpGraphContext::AliMpGraphContext():
@@ -144,13 +141,7 @@ void AliMpGraphContext::Push() const
 
   AliMpGraphContext *save = new AliMpGraphContext(*this);
 
-#ifdef WITH_STL
-  fgStack.push_back(save);
-#endif
-
-#ifdef WITH_ROOT
   fgStack.AddAt(save, fgStackSize++);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -158,17 +149,6 @@ void AliMpGraphContext::Pop()
 {
 /// Pop an object from the stack.
 
-#ifdef WITH_STL
-  // restore the last saved configuration
-  if (!fgStack.empty()){
-    AliMpGraphContext *obj = fgStack.back();
-    *this = *obj;
-    fgStack.pop_back();
-    delete obj;
-  }
-#endif
-
-#ifdef WITH_ROOT
   // restore the last saved configuration
   if ( fgStackSize ){
     AliMpGraphContext *obj 
@@ -177,5 +157,4 @@ void AliMpGraphContext::Pop()
     fgStack.RemoveAt(fgStackSize);
     delete obj;
   }
-#endif
 }
index 7d34b20b113dc0991f3ec3b841cbda4bf33971cd..23fd27f0b65fd0157d819712332637ea822aeaa1 100755 (executable)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
-
-#include <TVector2.h>
-#ifdef WITH_ROOT
 #include "AliMpExMap.h"
-#endif
 
-#ifdef WITH_STL
-#include <vector>
-#endif
+#include <TVector2.h>
 
 class MPainter;
 
 class AliMpGraphContext : public TObject
 {
- public:
-#ifdef WITH_STL
-  /// GraphContextVector type
-  typedef std::vector<AliMpGraphContext*> GraphContextVector;
-#endif
-#ifdef WITH_ROOT
-  /// GraphContextVector type
-  typedef TObjArray GraphContextVector;
-#endif
-
  public:
   void Push() const;
   void Pop();
@@ -92,11 +75,9 @@ class AliMpGraphContext : public TObject
   AliMpGraphContext();
 
   ///< static data members
-  static AliMpGraphContext *fgInstance; ///< the global instance
-  static GraphContextVector fgStack;    ///< the object stack
-#ifdef WITH_ROOT
-  static Int_t fgStackSize;  ///< the object stack size
-#endif
+  static AliMpGraphContext* fgInstance; ///< the global instance
+  static TObjArray          fgStack;    ///< the object stack
+  static Int_t              fgStackSize;///< the object stack size
 
   //data members
   Int_t    fColor;          ///< color to use
index c5a1d40a2dc57d90b06fcc35defd9ca12713e88e..1290397356463451e50803130282bf4eba8efb9a 100755 (executable)
@@ -56,32 +56,20 @@ AliMpMotifMap::AliMpMotifMap()
 {
 /// Standard constructor
   
-#ifdef WITH_ROOT
   fMotifPositions2.SetOwner(false);
-#endif
 }
 
 //_____________________________________________________________________________
 AliMpMotifMap::AliMpMotifMap(TRootIOCtor* ioCtor) 
   : TObject(),
-#ifdef WITH_STL
-    fMotifs(),
-    fMotifTypes(),
-    fMotifPositions(),
-    fMotifPositions2()
-#endif
-#ifdef WITH_ROOT
     fMotifs(ioCtor),
     fMotifTypes(ioCtor),
     fMotifPositions(ioCtor),
     fMotifPositions2(ioCtor)
-#endif
 {
 /// Root IO constructor
 
-#ifdef WITH_ROOT
    fMotifPositions2.SetOwner(false);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -90,23 +78,6 @@ AliMpMotifMap::~AliMpMotifMap()
 /// Destructor  
 
   // Delete all registered motifs, motif types, motif positions
-  
-#ifdef WITH_STL
-  for (MotifMapIterator im=fMotifs.begin(); im != fMotifs.end(); im++) {
-    delete im->second;
-  }  
-
-  for (MotifTypeMapIterator it=fMotifTypes.begin(); 
-       it != fMotifTypes.end(); it++) {
-    delete it->second;
-  }
-
-  for (MotifPositionMapIterator ip=fMotifPositions.begin(); 
-       ip != fMotifPositions.end(); ip++) {
-    delete ip->second;
-  }  
-#endif  
-  
 }
 
 // 
@@ -165,23 +136,6 @@ void  AliMpMotifMap::PrintMotifs() const
 /// Print all the motifs and their motif types 
 /// for all motifs in the motifs map.
 
-#ifdef WITH_STL
-  if (fMotifs.size()) {
-    cout << "Dump of Motif Map - " << fMotifs.size() << " entries:" << endl;
-    Int_t counter = 0;        
-    for (MotifMapIterator i=fMotifs.begin(); i != fMotifs.end(); i++) {
-      const TString& id  = (*i).first;
-      cout << "Map element " 
-           << setw(3) << counter++ << "   " 
-           << id.Data() << "   " ;
-      PrintMotif((*i).second);    
-      cout << endl;
-    }
-    cout << endl;
-  }
-#endif
-
-#ifdef WITH_ROOT
   if (fMotifs.GetSize()) {
     cout << "Dump of Motif Map - " << fMotifs.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
@@ -201,7 +155,6 @@ void  AliMpMotifMap::PrintMotifs() const
     cout << endl;
     delete it;
   }
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -210,23 +163,6 @@ void  AliMpMotifMap::PrintMotifTypes() const
 /// Print all the the motifs types and their motif dimensions
 /// for all motif types in the motif types map.
 
-#ifdef WITH_STL
-  if (fMotifTypes.size()) {
-    cout << "Dump of Motif Type Map - " << fMotifTypes.size() << " entries:" << endl;
-    Int_t counter = 0;        
-    for (MotifTypeMapIterator i=fMotifTypes.begin(); i != fMotifTypes.end(); i++) {
-      const TString& id  = (*i).first;
-      cout << "Map element " 
-           << setw(3) << counter++ << "   " 
-           << id.Data() << "   ";
-      PrintMotifType((*i).second);        
-      cout << endl;
-    }
-    cout << endl;
-  }
-#endif  
-
-#ifdef WITH_ROOT
   if (fMotifTypes.GetSize()) {
     cout << "Dump of Motif Type Map - " << fMotifTypes.GetSize() << " entries:" << endl;
     Int_t counter = 0;
@@ -246,7 +182,6 @@ void  AliMpMotifMap::PrintMotifTypes() const
     cout << endl;
     delete it;
   }
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -256,17 +191,6 @@ AliMpMotifMap::GetAllMotifPositionsIDs(TArrayI& ecn) const
 /// Fill the given array with all motif positions IDs (electronic card numbers)
 /// defined in the map
 
-#ifdef WITH_STL
-  ecn.Set(fMotifPositions.size());  
-  Int_t i(0);
-  MotifPositionMapIterator it;
-  for (it=fMotifPositions.begin(); it != fMotifPositions.end(); it++) {
-    AliMpMotifPosition* motifPosition = (*it).second;
-    ecn[i++] = motifPosition->GetID();
-  }
-#endif
-  
-#ifdef WITH_ROOT  
   ecn.Set(fMotifPositions.GetSize());
   TIter next(fMotifPositions.CreateIterator());
   AliMpMotifPosition* motifPosition;
@@ -276,7 +200,6 @@ AliMpMotifMap::GetAllMotifPositionsIDs(TArrayI& ecn) const
     ecn[i] = motifPosition->GetID();
     ++i;
   }
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -284,13 +207,7 @@ UInt_t  AliMpMotifMap::GetNofMotifPositions() const
 {
 /// Return the number of all motif positions IDs (electronic card numbers)
 
-#ifdef WITH_STL
-  return fMotifPositions.size();  
-#endif
-  
-#ifdef WITH_ROOT  
   return fMotifPositions.GetSize();
-#endif 
 } 
 
 //_____________________________________________________________________________
@@ -305,17 +222,9 @@ AliMpMotifPosition* AliMpMotifMap::GetMotifPosition(UInt_t index) const
     return 0;
   }   
 
-#ifdef WITH_STL
-  MotifPositionMapIterator it = fMotifPositions.begin();
-  std::advance(it, index);
-  return it->second;
-#endif
-  
-#ifdef WITH_ROOT  
   TIter next(fMotifPositions.CreateIterator());
   while (index-- > 0) next();
   return static_cast<AliMpMotifPosition*>(next());
-#endif 
 }
 
 //_____________________________________________________________________________
@@ -325,22 +234,12 @@ Int_t AliMpMotifMap::CalculateNofPads() const
 
   Int_t nofPads = 0;
 
-#ifdef WITH_STL
-  MotifPositionMapIterator it;
-  for (it=fMotifPositions.begin(); it != fMotifPositions.end(); it++) {
-    AliMpMotifPosition* motifPosition = (*it).second;
-    nofPads += motifPosition->GetMotif()->GetMotifType()->GetNofPads();
-  }
-#endif
-  
-#ifdef WITH_ROOT  
   TIter next(fMotifPositions.CreateIterator());
   AliMpMotifPosition* motifPosition;
   while ( ( motifPosition = static_cast<AliMpMotifPosition*>(next()) ) )
   {
     nofPads += motifPosition->GetMotif()->GetMotifType()->GetNofPads();
   }
-#endif  
 
   return nofPads;
 }
@@ -350,23 +249,6 @@ void  AliMpMotifMap::PrintMotifPositions() const
 {
 /// Print all motif positions.
 
-#ifdef WITH_STL
-  if (fMotifPositions.size()) {
-    cout << "Dump of Motif Position Map - " << fMotifPositions.size() << " entries:" << endl;
-    Int_t counter = 0;        
-    for (MotifPositionMapIterator i=fMotifPositions.begin(); 
-                                  i != fMotifPositions.end(); i++) {
-
-      cout << "Map element " 
-           << setw(3) << counter++ << "   "; 
-      PrintMotifPosition((*i).second);    
-      cout << endl;
-    }
-    cout << endl;
-  }
-#endif  
-
-#ifdef WITH_ROOT
   if (fMotifPositions.GetSize()) {
     cout << "Dump of Motif Position Map - " << fMotifPositions.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
@@ -382,7 +264,6 @@ void  AliMpMotifMap::PrintMotifPositions() const
     }
     cout << endl;
   }
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -391,24 +272,6 @@ void  AliMpMotifMap::PrintMotifPositions2() const
 /// Print all motif positions from the second map
 /// (by global indices)
 
-#ifdef WITH_STL
-  if (fMotifPositions2.size()) {
-    cout << "Dump of Motif Position Map 2 - " << fMotifPositions2.size() << " entries:" << endl;
-    Int_t counter = 0;        
-    for (MotifPositionMap2Iterator i=fMotifPositions2.begin(); 
-                                   i != fMotifPositions2.end(); i++) {
-
-      cout << "Map element " 
-           << setw(3) << counter++ << "   "; 
-      PrintMotifPosition2((*i).second);  
-      cout << endl;
-    }
-    cout << endl;
-  }
-#endif  
-
-#ifdef WITH_ROOT
-  
   if (fMotifPositions2.GetSize()) 
   {
     cout << "Dump of Motif Position Map 2 - " << fMotifPositions2.GetSize() << " entries:" << endl;
@@ -424,7 +287,6 @@ void  AliMpMotifMap::PrintMotifPositions2() const
     }
     cout << endl;
   }
-#endif  
 }
 
 //
@@ -449,13 +311,7 @@ Bool_t AliMpMotifMap::AddMotif(AliMpVMotif* motif, Bool_t warn)
     return false;
   }  
 
-#ifdef WITH_STL
-  fMotifs[motif->GetID()] = motif;
-#endif
-
-#ifdef WITH_ROOT
   fMotifs.Add(motif->GetID(), motif);
-#endif
 
   return true;
 }
@@ -478,13 +334,7 @@ Bool_t AliMpMotifMap::AddMotifType(AliMpMotifType* motifType, Bool_t warn)
     return false;
   }  
 
-#ifdef WITH_STL
-  fMotifTypes[motifType->GetID()] = motifType;
-#endif
-
-#ifdef WITH_ROOT
   fMotifTypes.Add(motifType->GetID(), motifType);
-#endif
 
   return true;
 }
@@ -517,13 +367,7 @@ Bool_t AliMpMotifMap::AddMotifPosition(AliMpMotifPosition* motifPosition, Bool_t
     return false;
   }  
 
-#ifdef WITH_STL
-  fMotifPositions[motifPosition->GetID()] = motifPosition;
-#endif
-
-#ifdef WITH_ROOT
   fMotifPositions.Add(motifPosition->GetID() << 16, motifPosition);
-#endif
 
   return true;
 }
@@ -533,20 +377,6 @@ void AliMpMotifMap::FillMotifPositionMap2()
 {
 /// Fill the second map (by global indices) of motif positions.
 
-#ifdef WITH_STL
-  if (fMotifPositions2.size() > 0 ) {
-    AliWarningStream() << "Map has been already filled." << endl;
-    return;
-  }  
-
-  for (MotifPositionMapIterator ip=fMotifPositions.begin(); 
-       ip != fMotifPositions.end(); ip++) {
-
-    fMotifPositions2[(*ip).second->GetLowIndicesLimit()] = (*ip).second;
-  }  
-#endif
-
-#ifdef WITH_ROOT
   if (fMotifPositions2.GetSize() > 0 ) {
     AliWarningStream() <<"Map has been already filled." << endl;
     return;
@@ -558,8 +388,6 @@ void AliMpMotifMap::FillMotifPositionMap2()
   {
     fMotifPositions2.Add(motifPosition->GetLowIndicesLimit(), motifPosition);
   }
-#endif
-
 }
 
 //_____________________________________________________________________________
@@ -584,22 +412,6 @@ void  AliMpMotifMap::PrintGlobalIndices(const char* fileName) const
 
   ofstream out(fileName, ios::out);
 
-#ifdef WITH_STL
-  if (fMotifPositions.size()) {
-    for (MotifPositionMapIterator i=fMotifPositions.begin(); 
-                                   i != fMotifPositions.end(); i++) {
-
-      AliMpMotifPosition* motifPosition = (*i).second;
-      out << setw(5) << motifPosition->GetID() << "     "
-         << setw(3) << motifPosition->GetLowIndicesLimit().GetFirst()  << " " 
-         << setw(3) << motifPosition->GetLowIndicesLimit().GetSecond() 
-         << endl;
-    }
-    out << endl;
-  }
-#endif
-
-#ifdef WITH_ROOT
   if (fMotifPositions.GetSize()) {
     TIter next(fMotifPositions.CreateIterator());
     AliMpMotifPosition* motifPosition;
@@ -612,7 +424,6 @@ void  AliMpMotifMap::PrintGlobalIndices(const char* fileName) const
     }
     out << endl;
   }
-#endif
 }
 
 //_____________________________________________________________________________
@@ -665,17 +476,7 @@ AliMpVMotif* AliMpMotifMap::FindMotif(const TString& motifID) const
   
   //AliCodeTimerAuto("");
 
-#ifdef WITH_STL
-  MotifMapIterator i = fMotifs.find(motifID);
-  if (i != fMotifs.end()) 
-    return (*i).second;
-  else                 
-    return 0;
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpVMotif*)fMotifs.GetValue(motifID);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -728,17 +529,7 @@ AliMpMotifType* AliMpMotifMap::FindMotifType(const TString& motifTypeID) const
   
   //AliCodeTimerAuto("");
 
-#ifdef WITH_STL
-  MotifTypeMapIterator i = fMotifTypes.find(motifTypeID);
-  if (i != fMotifTypes.end()) 
-    return (*i).second;
-  else                 
-    return 0;
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpMotifType*)fMotifTypes.GetValue(motifTypeID);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -749,55 +540,5 @@ AliMpMotifMap::FindMotifPosition(Int_t motifPositionID) const
   
   //AliCodeTimerAuto("");
 
-#ifdef WITH_STL
-  MotifPositionMapIterator i = fMotifPositions.find(motifPositionID);
-  if (i != fMotifPositions.end()) 
-    return (*i).second;
-  else                 
-    return 0;
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpMotifPosition*)fMotifPositions.GetValue(motifPositionID << 16);
-#endif
-}
-
-/*
-//_____________________________________________________________________________
-AliMpMotifPosition* 
-AliMpMotifMap::FindMotifPosition(const AliMpIntPair& indices) const
-{
-/// Find the last motif position which has the global indices (low limit)
-/// less then the indices specified.
-
-#ifdef WITH_STL
-  MotifPositionMap2Iterator found 
-    = fMotifPositions2.lower_bound(indices);
-  
-  if (found == fMotifPositions2.end()) found--; 
-
-  MotifPositionMap2Iterator i=found;
-  do {
-    AliMpIntPair low = (*i).second->GetLowIndicesLimit();
-    AliMpIntPair up = (*i).second->GetHighIndicesLimit();
-    
-    if ( indices.GetFirst()  >= low.GetFirst() &&
-         indices.GetSecond() >= low.GetSecond() &&
-        indices.GetFirst()  <= up.GetFirst() &&
-         indices.GetSecond() <= up.GetSecond())
-        
-        return (*i).second;                     
-  }
-  while ( i-- != fMotifPositions2.begin());
-  
-  return 0;
-#endif
-
-#ifdef WITH_ROOT
-  // HOW TO DO THIS WITH ROOT ????
-  // Fortunately it seems not to be used anywhere
-  Fatal("FindMotifPosition", "Difficult in Root to do this.");
-  return 0;
-#endif
 }
-*/
index d6de9df7653c745b4e6e57bf605eeaf2b9384dce..a96579df3a07a3bd41129f0edbe145aa7315f8f0 100755 (executable)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
-
-#ifdef WITH_STL
-#include "AliMpIntPair.h"
-#endif
-
-#ifdef WITH_ROOT
 #include "AliMpExMap.h"
-#endif
-
-#ifdef WITH_STL
-#include <map>
-#include <iterator>
-#endif
 
 class AliMpVMotif;
 class AliMpMotifType;
@@ -47,36 +34,6 @@ class TVector2;
 
 class AliMpMotifMap : public TObject
 {
-  public:
-#ifdef WITH_STL
-    /// Motif map type
-    typedef std::map<TString, AliMpVMotif*> MotifMap;
-    /// Motif map iterator type
-    typedef MotifMap::const_iterator        MotifMapIterator;
-    /// Motif type map type
-    typedef std::map<TString, AliMpMotifType*> MotifTypeMap;
-    /// Motif type map iterator type
-    typedef MotifTypeMap::const_iterator       MotifTypeMapIterator;
-    /// Motif position map to int type
-    typedef std::map<Int_t, AliMpMotifPosition*>  MotiPositionMap;
-    /// Motif position map to int iterator type
-    typedef MotiPositionMap::const_iterator       MotifPositionMapIterator;
-    /// Motif position map to int pair type
-    typedef std::map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
-    /// Motif position map to int pair iterator type
-    typedef MotifPositionMap2::const_iterator           MotifPositionMap2Iterator;
-#endif    
-#ifdef WITH_ROOT
-    /// Motif map type
-    typedef AliMpExMap MotifMap;
-    /// Motif type map type
-    typedef AliMpExMap MotifTypeMap;
-    /// Motif position map to int type
-    typedef AliMpExMap MotifPositionMap;
-    /// Motif position map to int pair iterator type
-    typedef AliMpExMap MotifPositionMap2;
-#endif    
-
   public:
     AliMpMotifMap();
     AliMpMotifMap(TRootIOCtor* ioCtor);
@@ -123,15 +80,10 @@ class AliMpMotifMap : public TObject
     void  PrintMotifPositions2() const;
  
     // data members
-    MotifMap           fMotifs;         ///< motifs map
-    MotifTypeMap       fMotifTypes;     ///< motifs types map
-#ifdef WITH_STL
-    std::map<Int_t, AliMpMotifPosition*> fMotifPositions; ///< motif positions map by Id
-#endif
-#ifdef WITH_ROOT
-    MotifPositionMap   fMotifPositions; ///< motifs positions map
-#endif
-    MotifPositionMap2  fMotifPositions2;///< motifs positions map
+    AliMpExMap   fMotifs;         ///< motifs map
+    AliMpExMap   fMotifTypes;     ///< motifs types map
+    AliMpExMap   fMotifPositions; ///< motifs positions map
+    AliMpExMap   fMotifPositions2;///< motifs positions map
 
   ClassDef(AliMpMotifMap,1)  // motif map
 };
index 7faafe59340e187acaca91d39ca4fd60bfff45d9..11bf503cc0b93dd4dbb8ed2b311868a6a471e386 100644 (file)
@@ -99,7 +99,7 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
 
   AliMpMotifType*  motifType = new AliMpMotifType(motifTypeId);        
 
-  PadMapType positions;
+  TExMap positions;
 
   char line[256];
   do {
@@ -119,14 +119,8 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
 
     int i,j;
     strline>>i>>j;
-#ifdef WITH_STL
-    positions[key].first=i;
-    positions[key].second=j;
-#endif
-#ifdef WITH_ROOT
     positions.Add( AliMpExMap::GetIndex(key), 
                    AliMpExMap::GetIndex(AliMpIntPair(i,j)) ); 
-#endif
   } while (!padPosStream.eof());
 
   const Int_t knbergpins = 
@@ -201,21 +195,6 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
     
     gassiNum  = gassiChannel[numBerg-1];
 
-#ifdef WITH_STL
-    PadMapTypeIterator iter = positions.find(padName);
-    if (iter==positions.end()) {
-      AliWarningStream()
-        << "Problem: Pad number " << padNum
-        << " for motif type " << motifTypeId.Data() 
-       << " found in the motifType stream, but not in the padPos stream" << endl;
-      continue;
-    }
-
-    ix= iter->second.first;
-    iy= iter->second.second;
-#endif
-
-#ifdef WITH_ROOT
     Long_t value = positions.GetValue(AliMpExMap::GetIndex(padName));
     if (!value) {
       AliWarningStream()
@@ -227,8 +206,6 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
 
     ix = AliMpExMap::GetPair(value).GetFirst();
     iy = AliMpExMap::GetPair(value).GetSecond();
-    
-#endif
 
     AliMpConnection* connection 
       = new AliMpConnection(padNum,numBerg,numKapton,gassiNum, AliMpIntPair(ix,iy));
index aad229fba4289de2164bb0543b95ff8d7a988efa..62e76892dc443b321d9f3059a795a67d8bdfacd8 100644 (file)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
-
 #include "AliMpStationType.h"
 #include "AliMpStation12Type.h"
 #include "AliMpPlaneType.h"
 #include "AliMpIntPair.h"
-#include "AliMpContainers.h"
 
-#ifdef WITH_ROOT
 #include <TExMap.h>
-#endif    
 #include <TString.h>
 #include <TVector2.h>
 #include <Riostream.h>
 
 #include <fstream>
-#ifdef WITH_STL
-#include <map>
-#endif    
 
 class AliMpMotifMap;
 class AliMpVMotif;
@@ -43,18 +35,6 @@ class AliMpDataStreams;
 
 class AliMpMotifReader : public TObject
 {
-  public:
-#ifdef WITH_STL
-    /// Map of int pair to string
-    typedef std::map<std::string, std::pair<Int_t,Int_t> > PadMapType;
-    /// Map of int pair to string iterator
-    typedef PadMapType::iterator PadMapTypeIterator;
-#endif    
-#ifdef WITH_ROOT
-    /// Map of int pair to string
-    typedef TExMap PadMapType;
-#endif    
-
   public:
     AliMpMotifReader(const AliMpDataStreams& dataStreams,
                      AliMp::StationType station, 
index a8e900f86fe2c1040a29282ffdfea03dc8571a81..3f79ed7f9ff5d019e3e848d9651526e680641d2e 100755 (executable)
@@ -34,6 +34,7 @@
 #include "AliLog.h"
 
 #include <TString.h>
+#include <Riostream.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMpMotifSpecial)
@@ -50,22 +51,13 @@ AliMpMotifSpecial::AliMpMotifSpecial(const TString &id,
   
 {
   /// Standard constructor.
-
-#ifdef WITH_STL
-  fPadDimensionsVector.resize(motifType->GetNofPadsX()*motifType->GetNofPadsY());
-#endif  
 }
 
 //______________________________________________________________________________
 AliMpMotifSpecial::AliMpMotifSpecial(TRootIOCtor* ioCtor):
   AliMpVMotif(),
   fDimensions(),
-#ifdef WITH_STL
-  fPadDimensionsVector(),
-#endif    
-#ifdef WITH_ROOT
   fPadDimensionsVector(ioCtor),
-#endif    
   fPadDimensionsVector2()
 {
   /// Root IO constructor
@@ -96,7 +88,6 @@ Int_t AliMpMotifSpecial::VectorIndex(const AliMpIntPair& indices) const
 // public methods
 //
 
-#include <Riostream.h>
 //______________________________________________________________________________
 TVector2 
 AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const
@@ -104,17 +95,12 @@ AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const
 /// Return the dimensions of pad located at the given indices
 
   if (GetMotifType()->HasPadByLocalIndices(localIndices)) {
-#ifdef WITH_STL
-    return fPadDimensionsVector[VectorIndex(localIndices)];
-#endif  
-#ifdef WITH_ROOT
     if (!fPadDimensionsVector.GetValue(localIndices)) {
       Warning("GetPadDimensions","Indices outside limits");
       return TVector2(0.,0.);
     }
     else      
       return  *((TVector2*)fPadDimensionsVector.GetValue(localIndices));
-#endif 
   } 
   else {
     Warning("GetPadDimensions","Indices outside limits");
@@ -127,13 +113,7 @@ Int_t AliMpMotifSpecial::GetNofPadDimensions() const
 {
 /// Return number of different pad dimensions in this motif
 
-#ifdef WITH_STL
-  return fPadDimensionsVector2.size();
-#endif  
-
-#ifdef WITH_ROOT
   return fPadDimensionsVector2.GetEntriesFast();
-#endif  
 }  
 
 //______________________________________________________________________________
@@ -146,13 +126,7 @@ TVector2 AliMpMotifSpecial::GetPadDimensions(Int_t i) const
     return TVector2();
   }  
 
-#ifdef WITH_STL
-  return fPadDimensionsVector2[i];
-#endif  
-
-#ifdef WITH_ROOT
   return *((TVector2*) fPadDimensionsVector2[i]);
-#endif  
 }  
 
 //______________________________________________________________________________
@@ -281,21 +255,6 @@ void AliMpMotifSpecial::SetPadDimensions(const AliMpIntPair& localIndices,
   }  
 
   // fill the dimensions map vector
-#ifdef WITH_STL
-  fPadDimensionsVector[VectorIndex(localIndices)]=dimensions;
-  
-  // fill the vector of different pad dimensions
-  // only if these dimensions are not yet present
-  Bool_t isPresent = false;
-  for (Int_t i=0; i<GetNofPadDimensions(); i++) {
-    if (AliMpConstants::IsEqual(fPadDimensionsVector2[i], dimensions)) 
-      isPresent = true;    
-  }    
-  
-  if (!isPresent) fPadDimensionsVector2.push_back(dimensions);
-#endif  
-
-#ifdef WITH_ROOT
   TVector2* dimensionsObj = new TVector2(dimensions);
   fPadDimensionsVector.Add(localIndices, dimensionsObj);
 
@@ -308,6 +267,4 @@ void AliMpMotifSpecial::SetPadDimensions(const AliMpIntPair& localIndices,
   }    
   
   if (!isPresent) fPadDimensionsVector2.Add(dimensionsObj);
-#endif  
-  
 }
index d9d8f983070ac3c738e1edd6350a25a3fea3828a..b5605d64e244c27cb3d1d04a6f7f2a7b6ebddd18 100755 (executable)
 #ifndef ALI_MP_MOTIF_SPECIAL_H
 #define ALI_MP_MOTIF_SPECIAL_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVMotif.h"
-#ifdef WITH_ROOT
 #include "AliMpExMap.h"
-#endif
 
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class TString;
 
 class AliMpMotifSpecial : public AliMpVMotif
 {
- public:
-#ifdef WITH_STL
-  /// Dimensions map type
-  typedef std::vector< TVector2 > DimensionsMap;
-  /// Dimensions map iterator type
-  typedef std::vector< TVector2 > DimensionsMap2;
-#endif    
-#ifdef WITH_ROOT
-  /// Dimensions map type
-  typedef AliMpExMap DimensionsMap;
-  /// Dimensions map iterator type
-  typedef TObjArray  DimensionsMap2;
-#endif    
-
  public:
   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
   AliMpMotifSpecial(TRootIOCtor* ioCtor);
@@ -76,9 +52,9 @@ class AliMpMotifSpecial : public AliMpVMotif
   Int_t VectorIndex(const AliMpIntPair& indices) const;
 
   // data members
-  TVector2        fDimensions;           ///< motif dimensions
-  DimensionsMap   fPadDimensionsVector;  ///< the vector of pad dimensions
-  DimensionsMap2  fPadDimensionsVector2; ///< the vector of different pad dimensions
+  TVector2     fDimensions;           ///< motif dimensions
+  AliMpExMap   fPadDimensionsVector;  ///< the vector of pad dimensions
+  TObjArray    fPadDimensionsVector2; ///< the vector of different pad dimensions
 
   ClassDef(AliMpMotifSpecial,2) // A motif with its ID
 };
index 3be991e03f3630b4b4d5941a1b2ed89a3f626307..61d13ff65b0df2920c0ad4d27bcd9dcc4613d3f8 100755 (executable)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
-
 #include "AliMpIntPair.h"
+
 #ifndef ROOT_TObjArray
-#  include "TObjArray.h"
+#  include <TObjArray.h>
 #endif
 
 #include <TString.h>
index ad40864b79cfbe3a0a062c342aeaf2a9d8203219..a80eb4fcf82e482d1e01dfb5d38d178859eed74f 100755 (executable)
@@ -88,9 +88,7 @@ AliMpNeighboursPadIterator::~AliMpNeighboursPadIterator()
 {
 /// Destructor
 
-#ifdef WITH_ROOT
   fPads.Delete();
-#endif
 }
 
 // operators
@@ -102,7 +100,6 @@ AliMpNeighboursPadIterator::operator = (const AliMpNeighboursPadIterator& right)
 /// Assignment operator.                                                     \n
 /// If the right hand iterator isn't of a good type
 /// the current operator is invalidated                                      \n
-/// Not provided for WITH_ROOT option.
 
   // check assignment to self
   if (this == &right) return *this;
@@ -110,15 +107,7 @@ AliMpNeighboursPadIterator::operator = (const AliMpNeighboursPadIterator& right)
   // base class assignment
   AliMpVPadIterator::operator=(right);
 
-#ifdef WITH_STL
-  fkSegmentation = right.fkSegmentation;
-  fCenterPad     = right.fCenterPad;
-  fPads          = right.fPads;
-  fIndex         = right.fIndex;
-#endif
-#ifdef WITH_ROOT
   AliFatal("Not allowed assignment for TObjArray");
-#endif
 
   return *this;
 } 
@@ -142,9 +131,8 @@ Bool_t AliMpNeighboursPadIterator::IsNeighbour(const AliMpPad& pad) const
 
 }
 
-#ifdef WITH_STL
 //______________________________________________________________________________
-AliMpNeighboursPadIterator::PadVector 
+TObjArray* 
 AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
                                           const AliMpIntPair& direction) const
 {
@@ -153,44 +141,7 @@ AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
 /// starting from \a from and moving by \a direction
 
     AliMpPad current = from;
-    PadVector ans;
-    Bool_t cont=kTRUE;
-    do {
-        if (IsNeighbour(current))
-            ans.push_back(current);
-        else
-            cont=kFALSE;
-        TVector2 nextPos = current.Position() + TVector2(
-          current.Dimensions().X()*(AliMpConstants::LengthStep()+1.)*direction.GetFirst(),
-          current.Dimensions().Y()*(AliMpConstants::LengthStep()+1.)*direction.GetSecond());
-        current = fkSegmentation->PadByPosition(nextPos, false);
-    } while (cont);
-    return ans;
-}
-
-//______________________________________________________________________________
-void  AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, 
-                                                 const PadVector& from) const
-{
-/// Add pads from pad vector to the total set 
-/// only if they are not yet included
-
-    setTotal.insert(from.begin(),from.end());
-}    
-
-#endif
-#ifdef WITH_ROOT
-//______________________________________________________________________________
-AliMpNeighboursPadIterator::PadVector* 
-AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
-                                          const AliMpIntPair& direction) const
-{
-/// Fill  a new vector with all pads which have common
-/// parts with the pad located at \a fCenterPad, in a given line
-/// starting from \a from and moving by \a direction
-
-    AliMpPad current = from;
-    PadVector* ans = new PadVector();
+    TObjArray* ans = new TObjArray();
     Bool_t cont=kTRUE;
     do {
         if (IsNeighbour(current))
@@ -206,8 +157,8 @@ AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
 }
 
 //______________________________________________________________________________
-void  AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal, 
-                                                 PadVector* from) const
+void  AliMpNeighboursPadIterator::UpdateTotalSet(TObjArray& setTotal, 
+                                                 TObjArray* from) const
 {
 /// Add pads from pad vector to the total set 
 /// only if they are not yet included and deletes the pad vector
@@ -232,8 +183,6 @@ void  AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal,
     delete from;
 } 
 
-#endif
-
 //______________________________________________________________________________
 void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
 {
@@ -245,16 +194,11 @@ void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
     
     AliMpPad from;
     AliMpIntPair direction;
-#ifdef WITH_STL
-    PadVector found;
-#endif
-#ifdef WITH_ROOT
-    PadVector* found;
-#endif
+    TObjArray* found;
     
     // repare a unique simple associative container
     // --> no doublons, rapid insersion
-    PadSet setTotal;
+    TObjArray setTotal;
 
   /////////////  Left side
   
@@ -323,25 +267,12 @@ void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
     // fill the fIndices vector with the set (-->pass from a rapid insertion,
     // to rapid and indexed access, for the rest of the job)
 
-#ifdef WITH_STL
-    fPads.clear();
-    // include the center pad if requiered
-    if (includeCenter) fPads.push_back(fCenterPad);
-    //fPads.insert(fPads.end(),setTotal.begin(),setTotal.end());
-    
-    PadSetCIterator it;
-    for (it = setTotal.begin(); it != setTotal.end(); it++)
-      fPads.push_back((*it));
-#endif
-
-#ifdef WITH_ROOT
     fPads.Delete();
     // include the center pad if requiered
     if (includeCenter) fPads.Add(new AliMpPad(fCenterPad));
 
     for (Int_t i = 0; i<setTotal.GetEntriesFast(); i++)
       fPads.Add(setTotal.At(i));
-#endif
 }
 
 //______________________________________________________________________________
@@ -360,12 +291,7 @@ void AliMpNeighboursPadIterator::First()
 /// Reset the iterator, so that it points to the first available
 /// pad in the sector
 
-#ifdef WITH_STL
-    if ((fkSegmentation != 0) && (fPads.size() != 0)) 
-#endif
-#ifdef WITH_ROOT
     if ((fkSegmentation != 0) && (fPads.GetEntriesFast() != 0)) 
-#endif
       fIndex=0; 
     else 
       fIndex=fgkInvalidIndex;
@@ -381,12 +307,7 @@ void AliMpNeighboursPadIterator::Next()
 
   if (!IsValid()) return;
   
-#ifdef WITH_STL
-  if (fIndex < fPads.size()-1) 
-#endif
-#ifdef WITH_ROOT
   if (Int_t(fIndex) < fPads.GetEntriesFast()-1) 
-#endif
     fIndex++; 
   else 
     Invalidate();
@@ -408,12 +329,7 @@ AliMpPad AliMpNeighboursPadIterator::CurrentItem() const
   if (!IsValid())
     return AliMpPad::Invalid();
   else
-#ifdef WITH_STL
-    return fPads[fIndex];
-#endif
-#ifdef WITH_ROOT
     return *((AliMpPad*)fPads[fIndex]);
-#endif
 }
 
 //______________________________________________________________________________
index 40d2bed5ec1eefad0bd1ec9fb774e392f178da37..c09a816c31ce13670d83cc6d977cb2729ced3025 100755 (executable)
 #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVPadIterator.h"
 #include "AliMpPad.h"
 
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#include <set>
-#endif
 
 class AliMpVSegmentation;
 class AliMpIntPair;
 
 class AliMpNeighboursPadIterator : public AliMpVPadIterator
 {
-  public:
-#ifdef WITH_STL
-    /// Pad vector type
-    typedef std::vector<AliMpPad>  PadVector;
-    /// Pad set type
-    typedef std::set<AliMpPad>     PadSet;
-    /// Pad set iterator type
-    typedef PadSet::const_iterator PadSetCIterator;
-#endif
-#ifdef WITH_ROOT
-    /// Pad vector type
-    typedef TObjArray  PadVector;
-    /// Pad set type
-    typedef TObjArray  PadSet;
-#endif
-
   public:
     AliMpNeighboursPadIterator();
     AliMpNeighboursPadIterator(const AliMpVSegmentation* segmentation,
@@ -72,25 +47,18 @@ class AliMpNeighboursPadIterator : public AliMpVPadIterator
     static const UInt_t   fgkInvalidIndex; ///< invalid index number
 
     // private methods
-    Bool_t    IsNeighbour(const AliMpPad& pad) const;
-#ifdef WITH_STL
-    PadVector PadVectorLine(const AliMpPad& from,
-                            const AliMpIntPair& direction) const;
-    void      UpdateTotalSet(PadSet& setTotal, const PadVector& from) const;
-#endif
-#ifdef WITH_ROOT
-    PadVector* PadVectorLine(const AliMpPad& from,
+    Bool_t     IsNeighbour(const AliMpPad& pad) const;
+    TObjArray* PadVectorLine(const AliMpPad& from,
                              const AliMpIntPair& direction) const;
-    void      UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
-#endif
-    void      FillPadsVector(Bool_t includeCenter);
-    Bool_t    IsValid() const;
+    void       UpdateTotalSet(TObjArray& setTotal, TObjArray* from) const;
+    void       FillPadsVector(Bool_t includeCenter);
+    Bool_t     IsValid() const;
 
     // private data members
     const AliMpVSegmentation* fkSegmentation; ///< \brief The segmentation
                            ///  segmentation over which to iterate
     AliMpPad   fCenterPad; ///< Pad arround which we iterate
-    PadVector  fPads;      ///< The list of pad arround fCenterIndices
+    TObjArray  fPads;      ///< The list of pad arround fCenterIndices
     UInt_t     fIndex;     ///< Current index inside the fPads vector
 
   ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads
index 9ddb95bbf35185535384b45fc20ae13f87f7a62f..d4905f426ac8bff753f3395f146a5ce4759dba27 100644 (file)
@@ -77,9 +77,7 @@ AliMpPCB::AliMpPCB()
       ///
       /// Default ctor.
       ///
-#ifdef WITH_ROOT
     fMotifPositions.SetOwner(kTRUE);
-#endif
     AliDebug(1,Form("this=%p",this));
 }
 
@@ -107,9 +105,7 @@ AliMpPCB::AliMpPCB(AliMpSlatMotifMap* motifMap, const char* id, Double_t padSize
       /// Normal ctor. Must be fed with the PCB's name (id), the pad dimensions
       /// and the global dimension of the virtual enveloppe of the PCB
       /// (usually 400x400 mm)
-#ifdef WITH_ROOT
     fMotifPositions.SetOwner(kTRUE);
-#endif
     AliDebug(1,Form("this=%p id=%s",this,id));
 }
 
@@ -135,9 +131,8 @@ AliMpPCB::AliMpPCB(const AliMpPCB& o)
   ///
   /// Copy constructor
 
-#ifdef WITH_ROOT
-    fMotifPositions.SetOwner(kTRUE);
-#endif
+  fMotifPositions.SetOwner(kTRUE);
+
   AliDebug(1,Form("this=%p (copy ctor) : begin",this));
   o.Copy(*this);
   AliDebug(1,Form("this=%p (copy ctor) : end",this));
@@ -173,18 +168,13 @@ AliMpPCB::AliMpPCB(const char* id, AliMpMotifSpecial* ms)
  
     AliDebug(1,Form("this=%p (ctor special motif)",this));
     
-#ifdef WITH_ROOT
     fMotifPositions.SetOwner(kTRUE);
-#endif
+
   TVector2 position(ms->Dimensions());
   AliMpMotifPosition* mp = new AliMpMotifPosition(-1,ms,position);
   mp->SetLowIndicesLimit(AliMpIntPair(fIxmin,fIymin));
   mp->SetHighIndicesLimit(AliMpIntPair(fIxmax,fIymax));
-#ifdef WITH_ROOT
   fMotifPositions.AddLast(mp);
-#else
-  fMotifPositions.push_back(mp);
-#endif
 }
 
 //_____________________________________________________________________________
@@ -206,13 +196,6 @@ AliMpPCB::~AliMpPCB()
   /// Dtor.
   ///
   AliDebug(1,Form("this=%p",this));
-#ifndef WITH_ROOT
-  for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-  {
-    delete fMotifPositions[i];
-  }
-#endif
-  
 }
 
 //_____________________________________________________________________________
@@ -309,11 +292,7 @@ AliMpPCB::Add(AliMpMotifType* mt, Int_t ix, Int_t iy)
   mp->SetLowIndicesLimit(AliMpIntPair(ixmin,iymin));
   mp->SetHighIndicesLimit(AliMpIntPair(ixmax,iymax));
 
-#ifdef WITH_ROOT
   fMotifPositions.AddLast(mp);
-#else
-  fMotifPositions.push_back(mp);
-#endif
 
   fIxmin = TMath::Min(fIxmin,ixmin);
   fIxmax = TMath::Max(fIxmax,ixmax);
@@ -429,22 +408,11 @@ AliMpPCB::Copy(TObject& o) const
   pcb.fActiveXmin = fActiveXmin;
   pcb.fActiveXmax = fActiveXmax;
 
-#ifdef WITH_ROOT
   AliDebug(1,"Deleting pcb.fMotifPositions");
   pcb.fMotifPositions.Delete();
   AliDebug(1,"Deleting pcb.fMotifPositions : done");
-#else
-  for ( UInt_t i = 0; i < pcb.fMotifPositions.size(); ++i )
-  {
-    delete pcb.fMotifPositions[i];
-  }
-#endif
 
-#ifdef WITH_ROOT
   for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
-  for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif  
     {
       AliMpMotifPosition* pos = (AliMpMotifPosition*)fMotifPositions[i];
       AliMpMotifPosition* pcbpos = new AliMpMotifPosition(pos->GetID(),
@@ -452,11 +420,7 @@ AliMpPCB::Copy(TObject& o) const
                                                           pos->Position());
       pcbpos->SetLowIndicesLimit(pos->GetLowIndicesLimit());
       pcbpos->SetHighIndicesLimit(pos->GetHighIndicesLimit());
-#ifdef WITH_ROOT
       pcb.fMotifPositions.AddLast(pcbpos);
-#else      
-      pcb.fMotifPositions.push_back(pcbpos);
-#endif      
     }
     
     pcb.fNofPads = fNofPads;  
@@ -527,11 +491,7 @@ AliMpPCB::FindMotifPosition(Int_t ix, Int_t iy) const
   /// integer indices (ix,iy).
   ///
   
-#ifdef WITH_ROOT
   for (Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else  
-  for (UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
     {
       AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifPositions[i];
       if ( mp->HasPadByIndices(AliMpIntPair(ix,iy)) )
@@ -550,11 +510,7 @@ AliMpPCB::FindMotifPosition(Double_t x, Double_t y) const
   /// Returns the motifPosition located at position (x,y)
   ///
   
-#ifdef WITH_ROOT
   for (Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else  
-  for (UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif   
   {
     AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifPositions[i];
     
@@ -589,11 +545,8 @@ AliMpPCB::GetMotifPosition(Int_t i) const
   /// Get the i-th motifPosition stored in this PCB's internal array.
   ///
   
-#ifdef WITH_ROOT
   if ( i >= fMotifPositions.GetEntriesFast() ) return 0;
-#else
-  if ( i >= Int_t(fMotifPositions.size()) ) return 0;
-#endif  
+
   return (AliMpMotifPosition*)fMotifPositions[i];
 }
 
@@ -627,11 +580,7 @@ AliMpPCB::GetSize() const
   /// Returns the number of motifPositions stored in this PCB.
   ///
   
-#ifdef WITH_ROOT
   return fMotifPositions.GetEntriesFast();
-#else  
-  return fMotifPositions.size();
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -640,7 +589,6 @@ AliMpPCB::HasMotifPositionID(Int_t manuId) const
 {
   /// Returns whether or not we have manuId
 
-#ifdef WITH_ROOT
   TIter next(&fMotifPositions);
   AliMpMotifPosition* pos;
   while ( ( pos = static_cast<AliMpMotifPosition*>(next()) ) )
@@ -648,12 +596,6 @@ AliMpPCB::HasMotifPositionID(Int_t manuId) const
     if ( pos->GetID() == manuId ) return kTRUE;
   }
   return kFALSE;
-#else
-  for ( UInt_t i=0; i<fMotifPositions.size(); ++i ) {
-    if ( fMotifPositions[i]->GetID() == manuId ) return kTRUE;
-  }  
-  return kFALSE;
-#endif
 }
 
 
@@ -741,11 +683,7 @@ AliMpPCB::Print(Option_t* option) const
   
   if ( option && option[0] == 'M' )
   {
-#ifdef WITH_ROOT
     for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else  
-    for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif    
     {
       if (option)
            {
@@ -771,11 +709,7 @@ AliMpPCB::Save() const
   TList lines;
   lines.SetOwner(kTRUE);
   
-#ifdef WITH_ROOT
   for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else  
-  for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif    
   {
     AliMpMotifPosition* pos = GetMotifPosition(i);
     AliMpVMotif* motif = pos->GetMotif();
index df826207dc6793406c901e42c5109e143a446813..bb73e27f6f05de71e2bdc4a125f5649a43c17817 100644 (file)
 #ifndef ALIMPPCB_H
 #define ALIMPPCB_H
 
-#ifndef ROOT_TObject
-#  include "TObject.h"
+#ifndef ALI_MP_VPAD_ITERATOR_H
+#  include "AliMpVPadIterator.h"
 #endif
 
-#ifndef ROOT_TString
-#  include "TString.h"
+#ifndef ALI_MP_AREA_H
+#  include "AliMpArea.h"
 #endif
 
-#  ifndef ROOT_TArraI
-#    include "TArrayI.h"
-#  endif
 
-#include "AliMpContainers.h"
+#ifndef ROOT_TObject
+#  include "TObject.h"
+#endif
 
-#ifdef WITH_ROOT
-#  ifndef ROOT_TObjArray
-#    include "TObjArray.h"
-#  endif
-#else
-#  include <vector>
+#ifndef ROOT_TString
+#  include "TString.h"
 #endif
 
-#ifndef ALI_MP_VPAD_ITERATOR_H
-#  include "AliMpVPadIterator.h"
+#ifndef ROOT_TArraI
+#  include "TArrayI.h"
 #endif
 
-#ifndef ALI_MP_AREA_H
-#  include "AliMpArea.h"
+#ifndef ROOT_TObjArray
+#  include "TObjArray.h"
 #endif
 
 class AliMpSlatMotifMap;
@@ -160,11 +155,7 @@ class AliMpPCB : public TObject
   Int_t fIxmax; ///< max pad index in x
   Int_t fIymin; ///< min pad index in y
   Int_t fIymax; ///< max pad index in y
-#ifdef WITH_ROOT
   TObjArray fMotifPositions; ///< array of motifs
-#else  
-  std::vector<AliMpMotifPosition*> fMotifPositions; ///< array of motif positions
-#endif
   Int_t fNofPads; ///< number of pads in this PCB
   AliMpSlatMotifMap* fMotifMap; ///< to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion
   
index 38bc60b7722a642d8c2261fd1a84ade54d0c63aa..c845909b414e9902c7ef7ab4969141b793a50b1c 100755 (executable)
@@ -64,9 +64,7 @@ AliMpPad::AliMpPad(const AliMpIntPair& location,const AliMpIntPair& indices,
                    Bool_t validity)
  : TObject(),
    fLocations(0),
-#ifdef WITH_ROOT
    fNofLocations(0),
-#endif
    fLocation(location),
    fIndices(indices),
    fPosition(position),
@@ -85,9 +83,7 @@ AliMpPad::AliMpPad(const AliMpIntPair& location,const AliMpIntPair& indices,
 AliMpPad::AliMpPad()
   : TObject(),
     fLocations(0),
-#ifdef WITH_ROOT
     fNofLocations(0),
-#endif
     fLocation(AliMpIntPair::Invalid()),
     fIndices(AliMpIntPair::Invalid()),
     fPosition(-1.,-1.),
@@ -102,9 +98,7 @@ AliMpPad::AliMpPad()
 AliMpPad::AliMpPad(const AliMpPad& rhs)
   : TObject(rhs),
     fLocations(0),
-#ifdef WITH_ROOT
     fNofLocations(0),
-#endif
     fLocation(AliMpIntPair::Invalid()),
     fIndices(AliMpIntPair::Invalid()),
     fPosition(-1.,-1.),
@@ -121,13 +115,7 @@ AliMpPad::~AliMpPad()
 {
 /// Destructor
 
-#ifdef WITH_STL
-  delete fLocations;
-#endif
-
-#ifdef WITH_ROOT
   delete [] fLocations;
-#endif
 }
 
 //_____________________________________________________________________________
@@ -149,24 +137,12 @@ AliMpPad& AliMpPad::operator = (const AliMpPad& rhs)
   fValidity = rhs.fValidity;
   
   fLocations = 0;
-
-#ifdef WITH_STL
-  if ( rhs.GetNofLocations() ) {
-    fLocations = new IntPairVector(rhs.GetNofLocations());
-    
-    for (Int_t i=0; i<rhs.GetNofLocations(); i++)
-      (*fLocations)[i] = rhs.GetLocation(i);
-  }                    
-#endif
-
-#ifdef WITH_ROOT
   fNofLocations = rhs.fNofLocations;
   if ( rhs.GetNofLocations() ) {
     fLocations = new AliMpIntPair[fgkMaxNofLocations];
     for ( UInt_t i=0; i<rhs.fNofLocations; i++ )
       fLocations[i] = rhs.fLocations[i];
   }                    
-#endif
 
   return *this;
 }
@@ -245,21 +221,11 @@ Bool_t AliMpPad::AddLocation(const AliMpIntPair& location, Bool_t warn)
   } 
   
   // Add location
-#ifdef WITH_STL
-  if (! fLocations )  
-    fLocations = new IntPairVector();
-
-  fLocations->push_back(location);
-  return true;
-#endif
-
-#ifdef WITH_ROOT
   if ( ! fLocations)
     fLocations = new AliMpIntPair[fgkMaxNofLocations];
   
   fLocations[fNofLocations++] = location;
   return true;
-#endif
 }
 
 //_____________________________________________________________________________
@@ -302,13 +268,7 @@ Int_t  AliMpPad::GetNofLocations() const
 
   if (!fLocations) return 0;
   
-#ifdef WITH_STL
-  return fLocations->size();
-#endif
-
-#ifdef WITH_ROOT
   return fNofLocations;
-#endif
 }  
   
 
@@ -320,13 +280,7 @@ AliMpIntPair AliMpPad::GetLocation(Int_t i) const
   if ( !fLocations || i<0 || i>=GetNofLocations() ) 
     return AliMpIntPair::Invalid();
 
-#ifdef WITH_STL
-  return (*fLocations)[i];
-#endif
-  
-#ifdef WITH_ROOT
   return fLocations[i];
-#endif
 }  
 
 //_____________________________________________________________________________
index 86867814cce8524151d0136941d6f5047e6ecc8a..726e3c3a520e96d22740cf8e0c5a16e9b7977605 100755 (executable)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
 #include "AliMpIntPair.h"
 
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TClonesArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpPad : public TObject
 {
- public:
-#ifdef WITH_STL
-  /// Int pair vector type
-  typedef std::vector<AliMpIntPair> IntPairVector;
-#endif
-#ifdef WITH_ROOT
-  /// Int pair vector type
-  typedef AliMpIntPair  IntPairVector;
-#endif
-
  public:
   AliMpPad(const AliMpIntPair& location, const AliMpIntPair& indices,
            const TVector2& position, const TVector2& dimensions,
@@ -94,10 +77,8 @@ class AliMpPad : public TObject
   static const Int_t  fgkMaxNofLocations; ///< \brief maximum number of pad locations
                                           /// in the collection
   // data members
-  IntPairVector*  fLocations;      ///<  collection of pad locations 
-#ifdef WITH_ROOT
+  AliMpIntPair*   fLocations;      ///<  collection of pad locations 
   UInt_t          fNofLocations;   ///<  number of locations in fLocations
-#endif
   AliMpIntPair    fLocation;       ///<  pad location
   AliMpIntPair    fIndices;        ///<  pad indices
   TVector2        fPosition;       ///<  the pad position (in cm)
index 7fd5221b7f6d799b3a102c3c174f9271fcddfc26..2d0eb8265944e75dcf5aea68d4484eafe5242fc2 100755 (executable)
@@ -113,13 +113,7 @@ AliMpPadRow::AddPadRowSegment(AliMpMotif* motif, Int_t motifPositionId,
   padRowSegment->SetOffsetX(CurrentBorderX());
 
   // Adds the pad row segment
-#ifdef WITH_STL
-  fSegments.push_back(padRowSegment);
-#endif
-
-#ifdef WITH_ROOT
   fSegments.Add(padRowSegment);
-#endif
   
   return padRowSegment;
 }  
@@ -176,13 +170,7 @@ Int_t AliMpPadRow::GetNofPadRowSegments() const
 {
 /// Return the number of pad row segments.
 
-#ifdef WITH_STL
-  return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
   return fSegments.GetEntriesFast();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -195,13 +183,7 @@ AliMpVPadRowSegment* AliMpPadRow::GetPadRowSegment(Int_t i) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fSegments[i];  
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpVPadRowSegment*)fSegments[i];  
-#endif
 }
 
 //_____________________________________________________________________________
index 8c9b725d7950b786b72e60d8f11591de59e0aa79..aaef5e355327e6fd8e0779b8e0a352cdb03d6698 100755 (executable)
 
 #include <TObject.h>
 
-#include "AliMpContainers.h"
-
 #include "AliMpXDirection.h"
 
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpVPadRowSegment;
 class AliMpMotif;
 
 class AliMpPadRow : public TObject
 {
-  public:
-#ifdef WITH_STL
-    /// Pad row segment vector type
-    typedef std::vector<AliMpVPadRowSegment*>  PadRowSegmentVector;
-#endif
-#ifdef WITH_ROOT
-    /// Pad row segment vector type
-    typedef TObjArray  PadRowSegmentVector;
-#endif
-
   public:
     AliMpPadRow(AliMp::XDirection direction);
     AliMpPadRow();
@@ -72,7 +54,7 @@ class AliMpPadRow : public TObject
     AliMp::XDirection   fDirection; ///< the pad row x direction
     Int_t               fID;        ///< the pad row ID
     Double_t            fOffsetX;   ///< the x position of the border
-    PadRowSegmentVector fSegments;  ///< the pad row segments
+    TObjArray           fSegments;  ///< the pad row segments
 
   ClassDef(AliMpPadRow,1)  // Pad row
 };
index 3a2ce1e0a825eff77be98a4dbc07ce0b8aa985ce..8c6d6520564fd75518a32efa86acc4fcd66ce4b5 100755 (executable)
@@ -71,14 +71,7 @@ AliMpRow::~AliMpRow()
 {
 /// Destructor 
 
-#ifdef WITH_STL
-  for (Int_t i=0; i<GetNofRowSegments(); i++)
-    delete fSegments[i]; 
-#endif
-
-#ifdef WITH_ROOT
   fSegments.Delete();
-#endif
 }
 
 //
@@ -173,13 +166,7 @@ void AliMpRow::AddRowSegment(AliMpVRowSegment* rowSegment)
 {
 /// Add row segment at the end.
 
-#ifdef WITH_STL
-  fSegments.push_back(rowSegment);
-#endif
-
-#ifdef WITH_ROOT
   fSegments.Add(rowSegment);
-#endif
 }  
   
 //_____________________________________________________________________________
@@ -187,13 +174,7 @@ void AliMpRow::AddRowSegmentInFront(AliMpVRowSegment* rowSegment)
 {
 /// Insert row segment in the first vector position.
 
-#ifdef WITH_STL
-  fSegments.insert(fSegments.begin(), rowSegment);
-#endif
-
-#ifdef WITH_ROOT
   fSegments.AddFirst(rowSegment);
-#endif
 }  
   
 //_____________________________________________________________________________
@@ -204,12 +185,7 @@ AliMpVRowSegment* AliMpRow::FindRowSegment(Double_t x) const
 
   for (Int_t i=0; i<GetNofRowSegments(); i++) {
 
-#ifdef WITH_STL
-    AliMpVRowSegment* rs = fSegments[i];
-#endif
-#ifdef WITH_ROOT
     AliMpVRowSegment* rs = (AliMpVRowSegment*)fSegments.At(i);
-#endif
 
     if (x >= rs->LeftBorderX() && x <= rs->RightBorderX())
       return rs;
@@ -438,13 +414,7 @@ Int_t AliMpRow::GetNofRowSegments() const
 {
 /// Return number of row segments.
 
-#ifdef WITH_STL
-  return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
   return fSegments.GetSize();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -457,12 +427,6 @@ AliMpVRowSegment* AliMpRow::GetRowSegment(Int_t i) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fSegments[i];  
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpVRowSegment*)fSegments.At(i);  
-#endif
 }
  
index 3a197c6c1c28dc75f5f275d14c10ce33bc5d51c6..fe8cfafba231b26cc0536d679c533a04fb6b59a1 100755 (executable)
 #ifndef ALI_MP_ROW_H
 #define ALI_MP_ROW_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVIndexed.h"
 #include "AliMpDirection.h"
 
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TList.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpVRowSegment;
 class AliMpVPadIterator;
@@ -34,16 +26,6 @@ class AliMpMotifMap;
 
 class AliMpRow : public AliMpVIndexed
 {
-  public:
-#ifdef WITH_STL
-    /// Row segment vector type
-    typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
-#endif
-#ifdef WITH_ROOT
-    /// Row segment vector type
-    typedef TList  RowSegmentVector;
-#endif
-
   public:
     AliMpRow(Int_t id, AliMpMotifMap* motifMap);
     AliMpRow();
@@ -88,7 +70,7 @@ class AliMpRow : public AliMpVIndexed
     // data members
     UInt_t            fID;      ///< row ID
     Double_t          fOffsetY; ///< the y position of the centre of motifs
-    RowSegmentVector  fSegments;///< row segments
+    TList             fSegments;///< row segments
     AliMpMotifMap*    fMotifMap;///< the motif map associated with its sector
 
   ClassDef(AliMpRow,1)  // Row
index 33040d5b4a42fb4747ccd582577b67d48a38ab1c..12b271a622e9d4d25f471bc441a7e7fb152a1e3f 100755 (executable)
@@ -64,21 +64,11 @@ AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
 
   fMotifMap = new AliMpMotifMap;
 
-#ifdef WITH_STL
-  for (Int_t izone = 0; izone<nofZones; izone++) 
-    fZones.push_back(new AliMpZone(izone+1));
-    
-  for (Int_t irow = 0; irow<nofRows; irow++) 
-    fRows.push_back(new AliMpRow(irow, fMotifMap));
-#endif
-
-#ifdef WITH_ROOT
   for (Int_t izone = 0; izone<nofZones; izone++) 
     fZones.Add(new AliMpZone(izone+1));
     
   for (Int_t irow = 0; irow<nofRows; irow++) 
     fRows.Add(new AliMpRow(irow, fMotifMap));
-#endif
 }
 
 //_____________________________________________________________________________
@@ -297,20 +287,11 @@ AliMpRow* AliMpSector::FindRow(const TVector2& position) const
   
   Double_t y = position.Y();
   
-#ifdef WITH_STL
-  for (Int_t i=0; i<GetNofRows(); i++) {
-    if ( y >= fRows[i]->LowBorderY() && y <= fRows[i]->UpperBorderY())
-      return fRows[i];
-  }    
-#endif
-
-#ifdef WITH_ROOT
   for (Int_t i=0; i<GetNofRows(); i++) {
     if ( y >= ((AliMpRow*)fRows[i])->LowBorderY() && 
          y <= ((AliMpRow*)fRows[i])->UpperBorderY())
       return (AliMpRow*)fRows[i];
   }    
-#endif
   
   return 0;
 }
@@ -365,13 +346,8 @@ AliMpVRowSegment* AliMpSector::FindRowSegment(Int_t motifPositionId) const
 
   for (Int_t irow=0; irow<GetNofRows(); irow++) {
 
-#ifdef WITH_STL
-    AliMpRow* row = fRows[irow];
-#endif
-#ifdef WITH_ROOT
     AliMpRow* row = (AliMpRow*)fRows[irow];
-#endif
-   
+
     for (Int_t iseg=0; iseg<row->GetNofRowSegments(); iseg++) {
       AliMpVRowSegment* segment = row->GetRowSegment(iseg); 
       if (segment->HasMotifPosition(motifPositionId)) return segment;
@@ -430,23 +406,12 @@ TVector2 AliMpSector::Dimensions() const
   Double_t y = 0.;
   for (Int_t i=0; i<GetNofRows(); i++) {
 
-#ifdef WITH_STL
-    // take the largest x row dimension
-    if (fRows[i]->Dimensions().X() > x) 
-      x = fRows[i]->Dimensions().X();
-      
-    // add all rows y dimensions  
-    y += fRows[i]->Dimensions().Y();
-#endif
-
-#ifdef WITH_ROOT
     // take the largest x row dimension
     if ( ((AliMpRow*)fRows[i])->Dimensions().X() > x) 
       x = ((AliMpRow*)fRows[i])->Dimensions().X();
       
     // add all rows y dimensions  
     y += ((AliMpRow*)fRows[i])->Dimensions().Y();
-#endif
   }
   
   return TVector2(x, y);  
@@ -457,13 +422,7 @@ Int_t AliMpSector::GetNofZones() const
 {    
 /// Return the number of zones.
 
-#ifdef WITH_STL
-  return fZones.size();
-#endif
-
-#ifdef WITH_ROOT
   return fZones.GetEntriesFast();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -476,13 +435,7 @@ AliMpZone* AliMpSector::GetZone(Int_t zoneID) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fZones[zoneID-1];
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpZone*)fZones[zoneID-1];
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -490,13 +443,7 @@ Int_t AliMpSector::GetNofRows() const
 {
 /// Return the number of rows.
 
-#ifdef WITH_STL
-  return fRows.size();
-#endif
-
-#ifdef WITH_ROOT
   return fRows.GetEntriesFast();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -509,13 +456,7 @@ AliMpRow* AliMpSector::GetRow(Int_t rowID) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fRows[rowID];
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpRow*)fRows[rowID];
-#endif
 }
 
 //_____________________________________________________________________________
index 4efd4c7aebc6308e00792663f4cbb5839f51a081..1c8cbfd23e532240abed3b9f6cb13ca7fdf312d0 100755 (executable)
 
 #include <TNamed.h>
 
-#include "AliMpContainers.h"
-
 #include "AliMpDirection.h"
 #include "AliMpPlaneType.h"
 #include "AliMpIntPair.h"
 
 #include <TString.h>
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpZone;
 class AliMpRow;
@@ -42,20 +34,6 @@ class TArrayI;
 
 class AliMpSector : public TNamed
 {
-  public:
-#ifdef WITH_STL
-    /// Row vector type
-    typedef std::vector<AliMpRow*> RowVector;
-    /// Zone vector type
-    typedef std::vector<AliMpZone*> ZoneVector;
-#endif
-#ifdef WITH_ROOT
-    /// Row vector type
-    typedef TObjArray  RowVector;
-    /// Zone vector type
-    typedef TObjArray  ZoneVector;
-#endif
-
   public:
     AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
                 AliMp::Direction direction, const TVector2& offset);
@@ -125,8 +103,8 @@ class AliMpSector : public TNamed
     // data members        
     TString    fID;       ///< sector ID
     TVector2   fOffset;   ///< sector position
-    ZoneVector fZones;    ///< zones
-    RowVector  fRows;     ///< rows
+    TObjArray  fZones;    ///< zones
+    TObjArray  fRows;     ///< rows
     AliMpMotifMap*   fMotifMap;         ///< motif map
     AliMp::Direction fDirection;        ///< the direction of constant pad size
     TVector2         fMinPadDimensions; ///< minimum pad dimensions
index a6015c4bdea521bad6231748d2b1a43d5d5d4168..a3ddc66a3f600664d800a13733affe7808f2aeab 100755 (executable)
@@ -438,7 +438,7 @@ void AliMpSectorReader::ReadRowSegmentSpecialData(istream& in,
   // Process data
   //
     
-  AliMpVRowSegmentSpecial::PadRowVector  newPadRows;
+  TObjArray newPadRows;
   for (Int_t i=0; i<nofPadRows; i++) {
     
      // Create pad row
@@ -446,12 +446,7 @@ void AliMpSectorReader::ReadRowSegmentSpecialData(istream& in,
      segment->AddPadRow(padRow);
      
      // Keep the new rows in a temporary vector
-#ifdef WITH_STL
-     newPadRows.push_back(padRow);
-#endif
-#ifdef WITH_ROOT
      newPadRows.Add(padRow);
-#endif
   }   
       
   TString nextKeyword;
@@ -481,12 +476,7 @@ void AliMpSectorReader::ReadRowSegmentSpecialData(istream& in,
     for (Int_t i=0; i<nofPadRows; i++) {
     
       // Get pad row from the temporary vector
-#ifdef WITH_STL
-      AliMpPadRow* padRow = newPadRows[i];
-#endif
-#ifdef WITH_ROOT
       AliMpPadRow* padRow = (AliMpPadRow*)newPadRows[i];
-#endif
       
       // Find motif
       AliMpVMotif* motif = fSector->GetMotifMap()->FindMotif(motifId);
index b61a7a16b80e421b12f8ea576e79991c4067225b..2804f0c9bc71cea3d7ea0278fae7e71fea113909 100755 (executable)
 ClassImp(AliMpSectorSegmentation)
 /// \endcond
 
-#ifdef WITH_ROOT
 const Double_t AliMpSectorSegmentation::fgkS1 = 100000.;
 const Double_t AliMpSectorSegmentation::fgkS2 = 1000.;
-#endif
 
 //______________________________________________________________________________
 AliMpSectorSegmentation::AliMpSectorSegmentation(
@@ -112,7 +110,6 @@ AliMpSectorSegmentation::~AliMpSectorSegmentation()
 // private methods
 //
 
-#ifdef WITH_ROOT
 //______________________________________________________________________________
 Long_t AliMpSectorSegmentation::GetIndex(const TVector2& vector2) const
 {
@@ -129,7 +126,6 @@ TVector2  AliMpSectorSegmentation::GetVector(Long_t index) const
   return TVector2( TMath::Floor(index/fgkS1)/fgkS2,
                    (index - TMath::Floor(index/fgkS1)*fgkS1)/fgkS2 );
 }  
-#endif
 
 //______________________________________________________________________________
 void AliMpSectorSegmentation::FillPadDimensionsMap()
@@ -143,10 +139,6 @@ void AliMpSectorSegmentation::FillPadDimensionsMap()
     if (!AliMpConstants::IsEqual(zone->GetPadDimensions(), TVector2())) {
 
       // regular zone
-#ifdef WITH_STL
-      fPadDimensionsMap[zoneID*10] = zone->GetPadDimensions();
-#endif
-#ifdef WITH_ROOT
      AliDebugStream(3)
        << "Filling fPadDimensions[" << zoneID*10 << "] = ("
        << zone->GetPadDimensions().X() << ", "
@@ -154,7 +146,6 @@ void AliMpSectorSegmentation::FillPadDimensionsMap()
 
      fPadDimensionsMap.Add((Long_t)(zoneID*10), 
                             GetIndex(zone->GetPadDimensions()));
-#endif
     }
     else {
       // special zone
@@ -165,10 +156,6 @@ void AliMpSectorSegmentation::FillPadDimensionsMap()
        
        for (Int_t k=0; k<motif->GetNofPadDimensions(); k++) {
          Int_t index = zoneID*10 +  subIndex++;
-#ifdef WITH_STL
-          fPadDimensionsMap[index] = motif->GetPadDimensions(k);
-#endif
-#ifdef WITH_ROOT
           AliDebugStream(3)
             << "Filling fPadDimensions[" << index << "] = ("
             << motif->GetPadDimensions(k).X() << ", "
@@ -177,7 +164,6 @@ void AliMpSectorSegmentation::FillPadDimensionsMap()
 
           fPadDimensionsMap.Add((Long_t)(index), 
                             GetIndex(motif->GetPadDimensions(k)));
-#endif
        }
       }          
     }    
@@ -639,16 +625,7 @@ Int_t AliMpSectorSegmentation::Zone(const AliMpPad& pad, Bool_t warning) const
     return 0;
   }  
 
-#ifdef WITH_STL
-  PadDimensionsMapCIterator it;
-  for (it = fPadDimensionsMap.begin(); it != fPadDimensionsMap.end(); ++it) {
-    if (AliMpConstants::IsEqual(it->second, pad.Dimensions()))
-      return it->first;
-  }
-#endif
-
-#ifdef WITH_ROOT
-  PadDimensionsMapCIterator it(&fPadDimensionsMap);
+  TExMapIter it(&fPadDimensionsMap);
   Long_t key, value;
   while ( it.Next(key, value) ) {
     TVector2 dimensions =  GetVector(value);
@@ -657,8 +634,6 @@ Int_t AliMpSectorSegmentation::Zone(const AliMpPad& pad, Bool_t warning) const
   } 
   
   AliError(Form("fPadDimensionsMap size is %d",fPadDimensionsMap.GetSize()));
-  
-#endif
 
   // Should never happen
   AliErrorStream() 
@@ -672,15 +647,8 @@ AliMpSectorSegmentation::PadDimensions(Int_t zone, Bool_t warning) const
 {
 /// Return the pad dimensions for the zone with the specified zone index.
 
-#ifdef WITH_STL
-  PadDimensionsMapCIterator it = fPadDimensionsMap.find(zone);
-  if (it != fPadDimensionsMap.end()) return it->second;
-#endif
-
-#ifdef WITH_ROOT
   Long_t value = fPadDimensionsMap.GetValue(zone);
   if (value) return GetVector(value);
-#endif
 
   if (warning) Warning("PadDimensions(zone)", "not found");
   return TVector2();
@@ -739,17 +707,7 @@ void AliMpSectorSegmentation::PrintZones() const
 
   cout << "Zones: " << endl;
 
-#ifdef WITH_STL
-  PadDimensionsMapCIterator it;
-  for (it = fPadDimensionsMap.begin(); it != fPadDimensionsMap.end(); ++it) {
-    cout << "    zone: " <<   setw(4) << it->first;
-    cout << "    pad dimensions: ( " 
-         << it->second.X() << ", " << it->second.Y() << ")" << endl; 
-  }
-#endif
-
-#ifdef WITH_ROOT
-  PadDimensionsMapCIterator it(&fPadDimensionsMap);
+  TExMapIter it(&fPadDimensionsMap);
   Long_t key, value;
   while ( it.Next(key, value) ) {
     //cout << "Iterating over: " << key << ", " << value << endl;
@@ -759,6 +717,5 @@ void AliMpSectorSegmentation::PrintZones() const
     cout << "    pad dimensions: ( " 
          << dimensions.X() << ", " << dimensions.Y() << ")" << endl; 
   }
-#endif
 }
 
index 1fc19d4a0b3fe5c150161111960b22bdcc14d1bb..9e4bcb6009090530b144b413889d87dc6e7fa4b5 100755 (executable)
 #ifndef ALI_MP_SECTOR_SEGMENTATION_H
 #define ALI_MP_SECTOR_SEGMENTATION_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVSegmentation.h"
 #include "AliMpPad.h"
 
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TExMap.h>
-#endif
-
-#ifdef WITH_STL
-#include <map>
-#endif
 
 class AliMpSector;
 class AliMpMotifPosition;
@@ -39,20 +31,6 @@ class AliMpArea;
 
 class AliMpSectorSegmentation : public AliMpVSegmentation
 {
-  public:
-#ifdef WITH_STL
-    /// Pad dimensions map type
-    typedef std::map<Int_t, TVector2>         PadDimensionsMap;
-    /// Pad dimensions map iterator type
-    typedef PadDimensionsMap::const_iterator  PadDimensionsMapCIterator;
-#endif
-#ifdef WITH_ROOT
-    /// Pad dimensions map type
-    typedef  TExMap      PadDimensionsMap;
-    /// Pad dimensions map iterator type
-    typedef  TExMapIter  PadDimensionsMapCIterator;
-#endif
-
   public:
     AliMpSectorSegmentation(const AliMpSector* sector, Bool_t own = false);
     AliMpSectorSegmentation();
@@ -115,14 +93,12 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     /// Not implemented
     AliMpSectorSegmentation&  operator = (const AliMpSectorSegmentation& right);
 
-#ifdef WITH_ROOT
     static const Double_t   fgkS1;  ///< the separators used for conversion
     static const Double_t   fgkS2;  ///< of TVector2 to Long_t
     
     // methods
     Long_t    GetIndex(const TVector2& vector2) const;
     TVector2  GetVector(Long_t index) const;
-#endif
 
     // methods
     void  FillPadDimensionsMap();
@@ -136,13 +112,7 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     const AliMpSector*  fkSector;   ///< Sector
     Bool_t              fIsOwner;   ///< Sector ownership     
     AliMpPad*           fPadBuffer; ///< The pad buffer
-#ifdef WITH_STL
-    PadDimensionsMap    fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
-#endif    
-#ifdef WITH_ROOT
-    mutable PadDimensionsMap  fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
-#endif 
-
+    mutable TExMap      fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
     Int_t  fMaxIndexInX;  ///< maximum pad index in x    
     Int_t  fMaxIndexInY;  ///< maximum pad index in y    
 
index 98ab3cdbf0789615f6865868c9809cc770481223..ba2b1ebc97f4c551e47c31dcf322991f4a1ffb0a 100644 (file)
@@ -64,9 +64,8 @@ AliMpSlat::AliMpSlat(TRootIOCtor* ioCtor)
     /// Empty ctor.
     ///
   AliDebug(1,Form("this=%p Empty ctor",this));
-#ifdef WITH_ROOT    
+
     fPCBs.SetOwner(kTRUE);
-#endif    
     fManuMap.SetOwner(kFALSE);
 }
 
@@ -88,9 +87,8 @@ AliMpSlat::AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending)
     /// Normal ctor
     ///
   AliDebug(1,Form("this=%p id=%s",this,id));                   
-#ifdef WITH_ROOT    
+
     fPCBs.SetOwner(kTRUE);
-#endif    
     fManuMap.SetOwner(kFALSE);
 }
 
@@ -101,14 +99,8 @@ AliMpSlat::~AliMpSlat()
   /// Dtor.
   ///
   AliDebug(1,Form("this=%p fId=%s",this,fId.Data()));                  
-#ifdef WITH_ROOT    
+
   fPCBs.Delete();
-#else
-  for ( UInt_t i = 0; i < fPCBs.size(); ++i )
-  {
-    delete fPCBs[i];
-  }
-#endif    
 }
 
 //_____________________________________________________________________________
@@ -132,11 +124,7 @@ AliMpSlat::Add(const AliMpPCB& pcbType, const TArrayI& manuList)
   }
   Double_t xOffset = DX()*2;
   AliMpPCB* pcb = pcbType.Clone(manuList,ixOffset,xOffset);
-#ifdef WITH_ROOT
   fPCBs.AddLast(pcb);
-#else
-  fPCBs.push_back(pcb);
-#endif  
   fDY = TMath::Max(pcb->DY(),fDY);
   fDX += pcb->DX();
   fNofPadsX += pcb->GetNofPadsX();
@@ -147,7 +135,6 @@ AliMpSlat::Add(const AliMpPCB& pcbType, const TArrayI& manuList)
                AliMpMotifPosition* mp = pcb->GetMotifPosition(i);
                Int_t manuID = mp->GetID();
     // Before inserting a new key, check if it's already there
-//#ifdef WITH_ROOT
     TObject* there = fManuMap.GetValue(manuID);
     if ( there == 0 )
     {
@@ -159,10 +146,7 @@ AliMpSlat::Add(const AliMpPCB& pcbType, const TArrayI& manuList)
     {
       AliError(Form("ManuID %d is duplicated for PCB %s",manuID,pcbType.GetID()));      
     }
-//#else
-//  fManuMap[manuID] = mp;
-//#endif  
-       }
+  }
   fPosition.Set(DX(),DY());
   fNofPads += pcb->NofPads();
 }
@@ -204,19 +188,7 @@ AliMpSlat::FindMotifPosition(Int_t manuID) const
   ///
   /// Returns the motifPosition referenced by it manuID
   ///
-//#ifdef WITH_ROOT
   return static_cast<AliMpMotifPosition*>(fManuMap.GetValue(manuID));
-//#else
-//  std::map<int,AliMpMotifPosition*>::const_iterator it = fManuMap.find(manuID);
-//  if ( it != fManuMap.end() )
-//      {
-//           return it->second;
-//      }
-//  else
-//  {
-//    return 0;
-//  }
-//#endif      
 }
 
 //_____________________________________________________________________________
@@ -372,7 +344,6 @@ AliMpSlat::GetAllMotifPositionsIDs(TArrayI& ecn) const
   Int_t nofElectronicCards(GetNofElectronicCards());
   assert(nofElectronicCards>0);
   ecn.Set(nofElectronicCards);
-//#ifdef WITH_ROOT
   TIter next(fManuMap.CreateIterator());
   AliMpMotifPosition* mp;
   Int_t n(0);
@@ -382,9 +353,6 @@ AliMpSlat::GetAllMotifPositionsIDs(TArrayI& ecn) const
     ++n;
   }
   assert(n==nofElectronicCards);
-//#else
-  // missing here
-//#endif      
 }
 
 //_____________________________________________________________________________
@@ -473,13 +441,8 @@ AliMpSlat::GetPCB(Int_t i) const
   ///
   /// Returns the i-th PCB of this slat.
   ///
-#ifdef WITH_ROOT
   if ( i >= fPCBs.GetEntriesFast() ) return 0;
   return (AliMpPCB*)fPCBs[i];
-#else
-  if ( i >= Int_t(fPCBs.size()) ) return 0;
-  return fPCBs[i];
-#endif  
 }
 
 //_____________________________________________________________________________
@@ -489,11 +452,7 @@ AliMpSlat::GetSize() const
   ///
   /// Returns the number of PCB in this slat.
   ///
-#ifdef WITH_ROOT
   return fPCBs.GetEntriesFast();
-#else
-  return fPCBs.size();
-#endif  
 }
 
 //_____________________________________________________________________________
index 1242b0683023d1fcbbf2ca907da9e3e768f05b27..41a4adce85863d6fc0ee25352102e14d985da290 100644 (file)
 #ifndef ALI_MP_SLAT_H
 #define ALI_MP_SLAT_H
 
-#include <TObject.h>
-
-#ifndef ROOT_TString
-#  include "TString.h"
-#endif
-
 #ifndef ALI_MP_PAD_H
 #  include "AliMpPad.h"
 #endif
 #  include "AliMpPlaneType.h"
 #endif
 
-#include "AliMpContainers.h"
-#include "AliMpExMap.h"
+#ifndef ALI_MP_EX_MAP_H
+  #include "AliMpExMap.h"
+#endif
 
-class TArrayI;
+#ifndef ROOT_TObject
+  #include <TObject.h>
+#endif
 
-#ifdef WITH_ROOT
+#ifndef ROOT_TString
+#  include "TString.h"
+#endif
+
+#ifndef ROOT_TObjArray
 #  include "TObjArray.h"
-#else
-#  include <vector>
-//#  include <map>
 #endif
 
+class TArrayI;
+
+
 class AliMpMotifPosition;
 class AliMpPCB;
 class TArrayI;
@@ -147,11 +148,7 @@ class AliMpSlat : public TObject
   Int_t fNofPadsX; ///< Actual number of pads in x direction
   Int_t fMaxNofPadsY; ///< Maximum number of pads in y direction
   mutable AliMpExMap fManuMap; ///< map of int to AliMpMotifPosition*
-#ifdef WITH_ROOT
   TObjArray fPCBs; ///< array of AliMpPCB*
-#else  
-  std::vector<AliMpPCB*> fPCBs; ///< array of AliMpPCB*
-#endif
   TVector2 fPosition; ///< Position of the slat center.
   Int_t fNofPads; ///< number of pads in this slat
   
index 307661cd4982281a31b1f091d86ec517ee8acd3a..8eef969944acd1c7c897f7334a96d3cd13d62bc5 100755 (executable)
@@ -71,13 +71,7 @@ void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
 {
 /// Add row segment.
 
-#ifdef WITH_STL
-  fSegments.push_back(rowSegment);
-#endif
-
-#ifdef WITH_ROOT
   fSegments.Add(rowSegment);
-#endif
 } 
 
 
@@ -103,13 +97,7 @@ Int_t AliMpSubZone::GetNofRowSegments() const
 {
 /// Return number of row segments.
 
-#ifdef WITH_STL
-  return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
   return fSegments.GetSize();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -122,13 +110,7 @@ AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fSegments[i];  
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpVRowSegment*)fSegments.At(i);  
-#endif
 }
 
 //_____________________________________________________________________________
index 53ea5ca8a9edda58feac0320b8bce25942022ddd..569a8d9ecfa89c8fa03d2e28207b4f95a2b5a5ab 100755 (executable)
 #define ALI_MP_SUB_ZONE_H
 
 #include <TObject.h>
-
-#include "AliMpContainers.h"
-
-#ifdef WITH_ROOT
 #include <TList.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpVMotif;
 class AliMpVRowSegment;
 
 class AliMpSubZone : public TObject
 {
-  public:
-#ifdef WITH_STL
-    /// Row segment vector type
-    typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
-#endif
-#ifdef WITH_ROOT
-    /// Row segment vector type
-    typedef TList  RowSegmentVector;
-#endif
-
   public:
     AliMpSubZone(AliMpVMotif* motif);
     AliMpSubZone();
@@ -63,7 +44,7 @@ class AliMpSubZone : public TObject
 
     // data members
     AliMpVMotif*     fMotif;   ///< the motif in this subzone
-    RowSegmentVector fSegments;///< contained row segments
+    TList fSegments;///< contained row segments
     
   ClassDef(AliMpSubZone,1)  // Zone segment
 };
index 52943ee8fd4db94a5f6262339e43381e9060b58b..e3c4f40c429339ae08b4e1802fc8b7668275ac11 100644 (file)
@@ -42,9 +42,7 @@
 ClassImp(AliMpVRowSegmentSpecial)
 /// \endcond
 
-#ifdef WITH_ROOT
 const Int_t  AliMpVRowSegmentSpecial::fgkMaxNofMotifPositionIds = 20;
-#endif    
 
 //______________________________________________________________________________
 AliMpVRowSegmentSpecial::AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX)
@@ -53,10 +51,8 @@ AliMpVRowSegmentSpecial::AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX
     fOffsetX(offsetX),
     fPadRows(),
     fMotifs(),
-    fMotifPositionIds()
-#ifdef WITH_ROOT
-    ,fNofMotifPositionIds(0)
-#endif    
+    fMotifPositionIds(),
+    fNofMotifPositionIds(0)
 {
 /// Standard constructor  
 }
@@ -68,16 +64,12 @@ AliMpVRowSegmentSpecial::AliMpVRowSegmentSpecial()
     fOffsetX(0.),
     fPadRows(),
     fMotifs(),
-    fMotifPositionIds()
-#ifdef WITH_ROOT
-    ,fNofMotifPositionIds(0)
-#endif    
+    fMotifPositionIds(),
+    fNofMotifPositionIds(0)
 {
 /// Default constructor  
 
-#ifdef WITH_ROOT
    fMotifPositionIds.Set(fgkMaxNofMotifPositionIds);
-#endif    
 }
 
 //______________________________________________________________________________
@@ -189,15 +181,8 @@ Bool_t AliMpVRowSegmentSpecial::HasMotif(const AliMpVMotif* motif) const
 /// Return true if the specified motif is already in fMotifs vector,
 /// returns false otherwise.
 
-#ifdef WITH_STL
-  for (UInt_t i=0; i<fMotifs.size(); i++)
-    if (fMotifs[i] == motif) return true;
-#endif
-
-#ifdef WITH_ROOT
   for (Int_t i=0; i<fMotifs.GetEntriesFast(); i++)
     if (fMotifs[i] == (const TObject*)motif) return true;
-#endif
 
   return false;         
 }
@@ -207,13 +192,7 @@ Int_t AliMpVRowSegmentSpecial::GetNofPadRows() const
 {
 /// Return number of pad rows.
 
-#ifdef WITH_STL
-  return fPadRows.size();
-#endif
-
-#ifdef WITH_ROOT
   return fPadRows.GetEntriesFast();
-#endif
 }  
 
 //______________________________________________________________________________
@@ -221,13 +200,7 @@ AliMpPadRow* AliMpVRowSegmentSpecial::GetPadRow(Int_t i) const
 {
 /// Return number of pad rows.
 
-#ifdef WITH_STL
-  return fPadRows[i];
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpPadRow*)fPadRows[i];
-#endif
 }  
 
 //
@@ -242,13 +215,7 @@ void  AliMpVRowSegmentSpecial::AddPadRow(AliMpPadRow* padRow)
   padRow->SetOffsetX(fOffsetX);
   padRow->SetID(GetNofPadRows());
 
-#ifdef WITH_STL
-  fPadRows.push_back(padRow);
-#endif
-
-#ifdef WITH_ROOT
   fPadRows.Add(padRow);
-#endif
 }  
 
 //______________________________________________________________________________
@@ -264,12 +231,6 @@ void AliMpVRowSegmentSpecial::UpdateMotifVector()
       AliMpVMotif* motif = padRow->GetPadRowSegment(j)->GetMotif();            
 
       if (!HasMotif(motif)) {
-#ifdef WITH_STL
-        fMotifs.push_back(motif);       
-        fMotifPositionIds.push_back(
-          padRow->GetPadRowSegment(j)->GetMotifPositionId());
-#endif
-#ifdef WITH_ROOT
         fMotifs.Add(motif);
        
        // resize array if needed
@@ -279,7 +240,6 @@ void AliMpVRowSegmentSpecial::UpdateMotifVector()
         fMotifPositionIds.AddAt(
           padRow->GetPadRowSegment(j)->GetMotifPositionId(),
          fNofMotifPositionIds++);
-#endif
       }
     }  
   }
@@ -398,12 +358,7 @@ Int_t  AliMpVRowSegmentSpecial::GetNofMotifs() const
 { 
 /// Return the number of different motifs present in this row segment.
 
-#ifdef WITH_STL
-  return fMotifs.size();
-#endif
-#ifdef WITH_ROOT
   return fMotifs.GetEntriesFast();
-#endif
 }  
 
 //______________________________________________________________________________
@@ -411,12 +366,7 @@ AliMpVMotif* AliMpVRowSegmentSpecial::GetMotif(Int_t i) const
 {
 /// Return the i-th motif present in this row segment.
 
-#ifdef WITH_STL
-   return fMotifs[i]; 
-#endif
-#ifdef WITH_ROOT
    return (AliMpVMotif*)fMotifs[i]; 
-#endif
 }
 
 //______________________________________________________________________________
index 4c7c7c808935f640c52d27d3a908cc30945b04b7..7e6c0c20b8222600cd42a35323fcc9b8032523b3 100644 (file)
 #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVRowSegment.h"
 #include "AliMpVMotif.h"
 
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TArrayI.h>
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpRow;
 class AliMpPadRow;
@@ -36,24 +28,6 @@ class AliMpIntPair;
 
 class AliMpVRowSegmentSpecial : public AliMpVRowSegment
 {
-  public:
-#ifdef WITH_STL
-    /// Pad row vector type
-    typedef std::vector<AliMpPadRow*>  PadRowVector;
-    /// Motif vector type
-    typedef std::vector<AliMpVMotif*>  MotifVector;
-    /// Motif position Id vector type
-    typedef std::vector<Int_t>         MotifPositionIdVector;
-#endif
-#ifdef WITH_ROOT
-    /// Pad row vector type
-    typedef  TObjArray  PadRowVector;
-    /// Motif vector type
-    typedef  TObjArray  MotifVector;
-    /// Motif position Id vector type
-    typedef  TArrayI    MotifPositionIdVector;
-#endif
-
   public:
     AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
     AliMpVRowSegmentSpecial();
@@ -128,22 +102,17 @@ class AliMpVRowSegmentSpecial : public AliMpVRowSegment
     /// Not implemented
     AliMpVRowSegmentSpecial&  operator = (const AliMpVRowSegmentSpecial& right);
 
-#ifdef WITH_ROOT
     // static data members
     static const Int_t  fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
-#endif    
 
     // data members
-    AliMpRow*     fRow;     ///< the row containing this segment 
-    Double_t      fOffsetX; ///< \brief the x position of the border that touches a standard
-                            /// row segment
-    PadRowVector  fPadRows; ///< pad rows vector
-    MotifVector   fMotifs;  ///< motifs vector
-    MotifPositionIdVector  fMotifPositionIds; ///< motifs position Ids vector
-
-#ifdef WITH_ROOT
-    Int_t  fNofMotifPositionIds; ///< number of motif positions Ids
-#endif    
+    AliMpRow*   fRow;     ///< the row containing this segment 
+    Double_t    fOffsetX; ///< \brief the x position of the border that touches a standard
+                          /// row segment
+    TObjArray   fPadRows; ///< pad rows vector
+    TObjArray   fMotifs;  ///< motifs vector
+    TArrayI     fMotifPositionIds;    ///< motifs position Ids vector
+    Int_t       fNofMotifPositionIds; ///< number of motif positions Ids
     
   ClassDef(AliMpVRowSegmentSpecial,1)  //Row segment
 };
index f0ac4a1462c2fbf27bd89d7f2780aa4cf3e7fbac..d7e3009cc9c2c129407ebb0e650ee96fa4840e50 100755 (executable)
@@ -71,13 +71,7 @@ void AliMpZone::AddSubZone(AliMpSubZone* subZone)
 {
 /// Add row segment.
 
-#ifdef WITH_STL
-  fSubZones.push_back(subZone);
-#endif
-
-#ifdef WITH_ROOT
   fSubZones.Add(subZone);
-#endif
 }  
   
 //_____________________________________________________________________________
@@ -99,13 +93,7 @@ Int_t AliMpZone::GetNofSubZones() const
 {
 /// Return number of row segments.
 
-#ifdef WITH_STL
-  return fSubZones.size();
-#endif
-
-#ifdef WITH_ROOT
   return fSubZones.GetEntriesFast();
-#endif
 }  
 
 //_____________________________________________________________________________
@@ -118,11 +106,5 @@ AliMpSubZone* AliMpZone::GetSubZone(Int_t i) const
     return 0;
   }
   
-#ifdef WITH_STL
-  return fSubZones[i];  
-#endif
-
-#ifdef WITH_ROOT
   return (AliMpSubZone*)fSubZones[i];  
-#endif
 }
index dfc05123e5de3c9298c7076f84aec2c7ea91d818..e8100a80bed7f5c025df3af3224f51b0f38cf621 100755 (executable)
 #define ALI_MP_ZONE_H
 
 #include <TObject.h>
-
-#include "AliMpContainers.h"
-
 #include <TVector2.h>
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
 
 class AliMpSubZone;
 class AliMpVMotif;
 
 class AliMpZone : public TObject
 {
-  public:
-#ifdef WITH_STL
-    /// Sub zone vector type
-    typedef std::vector<AliMpSubZone*>  SubZoneVector;
-#endif
-#ifdef WITH_ROOT
-    /// Sub zone vector type
-    typedef TObjArray  SubZoneVector;
-#endif
-
   public:
     AliMpZone(Int_t id);
     AliMpZone();
@@ -67,7 +48,7 @@ class AliMpZone : public TObject
   private:
     // data members
     UInt_t        fID;           ///< ID
-    SubZoneVector fSubZones;     ///< subzones
+    TObjArray     fSubZones;     ///< subzones
     TVector2      fPadDimensions;///< pad dimensions
 
   ClassDef(AliMpZone,1)  // Zone