]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- TExMap replaced with the new AliMpExMap type (Root persistent)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Sep 2005 09:21:08 +0000 (09:21 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Sep 2005 09:21:08 +0000 (09:21 +0000)
- All typedefs moved from AliMpXXXTypes.h files directly to classes

32 files changed:
MUON/mapping/AliMpBasicTypes.h [deleted file]
MUON/mapping/AliMpExMap.cxx [new file with mode: 0644]
MUON/mapping/AliMpExMap.h [new file with mode: 0644]
MUON/mapping/AliMpGraphContext.cxx
MUON/mapping/AliMpGraphContext.h
MUON/mapping/AliMpGraphicsTypes.h [deleted file]
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.cxx
MUON/mapping/AliMpMotifType.h
MUON/mapping/AliMpMotifTypePadIterator.h
MUON/mapping/AliMpMotifTypes.h [deleted file]
MUON/mapping/AliMpNeighboursPadIterator.cxx
MUON/mapping/AliMpNeighboursPadIterator.h
MUON/mapping/AliMpPadRow.h
MUON/mapping/AliMpRow.h
MUON/mapping/AliMpRowSegmentLSpecial.h
MUON/mapping/AliMpRowSegmentRSpecial.h
MUON/mapping/AliMpSector.cxx
MUON/mapping/AliMpSector.h
MUON/mapping/AliMpSectorReader.cxx
MUON/mapping/AliMpSectorReader.h
MUON/mapping/AliMpSectorSegmentation.h
MUON/mapping/AliMpSectorTypes.h [deleted file]
MUON/mapping/AliMpSt345Reader.cxx
MUON/mapping/AliMpSubZone.h
MUON/mapping/AliMpVRowSegmentSpecial.h
MUON/mapping/AliMpZone.h

diff --git a/MUON/mapping/AliMpBasicTypes.h b/MUON/mapping/AliMpBasicTypes.h
deleted file mode 100755 (executable)
index 3bda0fc..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-// $Id$
-// $MpId: AliMpBasicTypes.h,v 1.4 2005/08/26 15:43:36 ivana Exp $
-
-/// \ingroup basic
-///
-/// AliMpBasicTypes
-/// System dependent types definitions for basic category.
-///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
-
-#ifndef ALI_MP_BASIC_TYPES_H
-#define ALI_MP_BASIC_TYPES_H
-
-#include <utility>
-#include "AliMpPad.h"
-
-#ifdef __HP_aCC
-  typedef pair<AliMpPad, AliMpPad> PadPair;
-#else
-  typedef std::pair<AliMpPad, AliMpPad> PadPair;
-#endif
-
-#endif //ALI_MP_BASIC_TYPES_H
diff --git a/MUON/mapping/AliMpExMap.cxx b/MUON/mapping/AliMpExMap.cxx
new file mode 100644 (file)
index 0000000..d59fd41
--- /dev/null
@@ -0,0 +1,294 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// $Id$
+// $MpId: AliMpExMap.cxx,v 1.1 2005/09/26 16:16:16 ivana Exp $
+// Category: basic
+//
+// Class AliMpExMap
+// ------------------------
+// Helper class making Root persistent TExMap
+// Author:Ivana Hrivnacova; IPN Orsay
+
+#include <stdlib.h>
+
+#include <TClass.h>
+#include <Riostream.h>
+#include <TString.h>
+#include <TError.h>
+
+#include "AliMpExMap.h"
+//#include "AliMpConstants.h"
+#include "AliMpIntPair.h"
+#include "AliLog.h"
+
+ClassImp(AliMpExMap)
+
+//
+// static members
+//
+
+const Int_t   AliMpExMap::fgkDefaultSize = 300;
+const Bool_t  AliMpExMap::fgkDefaultOwnership = true;
+
+const Int_t AliMpExMap::fgkSeparator1 = 10000;
+const Int_t AliMpExMap::fgkSeparator2 = 100;
+
+const TString  AliMpExMap::fgkCharacterMap 
+  = " 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.";
+
+//
+// static methods
+//
+
+//______________________________________________________________________________
+Long_t  AliMpExMap::GetIndex(const AliMpIntPair& pair)
+{
+/// Convert the pair of integers to integer.
+
+  if (pair.GetFirst() >= fgkSeparator1 || pair.GetSecond() >= fgkSeparator1) {
+    // to do - use AliLog, is it possible for static function
+    // AliFatal("Index out of limit.");
+    cerr << "AliMpExMap::GetIndex(const AliMpIntPair&): Index out of limit." << endl;
+    exit(1); 
+  }  
+      
+  return pair.GetFirst()*fgkSeparator1 + pair.GetSecond() + 1;
+}  
+
+//_____________________________________________________________________________
+Long_t  AliMpExMap::GetIndex(const TString& s)
+{
+/// Convert the TString to integer.
+
+  if (s.Length() > 5) {
+    // to do - use AliLog, is it possible for static function
+    // AliFatal("String too long.");
+    cerr << "AliMpExMap::GetIndex(const TString&): String too long." << endl;
+    return 0;
+  }  
+
+  Long_t index = 0;
+  for (Int_t i=s.Length()-1; i>=0; --i)  
+    index = index*fgkSeparator2 + fgkCharacterMap.First(s(i));
+  
+  return index;
+}
+
+//______________________________________________________________________________
+AliMpIntPair  AliMpExMap::GetPair(Long_t index)
+{
+/// Convert the integer index to the pair of integers.
+
+  return AliMpIntPair((index-1)/fgkSeparator1,(index-1)%fgkSeparator1);
+}  
+
+//_____________________________________________________________________________
+TString  AliMpExMap::GetString(Long_t index)
+{
+/// Convert the integer index to the string.
+
+  TString s;
+  while (index >0) {
+    Char_t c = fgkCharacterMap(index%fgkSeparator2);
+    s += c;
+    index = index/fgkSeparator2;
+  }
+  return s;
+}
+
+//
+// constructors/destructor
+//
+
+//_____________________________________________________________________________
+AliMpExMap::AliMpExMap(Bool_t /*standardConstructor*/) 
+  : TObject(),
+    fMap(fgkDefaultSize),
+    fObjects(fgkDefaultSize),
+    fKeys(fgkDefaultSize)
+{
+/// Standard constructor
+
+  fObjects.SetOwner(fgkDefaultOwnership);
+}
+
+//_____________________________________________________________________________
+AliMpExMap::AliMpExMap() 
+  : TObject(),
+    fMap(),
+    fObjects(),
+    fKeys()
+{
+/// Default constructor
+}
+
+//_____________________________________________________________________________
+AliMpExMap::~AliMpExMap() 
+{
+/// Destructor 
+}
+
+//
+// private methods
+//
+
+//_____________________________________________________________________________
+void AliMpExMap::FillMap()
+{
+/// Fill transient map from the arrays of objects and keys
+
+  for (Int_t i=0; i<fObjects.GetEntriesFast(); i++) 
+    fMap.Add(fKeys.At(i), (Long_t)fObjects.At(i)); 
+}
+
+//_____________________________________________________________________________
+void AliMpExMap::AddKey(Long_t key)
+{
+/// Add key in array with checking size
+
+  // Resize array if needed
+  if (fObjects.GetEntriesFast() == fKeys.GetSize()) {
+   fKeys.Set(2*fKeys.GetSize());
+   cout << "AliMpExMap::AddKey: resized Key array " << endl;
+  } 
+   
+  fKeys.AddAt(key, fObjects.GetEntriesFast());      
+}
+
+//
+// public methods
+//
+
+//_____________________________________________________________________________
+void AliMpExMap::Add(const AliMpIntPair& key, TObject* object)
+{
+/// Add object with its key to the map and arrays
+  
+  fMap.Add(GetIndex(key), (Long_t)object);
+  AddKey(GetIndex(key));
+  fObjects.Add(object);
+}
+
+//_____________________________________________________________________________
+void AliMpExMap::Add(const TString& key, TObject* object)
+{
+/// Add object with its key to the map and arrays
+  
+  fMap.Add(GetIndex(key), (Long_t)object);
+  AddKey(GetIndex(key));
+  fObjects.Add(object);
+}
+
+//_____________________________________________________________________________
+void AliMpExMap::Add(Int_t key, TObject* object)
+{
+/// Add object with its key to the map and arrays
+  
+  fMap.Add(key, (Long_t)object);
+  AddKey(key);
+  fObjects.Add(object);
+}
+
+//_____________________________________________________________________________
+void AliMpExMap::SetSize(Int_t size)
+{
+/// Set given size to the key array
+
+  // fMap.Set(size);
+  // fObjects.Set(size);
+  fKeys.Set(size);
+} 
+
+//_____________________________________________________________________________
+void AliMpExMap::SetOwner(Bool_t owner)
+{
+/// Set given ownership to object array
+
+  fObjects.SetOwner(owner);
+}  
+
+//_____________________________________________________________________________
+Int_t AliMpExMap::GetSize() const
+{
+/// Return TExMap iterator set to the beginning of the map
+
+  return fObjects.GetEntriesFast();
+}
+
+//_____________________________________________________________________________
+TExMapIter AliMpExMap::GetIterator() const
+{
+/// Return TExMap iterator set to the beginning of the map
+
+  return TExMapIter(&fMap);
+}
+
+//_____________________________________________________________________________
+TObject*  AliMpExMap::GetValue(const AliMpIntPair& key) const
+{
+/// Return the object associated with the given key if found,
+/// otherwise return 0
+
+  Long_t value = fMap.GetValue(GetIndex(key));
+  if (value) 
+    return (TObject*)value;
+  else
+    return 0;  
+
+}
+
+//_____________________________________________________________________________
+TObject*  AliMpExMap::GetValue(const TString& key) const
+{
+/// Return the object associated with the given key if found,
+/// otherwise return 0
+
+  Long_t value = fMap.GetValue(GetIndex(key));
+  if (value) 
+    return (TObject*)value;
+  else
+    return 0;  
+
+}
+
+//_____________________________________________________________________________
+TObject*  AliMpExMap::GetValue(Int_t key) const
+{
+/// Return the object associated with the given key if found,
+/// otherwise return 0
+
+  Long_t value = fMap.GetValue(key);
+  if (value) 
+    return (TObject*)value;
+  else
+    return 0;  
+
+}
+
+//_____________________________________________________________________________
+void AliMpExMap::Streamer(TBuffer &R__b)
+{
+/// Customized streamer                                                     \n
+/// After the arrays are read, fill the transient map
+
+  if (R__b.IsReading()) {
+    AliMpExMap::Class()->ReadBuffer(R__b, this);
+    FillMap();
+  } 
+  else {
+    AliMpExMap::Class()->WriteBuffer(R__b, this);
+  }
+}
diff --git a/MUON/mapping/AliMpExMap.h b/MUON/mapping/AliMpExMap.h
new file mode 100644 (file)
index 0000000..0395a54
--- /dev/null
@@ -0,0 +1,84 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// $Id$
+// $MpId: AliMpExMap.h,v 1.1 2005/09/26 16:16:16 ivana Exp $
+
+/// \ingroup basic
+/// \class AliMpExMap
+/// \brief Helper class making Root persistent TExMap
+///
+/// The objects and keys from TExMap are store in additional
+/// arrays which are Root persistent.
+///
+/// Author: Ivana Hrivnacova; IPN Orsay
+
+#ifndef ALI_MP_EX_MAP_H
+#define ALI_MP_EX_MAP_H
+
+#include <TObject.h>
+#include <TObjArray.h>
+#include <TArrayL.h>
+#include <TExMap.h>
+
+class TString;
+
+class AliMpIntPair;
+
+class AliMpExMap : public TObject
+{
+  public:
+    AliMpExMap(Bool_t standardConstructor);
+    AliMpExMap();
+    virtual ~AliMpExMap();
+    
+    // static methods
+    // conversion between varius keys and Long_t
+    //
+    static Long_t  GetIndex(const AliMpIntPair& pair);
+    static Long_t  GetIndex(const TString& s);
+    static AliMpIntPair  GetPair(Long_t index);
+    static TString       GetString(Long_t index);
+
+    // set methods
+    void Add(const AliMpIntPair& key, TObject* object);
+    void Add(const TString& key, TObject* object);
+    void Add(Int_t key, TObject* object);
+
+    void SetSize(Int_t size);
+    void SetOwner(Bool_t owner);
+    
+    // get methods
+    Int_t       GetSize() const;
+    TExMapIter  GetIterator() const;
+
+    TObject*    GetValue(const AliMpIntPair& key) const;
+    TObject*    GetValue(const TString& key) const;
+    TObject*    GetValue(Int_t key) const;
+    
+  private:  
+    // methods
+    void FillMap();
+    void AddKey(Long_t key);
+    
+    // static data members
+    static const Int_t    fgkDefaultSize;      // Default initial size
+    static const Bool_t   fgkDefaultOwnership; // Default ownership
+
+    static const Int_t    fgkSeparator1; // the separator used for conversion
+                                         // of AliMpIntPair to Int_t
+    static const Int_t    fgkSeparator2; // the separator used for conversion
+                                         // of TString to Int_t
+    static const TString  fgkCharacterMap; // the string mapping characters 
+                                           // to integers 
+    
+    // data members
+    mutable TExMap  fMap;     //! Transient map class
+    TObjArray       fObjects; // Array of objects 
+    TArrayL         fKeys;    // Array of keys 
+
+  ClassDef(AliMpExMap,1)  // Root persistent TExMap
+};
+
+#endif //ALI_MP_EX_MAP_H
+
index e652b577d65c5578fca813112836750f521025bf..02591932bd82feba361508b73519d42c1e3fd7f3 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpGraphContext.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpGraphContext.cxx,v 1.8 2005/09/26 16:06:36 ivana Exp $
 // Category: graphics
 //
 // Class AliMpGraphContext
@@ -31,7 +31,7 @@
 ClassImp(AliMpGraphContext)
 
 AliMpGraphContext *AliMpGraphContext::fgInstance = 0;
-GraphContextVector AliMpGraphContext::fgStack;
+AliMpGraphContext::GraphContextVector AliMpGraphContext::fgStack;
 #ifdef WITH_ROOT
 Int_t              AliMpGraphContext::fgStackSize = 0;
 #endif
index e9e7967fcfd04367e523282eee12fcf57557667f..a2e3976b9b781565a1e612be27e717293d0fb098 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpGraphContext.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpGraphContext.h,v 1.8 2005/09/26 16:06:11 ivana Exp $
 
 /// \ingroup graphics
 /// \class AliMpGraphContext
 #ifndef ALI_MP_GRAPH_CONTEXT_H
 #define ALI_MP_GRAPH_CONTEXT_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include "AliMpExMap.h"
+#endif
+
 #include <TObject.h>
 #include <TVector2.h>
 
-#include "AliMpGraphicsTypes.h"
-
 class MPainter;
 
 class AliMpGraphContext : public TObject
 {
+ public:
+#ifdef WITH_STL
+  typedef std::vector<AliMpGraphContext*> GraphContextVector;
+#endif
+#ifdef WITH_ROOT
+  typedef TObjArray GraphContextVector;
+#endif
+
  public:
   void Push() const;
   void Pop();
diff --git a/MUON/mapping/AliMpGraphicsTypes.h b/MUON/mapping/AliMpGraphicsTypes.h
deleted file mode 100644 (file)
index 90bac93..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-// $Id$
-// $MpId: AliMpGraphicsTypes.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
-
-/// \ingroup graphics
-/// AliMpGraphicsTypes
-/// System dependent types definitions for graphics category.
-///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
-
-#ifndef ALI_MP_GRAPHICS_TYPES_H
-#define ALI_MP_GRAPHICS_TYPES_H
-
-#include "AliMpContainers.h"
-
-#ifdef WITH_STL
-  #include <vector>
-#endif
-
-#ifdef WITH_ROOT
-  #include <TObjArray.h>
-#endif
-
-class AliMpGraphContext;
-
-#ifdef WITH_STL
-#ifdef __HP_aCC
-  typedef vector<AliMpGraphContext*> GraphContextVector;
-#else
-  typedef std::vector<AliMpGraphContext*> GraphContextVector;
-#endif
-#endif
-
-#ifdef WITH_ROOT
-  typedef TObjArray GraphContextVector;
-#endif
-
-#endif //ALI_MP_GRAPHICS_TYPES_H
index 738044b73d745e5f3017c606cf0a1c476d742e7a..746541f3190261a3bf6481b74b9e31943fadde02 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpMotifMap.cxx,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifMap.cxx,v 1.9 2005/09/26 16:11:20 ivana Exp $
 // Category: motif
 //
 // Class AliMpMotifMap
 
 ClassImp(AliMpMotifMap)
 
+//_____________________________________________________________________________
+AliMpMotifMap::AliMpMotifMap(Bool_t /*standardConstructor*/) 
+  : TObject()
 #ifdef WITH_ROOT
-const Int_t AliMpMotifMap::fgkSeparator = 100;
-#endif
+    ,fMotifs(true),
+     fMotifTypes(true),
+     fMotifPositions(true),
+     fMotifPositions2(true)
+#endif         
+{
+/// Standard constructor
+  
+  //fMotifPositions2.SetOwner(false);
+}
 
 //_____________________________________________________________________________
 AliMpMotifMap::AliMpMotifMap() 
-  : TObject()
+  : TObject(),
+    fMotifs(),
+    fMotifTypes(),
+    fMotifPositions(),
+    fMotifPositions2()
 {
 /// Default constructor
 }
@@ -69,76 +84,12 @@ AliMpMotifMap::~AliMpMotifMap()
     delete ip->second;
   }  
 #endif  
-  
-#ifdef WITH_ROOT
-  MotifMapIterator im(&fMotifs);
-  Long_t mkey, mvalue;
-  while ( im.Next(mkey, mvalue) ) delete (AliMpMotif*)mvalue;
-
-  MotifMapIterator it(&fMotifTypes);
-  Long_t tkey, tvalue;
-  while ( it.Next(tkey, tvalue) ) delete (AliMpMotifType*)tvalue;
-
-  MotifMapIterator ip(&fMotifPositions);
-  Long_t pkey, pvalue;
-  while ( it.Next(pkey, pvalue) ) delete (AliMpMotifPosition*)pvalue;
-#endif  
 }
 
 // 
 // private methods
 //
 
-#ifdef WITH_ROOT
-//_____________________________________________________________________________
-Int_t  AliMpMotifMap::GetIndex(const TString& s) const 
-{
-/// Convert the TString to integer.
-
-  if (s.Length() > 5) {
-    Fatal("GetIndex", "String too long.");
-    return 0;
-  }  
-
-  Int_t index = 0;
-  for (Int_t i=s.Length(); i>=0; --i)  index = index*100 + int(s(i));
-  return index;
-}
-
-//______________________________________________________________________________
-Int_t  AliMpMotifMap::GetIndex(const AliMpIntPair& pair) const
-{
-/// Convert the pair of integers to integer.
-
-  if (pair.GetFirst() >= fgkSeparator || pair.GetSecond() >= fgkSeparator)
-    Fatal("GetIndex", "Index out of limit.");
-      
-  return pair.GetFirst()*fgkSeparator + pair.GetSecond() + 1;
-}  
-
-//_____________________________________________________________________________
-TString  AliMpMotifMap::GetString(Int_t index) const
-{
-/// Convert the integer index to the string.
-
-  TString s;
-  while (index >0) {
-    Char_t c = index%100;
-    s += c;
-    index = index/100;
-  }
-  return s;
-}
-
-//______________________________________________________________________________
-AliMpIntPair  AliMpMotifMap::GetPair(Int_t index) const
-{
-/// Convert the integer index to the pair of integers.
-
-  return AliMpIntPair((index-1)/fgkSeparator, (index-1)%fgkSeparator);
-}  
-#endif
-
 //_____________________________________________________________________________
 void  AliMpMotifMap::PrintMotif(const AliMpVMotif* motif) const
 {
@@ -212,10 +163,10 @@ void  AliMpMotifMap::PrintMotifs() const
   if (fMotifs.GetSize()) {
     cout << "Dump of Motif Map - " << fMotifs.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
-    MotifMapIterator i(&fMotifs);
+    TExMapIter i = fMotifs.GetIterator();
     Long_t key, value;
     while ( i.Next(key, value) ) {
-      TString id  = GetString(key);
+      TString id  = fMotifs.AliMpExMap::GetString(key);
       AliMpVMotif* motif = (AliMpVMotif*)value;
       cout << "Map element " 
            << setw(3) << counter++ << "   " 
@@ -254,10 +205,10 @@ void  AliMpMotifMap::PrintMotifTypes() const
   if (fMotifTypes.GetSize()) {
     cout << "Dump of Motif Type Map - " << fMotifTypes.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
-    MotifTypeMapIterator i(&fMotifTypes);
+    TExMapIter i = fMotifTypes.GetIterator();
     Long_t key, value;
     while ( i.Next(key, value) ) {
-      TString id  = GetString(key);
+      TString id  = AliMpExMap::GetString(key);
       AliMpMotifType* motifType = (AliMpMotifType*)value;
       cout << "Map element " 
            << setw(3) << counter++ << "   " 
@@ -295,7 +246,7 @@ void  AliMpMotifMap::PrintMotifPositions() const
   if (fMotifPositions.GetSize()) {
     cout << "Dump of Motif Position Map - " << fMotifPositions.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
-    MotifPositionMapIterator i(&fMotifPositions);
+    TExMapIter i = fMotifPositions.GetIterator();
     Long_t key, value;
     while ( i.Next(key, value) ) {
       AliMpMotifPosition* motifPosition = (AliMpMotifPosition*)value;
@@ -335,7 +286,7 @@ void  AliMpMotifMap::PrintMotifPositions2() const
   if (fMotifPositions2.GetSize()) {
     cout << "Dump of Motif Position Map 2 - " << fMotifPositions2.GetSize() << " entries:" << endl;
     Int_t counter = 0;        
-    MotifPositionMapIterator i(&fMotifPositions2);
+    TExMapIter i = fMotifPositions2.GetIterator();
     Long_t key, value;
     while ( i.Next(key, value) ) {
       AliMpMotifPosition* motifPosition = (AliMpMotifPosition*)value;
@@ -373,7 +324,7 @@ Bool_t AliMpMotifMap::AddMotif(AliMpVMotif* motif, Bool_t warn)
 #endif
 
 #ifdef WITH_ROOT
-  fMotifs.Add(GetIndex(motif->GetID()), (Long_t)motif);
+  fMotifs.Add(motif->GetID(), motif);
 #endif
 
   return true;
@@ -400,7 +351,7 @@ Bool_t AliMpMotifMap::AddMotifType(AliMpMotifType* motifType, Bool_t warn)
 #endif
 
 #ifdef WITH_ROOT
-  fMotifTypes.Add(GetIndex(motifType->GetID()), (Long_t)motifType);
+  fMotifTypes.Add(motifType->GetID(), motifType);
 #endif
 
   return true;
@@ -435,7 +386,7 @@ Bool_t AliMpMotifMap::AddMotifPosition(AliMpMotifPosition* motifPosition, Bool_t
 #endif
 
 #ifdef WITH_ROOT
-  fMotifPositions.Add(motifPosition->GetID(), (Long_t)motifPosition);
+  fMotifPositions.Add(motifPosition->GetID(), motifPosition);
 #endif
 
   return true;
@@ -465,12 +416,11 @@ void AliMpMotifMap::FillMotifPositionMap2()
     return;
   }  
 
-  MotifPositionMapIterator i(&fMotifPositions);
+  TExMapIter i = fMotifPositions.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpMotifPosition* motifPosition = (AliMpMotifPosition*)value;
-    fMotifPositions2.Add(GetIndex(motifPosition->GetLowIndicesLimit()),
-                         (Long_t)motifPosition);
+    fMotifPositions2.Add(motifPosition->GetLowIndicesLimit(), motifPosition);
   }
 #endif
 
@@ -511,7 +461,7 @@ void  AliMpMotifMap::PrintGlobalIndices(const char* fileName) const
 
 #ifdef WITH_ROOT
   if (fMotifPositions.GetSize()) {
-    MotifPositionMapIterator i(&fMotifPositions);
+    TExMapIter i = fMotifPositions.GetIterator();
     Long_t key, value;
     while ( i.Next(key, value) ) {
       AliMpMotifPosition* motifPosition = (AliMpMotifPosition*)value;
@@ -582,11 +532,7 @@ AliMpVMotif* AliMpMotifMap::FindMotif(const TString& motifID) const
 #endif
 
 #ifdef WITH_ROOT
-  Long_t value = fMotifs.GetValue(GetIndex(motifID));
-  if (value) 
-    return (AliMpVMotif*)value;
-  else
-    return 0;  
+  return (AliMpVMotif*)fMotifs.GetValue(motifID);
 #endif
 }
 
@@ -648,11 +594,7 @@ AliMpMotifType* AliMpMotifMap::FindMotifType(const TString& motifTypeID) const
 #endif
 
 #ifdef WITH_ROOT
-  Long_t value = fMotifTypes.GetValue(GetIndex(motifTypeID));
-  if (value) 
-    return (AliMpMotifType*)value;
-  else
-    return 0;  
+  return (AliMpMotifType*)fMotifTypes.GetValue(motifTypeID);
 #endif
 }
 
@@ -671,11 +613,7 @@ AliMpMotifMap::FindMotifPosition(Int_t motifPositionID) const
 #endif
 
 #ifdef WITH_ROOT
-  Long_t value = fMotifPositions.GetValue(motifPositionID);
-  if (value) 
-    return (AliMpMotifPosition*)value;
-  else
-    return 0;  
+  return (AliMpMotifPosition*)fMotifPositions.GetValue(motifPositionID);
 #endif
 }
 
index 7d252c6ada8c13ecaa01c43477d81f23bef17398..dddbbe0b48ce31310155515f27504082a7890d5c 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpMotifMap.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifMap.h,v 1.9 2005/09/26 16:10:46 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifMap
 #ifndef ALI_MP_MOTIF_MAP_H
 #define ALI_MP_MOTIF_MAP_H
 
+#include "AliMpContainers.h"
+
 #ifdef WITH_STL
-  #include <map>
+#include <map>
+#include "AliMpIntPair.h"
 #endif
 
-#include <TObject.h>
+#ifdef WITH_ROOT
+#include "AliMpExMap.h"
+#endif
 
-#include "AliMpMotifTypes.h"
+#include <TObject.h>
 
 class TString;
 class TVector2;
@@ -38,6 +43,25 @@ class AliMpMotifMap;
 class AliMpMotifMap : public TObject
 {
   public:
+#ifdef WITH_STL
+    typedef std::map<TString, AliMpVMotif*> MotifMap;
+    typedef MotifMap::const_iterator        MotifMapIterator;
+    typedef std::map<TString, AliMpMotifType*> MotifTypeMap;
+    typedef MotifTypeMap::const_iterator       MotifTypeMapIterator;
+    typedef std::map<Int_t, AliMpMotifPosition*>  MotiPositionMap;
+    typedef MotiPositionMap::const_iterator       MotifPositionMapIterator;
+    typedef std::map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
+    typedef MotifPositionMap2::const_iterator           MotifPositionMap2Iterator;
+#endif    
+#ifdef WITH_ROOT
+    typedef AliMpExMap MotifMap;
+    typedef AliMpExMap MotifTypeMap;
+    typedef AliMpExMap MotifPositionMap;
+    typedef AliMpExMap MotifPositionMap2;
+#endif    
+
+  public:
+    AliMpMotifMap(Bool_t /*standardConstructor*/);
     AliMpMotifMap();
     virtual ~AliMpMotifMap();
     
@@ -59,17 +83,6 @@ class AliMpMotifMap : public TObject
     // AliMpMotifPosition*  FindMotifPosition(const AliMpIntPair& indices) const;
 
   private:
-#ifdef WITH_ROOT
-    static const Int_t   fgkSeparator;  // the separator used for conversion
-                                        // of TString to Int_t
-    
-    // methods
-    Int_t  GetIndex(const TString& s) const;
-    Int_t  GetIndex(const AliMpIntPair& pair) const;
-    TString  GetString(Int_t index) const;
-    AliMpIntPair  GetPair(Int_t index) const;
-#endif
-  
     // methods
     void  PrintMotif(const AliMpVMotif* motif) const;
     void  PrintMotifType(const AliMpMotifType* motifType) const;
@@ -80,34 +93,16 @@ class AliMpMotifMap : public TObject
     void  PrintMotifPositions() const;
     void  PrintMotifPositions2() const;
  
-#ifdef WITH_STL
-#ifdef __HP_aCC
-    // data members
-            // EXCLUDED FOR CINT (does not compile on HP)
-    MotifMap          fMotifs; //! motifs map
-    MotifTypeMap      fMotifTypes; //!motif types map 
-    //MotifPositionMap  fMotifPositions;  //! motif positions map 
-                                          // not taken by cint
-    map<Int_t, AliMpMotifPosition*>  fMotifPositions; //! motif positions map by Id
-    MotifPositionMap2 fMotifPositions2; //! motif positions map
-#else
     // data members
-    MotifMap          fMotifs; // motifs map
-    MotifTypeMap      fMotifTypes; // motif types map 
-    //MotifPositionMap  fMotifPositions;  // motif positions map 
-                                          // not taken by cint
+    MotifMap           fMotifs;         //  motifs map
+    MotifTypeMap       fMotifTypes;     //  motifs types map
+#ifdef WITH_STL
     std::map<Int_t, AliMpMotifPosition*> fMotifPositions; // motif positions map by Id
-    MotifPositionMap2 fMotifPositions2; // motif positions map
-#endif
 #endif
-
 #ifdef WITH_ROOT
-    // data members
-    mutable MotifMap           fMotifs;     //  motifs map
-    mutable MotifTypeMap       fMotifTypes; //  motifs types map
-    mutable MotifPositionMap   fMotifPositions; //  motifs positions map
-    mutable MotifPositionMap2  fMotifPositions2;//  motifs positions map
+    MotifPositionMap   fMotifPositions; //  motifs positions map
 #endif
+    MotifPositionMap2  fMotifPositions2;//  motifs positions map
 
   ClassDef(AliMpMotifMap,1)  // motif map
 };
index 5f063fe31715da04722a499fa551ecded721a637..9e491ed7e53bd5c5e6a3c4213707bd94c937f1ca 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpMotifReader.cxx,v 1.4 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifReader.cxx,v 1.6 2005/09/26 16:11:20 ivana Exp $
 // Category: sector
 //
 // Class AliMpMotifReader
 
 ClassImp(AliMpMotifReader)
 
-#ifdef WITH_ROOT
-const Int_t    AliMpMotifReader::fgkSeparator = 100;
-#endif
-
 //_____________________________________________________________________________
 AliMpMotifReader::AliMpMotifReader(AliMpStationType station, 
                                    AliMpPlaneType plane) 
@@ -107,58 +103,6 @@ AliMpMotifReader& AliMpMotifReader::operator=(const AliMpMotifReader& right)
 // private methods
 //
 
-#ifdef WITH_ROOT
-//_____________________________________________________________________________
-Int_t  AliMpMotifReader::GetIndex(const string& s) const 
-{
-/// Converts the TString to integer.
-
-  if (s.length() > 5) {
-    Fatal("GetIndex", "String too long.");
-    return 0;
-  }  
-
-  Int_t index = 0;
-  for (Int_t i=s.length(); i>=0; --i)  index = index*100 + int(s[i]);
-  
-  return index;
-}
-
-//______________________________________________________________________________
-Int_t  AliMpMotifReader::GetIndex(const AliMpIntPair& pair) const
-{
-/// Convert the pair of integers to integer.
-
-  if (pair.GetFirst() >= fgkSeparator || pair.GetSecond() >= fgkSeparator)
-    Fatal("GetIndex", "Index out of limit.");
-      
-  return pair.GetFirst()*fgkSeparator + pair.GetSecond() + 1;
-}  
-
-//_____________________________________________________________________________
-string  AliMpMotifReader::GetString(Int_t index) const
-{
-/// Convert the integer index to the string.
-
-  string s;
-  while (index >0) {
-    Char_t c = index%100;
-    s += c;
-    index = index/100;
-  }
-  
-  return s;
-  
-}
-
-//______________________________________________________________________________
-AliMpIntPair  AliMpMotifReader::GetPair(Int_t index) const
-{
-/// Convert the integer index to the pair of integers.
-
-  return AliMpIntPair((index-1)/fgkSeparator, (index-1)%fgkSeparator);
-}  
-#endif
 
 //
 // public methods
@@ -205,7 +149,8 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
     positions[key].second=j;
 #endif
 #ifdef WITH_ROOT
-    positions.Add(GetIndex(key), GetIndex(AliMpIntPair(i,j))); 
+    positions.Add( AliMpExMap::GetIndex(key), 
+                   AliMpExMap::GetIndex(AliMpIntPair(i,j)) ); 
 #endif
   } while (!padPos.eof());
 
@@ -309,15 +254,15 @@ AliMpMotifType* AliMpMotifReader::BuildMotifType(const TString& motifTypeId)
 #endif
 
 #ifdef WITH_ROOT
-    Long_t value = positions.GetValue(GetIndex(padName));
+    Long_t value = positions.GetValue(AliMpExMap::GetIndex(padName));
     if (!value) {
       cerr<<"Problem: Pad number "<<padNum<<" found in the file "<<motifTypeFileName
          <<" but not in the file"<<padPosFileName<<endl;
       continue;
     }
 
-    ix = GetPair(value).GetFirst();
-    iy = GetPair(value).GetSecond();
+    ix = AliMpExMap::GetPair(value).GetFirst();
+    iy = AliMpExMap::GetPair(value).GetSecond();
 #endif
 
     motifType->AddConnection(AliMpIntPair(ix,iy),
index 8560d7031fcd23af1ad8006dae92ae489b89db14..2a374643a38390ec4d32dadf59ef20636a337054 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $Id$
+// $MpId: AliMpMotifReader.h,v 1.5 2005/09/26 16:10:46 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifReader
 #ifndef ALI_MP_MOTIF_READER_H
 #define ALI_MP_MOTIF_READER_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <map>
+#endif    
+
+#ifdef WITH_ROOT
+#include <TExMap.h>
+#endif    
+
 #include <fstream>
 
 #include <TObject.h>
@@ -32,6 +42,15 @@ class AliMpMotifType;
 
 class AliMpMotifReader : public TObject
 {
+  public:
+#ifdef WITH_STL
+    typedef std::map<std::string, std::pair<Int_t,Int_t> > PadMapType;
+    typedef PadMapType::iterator PadMapTypeIterator;
+#endif    
+#ifdef WITH_ROOT
+    typedef TExMap PadMapType;
+#endif    
+
   public:
     AliMpMotifReader(AliMpStationType station, AliMpPlaneType plane);
     AliMpMotifReader();
@@ -50,17 +69,6 @@ class AliMpMotifReader : public TObject
     AliMpMotifReader&  operator = (const AliMpMotifReader& right);
 
   private:
-#ifdef WITH_ROOT
-    static const Int_t   fgkSeparator;  // the separator used for conversion
-                                        // of string to Int_t
-    
-    // methods
-    Int_t   GetIndex(const string& s) const;
-    Int_t   GetIndex(const AliMpIntPair& pair) const;
-    string  GetString(Int_t index) const;
-    AliMpIntPair  GetPair(Int_t index) const;
-#endif
-
     // data members  
     AliMpStationType  fStationType; // station type 
     AliMpPlaneType    fPlaneType;   // plane type 
index 3d90d9fbcf02d9e12aa44197b0cbe5e5e82014d7..1aa89cdb23ab754a5df693c52cb25479cd995df5 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpMotifSpecial.cxx,v 1.8 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifSpecial.cxx,v 1.9 2005/09/26 16:11:20 ivana Exp $
 // Category: motif
 //
 // Class AliMpMotifSpecial
@@ -48,7 +48,12 @@ AliMpMotifSpecial::AliMpMotifSpecial():
 AliMpMotifSpecial::AliMpMotifSpecial(const TString &id, 
                                      AliMpMotifType *motifType)
   : AliMpVMotif(id,motifType),
+#ifdef WITH_STL
     fPadDimensionsVector(),
+#endif    
+#ifdef WITH_ROOT
+    fPadDimensionsVector(true),
+#endif    
     fPadDimensionsVector2()
   
 {
@@ -57,20 +62,12 @@ AliMpMotifSpecial::AliMpMotifSpecial(const TString &id,
 #ifdef WITH_STL
   fPadDimensionsVector.resize(motifType->GetNofPadsX()*motifType->GetNofPadsY());
 #endif  
-
-#ifdef WITH_ROOT
-  fPadDimensionsVector.Expand(motifType->GetNofPadsX()*motifType->GetNofPadsY());
-#endif  
 }
 
 //______________________________________________________________________________
 AliMpMotifSpecial::~AliMpMotifSpecial()
 {
   /// Destructor
-
-#ifdef WITH_ROOT
-  fPadDimensionsVector.Delete();
-#endif  
 }
 
 
@@ -91,19 +88,26 @@ Int_t AliMpMotifSpecial::VectorIndex(const AliMpIntPair& indices) const
 // public methods
 //
 
+#include <Riostream.h>
 //______________________________________________________________________________
 TVector2 
 AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const
 {
 /// Return the dimensions of pad located at the given indices
 
-  if (GetMotifType()->HasPad(localIndices))
+  if (GetMotifType()->HasPad(localIndices)) {
 #ifdef WITH_STL
     return fPadDimensionsVector[VectorIndex(localIndices)];
 #endif  
 #ifdef WITH_ROOT
-    return  *((TVector2*)fPadDimensionsVector[VectorIndex(localIndices)]);
-#endif  
+    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");
     return TVector2(0.,0.);
@@ -278,7 +282,7 @@ void AliMpMotifSpecial::SetPadDimensions(const AliMpIntPair& localIndices,
 
 #ifdef WITH_ROOT
   TVector2* dimensionsObj = new TVector2(dimensions);
-  fPadDimensionsVector[VectorIndex(localIndices)]= dimensionsObj;
+  fPadDimensionsVector.Add(localIndices, dimensionsObj);
 
   // fill the vector of different pad dimensions
   // only if these dimensions are not yet present
index 9675891db0e73d6ff16f9eece0cc62b099009580..57563b08d15783aa4b023eea8ee01e4d37d67ac8 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpMotifSpecial.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifSpecial.h,v 1.7 2005/09/26 16:10:46 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifSpecial
 #ifndef ALI_MP_MOTIF_SPECIAL_H
 #define ALI_MP_MOTIF_SPECIAL_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#include "AliMpExMap.h"
+#endif
+
 #include <TVector2.h>
 
-#include "AliMpMotifTypes.h"
 #include "AliMpVMotif.h"
 
 class TString;
 
 class AliMpMotifSpecial : public AliMpVMotif
 {
+ public:
+#ifdef WITH_STL
+  typedef std::vector< TVector2 > DimensionsMap;
+  typedef std::vector< TVector2 > DimensionsMap2;
+#endif    
+#ifdef WITH_ROOT
+  typedef AliMpExMap DimensionsMap;
+  typedef TObjArray  DimensionsMap2;
+#endif    
+
  public:
   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
   AliMpMotifSpecial();
@@ -44,13 +64,12 @@ class AliMpMotifSpecial : public AliMpVMotif
   virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
 
  private:
   // methods
   Int_t VectorIndex(const AliMpIntPair& indices) const;
 
   // data members
-  DimensionsMap fPadDimensionsVector;  // the vector of pad dimensions
-  DimensionsMap fPadDimensionsVector2; // the vector of different pad dimensions
+  DimensionsMap   fPadDimensionsVector;  // the vector of pad dimensions
+  DimensionsMap fPadDimensionsVector2; // the vector of different pad dimensions
 
   ClassDef(AliMpMotifSpecial,1) // A motif with its ID
 };
index ab34b97e9be49e702131a80977617d6bc1f96b25..1c8a3e6dc130db0590a2deee16e058813b615e42 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpMotifType.cxx,v 1.6 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifType.cxx,v 1.7 2005/09/26 16:11:20 ivana Exp $
 // Category: motif
 //
 // Class AliMpMotifType
 ClassImp(AliMpMotifType)
 
 const Int_t AliMpMotifType::fgkPadNumForA = 65;
-#ifdef WITH_ROOT
-const Int_t AliMpMotifType::fgkSeparator = 10000;
-#endif
-
 
 //______________________________________________________________________________
 AliMpMotifType::AliMpMotifType(const TString &id) 
@@ -45,7 +41,12 @@ AliMpMotifType::AliMpMotifType(const TString &id)
     fNofPadsX(0),   
     fNofPadsY(0),
     fVerboseLevel(0),
+#ifdef WITH_STL
     fConnections()
+#endif
+#ifdef WITH_ROOT
+    fConnections(true)
+#endif
 {
   /// Standard constructor
 }
@@ -74,36 +75,8 @@ AliMpMotifType::~AliMpMotifType()
 
   fConnections.erase(fConnections.begin(),fConnections.end());
 #endif  
-
-#ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
-  Long_t key, value;
-  while ( i.Next(key, value) ) delete (AliMpConnection*)value;
-#endif  
 }
 
-#ifdef WITH_ROOT
-
-//______________________________________________________________________________
-Int_t  AliMpMotifType::GetIndex(const AliMpIntPair& pair) const
-{
-/// Convert the pair of integers to integer.
-
-  if (pair.GetFirst() >= fgkSeparator || pair.GetSecond() >= fgkSeparator)
-    Fatal("GetIndex", "Index out of limit.");
-      
-  return pair.GetFirst()*fgkSeparator + pair.GetSecond() + 1;
-}  
-
-//______________________________________________________________________________
-AliMpIntPair  AliMpMotifType::GetPair(Int_t index) const
-{
-/// Convert the integer index to the pair of integers.
-
-  return AliMpIntPair((index-1)/fgkSeparator,(index-1)%fgkSeparator);
-}  
-#endif
-
 //______________________________________________________________________________
 AliMpVPadIterator* AliMpMotifType::CreateIterator() const
 {
@@ -155,7 +128,7 @@ void AliMpMotifType::AddConnection(const AliMpIntPair &localIndices,
 #endif
 
 #ifdef WITH_ROOT
-  fConnections.Add(GetIndex(localIndices), (Long_t)connection);
+  fConnections.Add(localIndices, connection);
 #endif   
 
   connection->SetOwner(this);
@@ -174,7 +147,7 @@ AliMpConnection *AliMpMotifType::FindConnectionByPadNum(Int_t padNum) const
 #endif
 
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
@@ -200,11 +173,7 @@ AliMpConnection *AliMpMotifType::FindConnectionByLocalIndices(
 #endif
 
 #ifdef WITH_ROOT
-  Long_t value = fConnections.GetValue(GetIndex(localIndices));
-  if (value) 
-    return (AliMpConnection*)value;
-  else
-    return 0;  
+  return (AliMpConnection*)fConnections.GetValue(localIndices);
 #endif
 }
 
@@ -221,7 +190,7 @@ AliMpConnection *AliMpMotifType::FindConnectionByGassiNum(Int_t gassiNum) const
 #endif
 
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
@@ -244,7 +213,7 @@ AliMpConnection *AliMpMotifType::FindConnectionByKaptonNum(Int_t kaptonNum) cons
 #endif
 
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
@@ -266,7 +235,7 @@ AliMpConnection *AliMpMotifType::FindConnectionByBergNum(Int_t bergNum) const
 #endif
 
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
@@ -292,11 +261,11 @@ AliMpIntPair AliMpMotifType::FindLocalIndicesByConnection(
 #endif
 
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* aConnection = (AliMpConnection*)value;
-    if (aConnection == connection) return GetPair(key);
+    if (aConnection == connection) return AliMpExMap::GetPair(key);
   }  
 #endif
 
@@ -315,11 +284,11 @@ AliMpIntPair AliMpMotifType::FindLocalIndicesByPadNum(Int_t padNum) const
 #endif
    
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
-    if (connection->GetPadNum() == padNum) return GetPair(key);
+    if (connection->GetPadNum() == padNum) return AliMpExMap::GetPair(key);
   }  
 #endif
  return AliMpIntPair::Invalid();
@@ -337,11 +306,11 @@ AliMpIntPair AliMpMotifType::FindLocalIndicesByGassiNum(Int_t gassiNum) const
 #endif
    
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
-    if (connection->GetGassiNum()==gassiNum) return GetPair(key);
+    if (connection->GetGassiNum()==gassiNum) return AliMpExMap::GetPair(key);
   }  
 #endif
    
@@ -360,11 +329,11 @@ AliMpIntPair AliMpMotifType::FindLocalIndicesByKaptonNum(Int_t kaptonNum) const
 #endif
    
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
-    if (connection->GetKaptonNum()==kaptonNum) return GetPair(key);
+    if (connection->GetKaptonNum()==kaptonNum) return AliMpExMap::GetPair(key);
   }  
 #endif
    
@@ -383,11 +352,11 @@ AliMpIntPair AliMpMotifType::FindLocalIndicesByBergNum(Int_t bergNum) const
 #endif
    
 #ifdef WITH_ROOT
-  ConnectionMapCIterator i(&fConnections);
+  TExMapIter i = fConnections.GetIterator();
   Long_t key, value;
   while ( i.Next(key, value) ) {
     AliMpConnection* connection = (AliMpConnection*)value;
-    if (connection->GetBergNum()==bergNum) return GetPair(key);
+    if (connection->GetBergNum()==bergNum) return AliMpExMap::GetPair(key);
   }  
 #endif
    
@@ -413,6 +382,9 @@ Bool_t AliMpMotifType::HasPad(const AliMpIntPair& localIndices) const
 {
   /// Return true if the pad indexed by <localIndices> has a connection
   
+  //cout << "AliMpMotifType::HasPad: " << localIndices
+  //     << "Connections size: " << fConnections.size() << endl;
+
   if (!localIndices.IsValid()) return false;
 
 #ifdef WITH_STL
@@ -420,7 +392,7 @@ Bool_t AliMpMotifType::HasPad(const AliMpIntPair& localIndices) const
 #endif
 
 #ifdef WITH_ROOT
-  Long_t value = fConnections.GetValue(GetIndex(localIndices));
+  TObject* value = fConnections.GetValue(localIndices);
   return value!=0;
 #endif
 }
index b0b30873ae3ae111d3c8f03b6844fe9660e106cb..aeacbb01890697a67f230ae2b885bd25e8cbb883 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpMotifType.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifType.h,v 1.8 2005/09/26 16:10:46 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifType
 #ifndef ALI_MP_MOTIF_TYPE_H
 #define ALI_MP_MOTIF_TYPE_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <map>
+#endif
+
+#ifdef WITH_ROOT
+#include "AliMpExMap.h"
+#endif
+
 #include <TObject.h>
 #include <TString.h>
 
-#include "AliMpMotifTypes.h"
 #include "AliMpIntPair.h"
 
 class AliMpConnection;
@@ -24,6 +33,15 @@ class AliMpVPadIterator;
 
 class AliMpMotifType : public TObject
 {
+  public:
+#ifdef WITH_STL
+    typedef std::map< AliMpIntPair, AliMpConnection* > ConnectionMap;
+    typedef ConnectionMap::const_iterator     ConnectionMapCIterator;
+#endif    
+#ifdef WITH_ROOT
+    typedef AliMpExMap ConnectionMap;
+#endif    
+
   public:
     AliMpMotifType(const TString &id);
     AliMpMotifType();
@@ -68,28 +86,13 @@ class AliMpMotifType : public TObject
   private:
     // static data members
     static const Int_t   fgkPadNumForA; // the pad number for the pad "A"
-
-#ifdef WITH_ROOT
-    static const Int_t   fgkSeparator;  // the separator used for conversion
-                                        // of AliMpIntPair to Int_t
-    
-    // methods
-    Int_t  GetIndex(const AliMpIntPair& pair) const;
-    AliMpIntPair  GetPair(Int_t index) const;
-#endif
   
     // data members
-    TString   fID;        // unique motif ID
-    Int_t     fNofPadsX;  // number of pads in x direction
-    Int_t     fNofPadsY;  // number of pads in y direction
-    Int_t     fVerboseLevel;  // verbose level
-
-#ifdef WITH_STL
-    ConnectionMap_t fConnections; //! Map (ix,iy) of connections
-#endif    
-#ifdef WITH_ROOT
-    mutable ConnectionMap_t fConnections; // Map (ix,iy) of connections
-#endif    
+    TString   fID;              // unique motif ID
+    Int_t     fNofPadsX;        // number of pads in x direction
+    Int_t     fNofPadsY;        // number of pads in y direction
+    Int_t     fVerboseLevel;    // verbose level
+    ConnectionMap fConnections; // Map (ix,iy) of connections
     
   ClassDef(AliMpMotifType,1)  //Motif type
 };
index 4a23f92cc1f9b9658ac2edb5ac695526e5891b80..6b94a24f62c6e2bace0a48df870b33e49331944d 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpMotifTypePadIterator.h,v 1.5 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpMotifTypePadIterator.h,v 1.6 2005/09/26 16:10:46 ivana Exp $
 
 /// \ingroup motif
 /// \class AliMpMotifTypePadIterator
@@ -43,8 +43,7 @@ class AliMpMotifTypePadIterator : public AliMpVPadIterator
 
     // private data members
     const AliMpMotifType* fMotifType;// the motif type over which iterate
-    AliMpIntPair fCurrentPosition;   //! the current position inside the motif type
-                                     // EXCLUDED FOR CINT (does not compile on HP)
+    AliMpIntPair fCurrentPosition;   // the current position inside the motif type
 
  ClassDef(AliMpMotifTypePadIterator,1) // iterator over motif's pads
 };
diff --git a/MUON/mapping/AliMpMotifTypes.h b/MUON/mapping/AliMpMotifTypes.h
deleted file mode 100644 (file)
index b815e5a..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-// $Id$
-// $MpId: AliMpMotifTypes.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
-
-/// \ingroup motif
-/// AliMpMotifTypes
-/// Sytem dependent types definitions for motif category.
-///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
-
-#ifndef ALI_MP_MOTIF_TYPES_H
-#define ALI_MP_MOTIF_TYPES_H
-
-#include "AliMpContainers.h"
-
-#ifdef WITH_STL
-  #include <map>
-  #include <vector>
-#endif
-
-#ifdef WITH_ROOT
-  #include <TExMap.h>
-  #include <TObjArray.h>
-#endif
-
-#include <TVector2.h>
-#include <TString.h>
-
-#include "AliMpIntPair.h"
-
-class AliMpConnection;
-class AliMpVMotif;
-class AliMpMotifType;
-class AliMpMotifPosition;
-
-#ifdef WITH_STL
-#ifdef __HP_aCC
-  typedef map<AliMpIntPair, AliMpConnection*> ConnectionMap_t;
-  typedef ConnectionMap_t::const_iterator     ConnectionMapCIterator;
-  typedef map<TString, AliMpVMotif*> MotifMap;
-  typedef MotifMap::const_iterator   MotifMapIterator;
-  typedef map<TString, AliMpMotifType*>  MotifTypeMap;
-  typedef MotifTypeMap::const_iterator   MotifTypeMapIterator;
-  typedef map<Int_t, AliMpMotifPosition*>  MotiPositionMap;
-  typedef MotiPositionMap::const_iterator  MotifPositionMapIterator;
-  typedef map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
-  typedef MotifPositionMap2::const_iterator      MotifPositionMap2Iterator;
-  typedef map<string,pair<Int_t,Int_t> > PadMapType;
-  typedef PadMapType::iterator PadMapTypeIterator;
-  typedef vector<TVector2> DimensionsMap;
-#else
-  typedef std::map< AliMpIntPair, AliMpConnection* > ConnectionMap_t;
-  typedef ConnectionMap_t::const_iterator     ConnectionMapCIterator;
-  typedef std::map<TString, AliMpVMotif*> MotifMap;
-  typedef MotifMap::const_iterator        MotifMapIterator;
-  typedef std::map<TString, AliMpMotifType*> MotifTypeMap;
-  typedef MotifTypeMap::const_iterator       MotifTypeMapIterator;
-  typedef std::map<Int_t, AliMpMotifPosition*>  MotiPositionMap;
-  typedef MotiPositionMap::const_iterator       MotifPositionMapIterator;
-  typedef std::map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
-  typedef MotifPositionMap2::const_iterator           MotifPositionMap2Iterator;
-  typedef std::map<std::string, std::pair<Int_t,Int_t> > PadMapType;
-  typedef PadMapType::iterator PadMapTypeIterator;
-  typedef std::vector< TVector2 > DimensionsMap;
-#endif
-#endif
-
-#ifdef WITH_ROOT
-  typedef TExMap     ConnectionMap_t;
-  typedef TExMapIter ConnectionMapCIterator;
-  typedef TExMap     MotifMap;
-  typedef TExMapIter MotifMapIterator;
-  typedef TExMap     MotifTypeMap;
-  typedef TExMapIter MotifTypeMapIterator;
-  typedef TExMap     MotifPositionMap;
-  typedef TExMapIter MotifPositionMapIterator;
-  typedef TExMap     MotifPositionMap2;
-  typedef TExMapIter MotifPositionMap2Iterator;
-  typedef TExMap     PadMapType;
-  typedef TExMapIter PadMapTypeIterator;
-  typedef TObjArray  DimensionsMap;
-#endif
-
-#endif //ALI_MP_MOTIF_TYPES_H
index 42c3f033806c33af66b5960e3ee4e25c888d9ad0..ffd5c29ce280c7cf9d2aa5c2798ee94ac0925fc5 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpNeighboursPadIterator.cxx,v 1.8 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpNeighboursPadIterator.cxx,v 1.9 2005/09/26 16:12:23 ivana Exp $
 // Category: sector
 //
 // Class AliMpNeighboursPadIterator
@@ -132,8 +132,9 @@ Bool_t AliMpNeighboursPadIterator::IsNeighbours(const AliMpPad& pad) const
 
 #ifdef WITH_STL
 //______________________________________________________________________________
-PadVector AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
-                                           const AliMpIntPair& direction) const
+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 <fCenterPad>, in a given line
@@ -168,8 +169,9 @@ void  AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal,
 #endif
 #ifdef WITH_ROOT
 //______________________________________________________________________________
-PadVector* AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
-                                           const AliMpIntPair& direction) const
+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 <fCenterPad>, in a given line
@@ -315,7 +317,7 @@ void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
     if (includeCenter) fPads.push_back(fCenterPad);
     //fPads.insert(fPads.end(),setTotal.begin(),setTotal.end());
     
-    PadSetIterator it;
+    PadSetCIterator it;
     for (it = setTotal.begin(); it != setTotal.end(); it++)
       fPads.push_back((*it));
 #endif
index 7995ab7ca2028c3387ecf14990c80e73693bf7e2..48bd0319b4f04f5413cd0ea0b1e439e3b7fc1889 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpNeighboursPadIterator.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpNeighboursPadIterator.h,v 1.8 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpNeighboursPadIterator
 #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 
-#include "AliMpSectorTypes.h"
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#include <set>
+#endif
+
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
+
 #include "AliMpVPadIterator.h"
 #include "AliMpPad.h"
 
@@ -22,6 +32,17 @@ class AliMpIntPair;
 
 class AliMpNeighboursPadIterator : public AliMpVPadIterator
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpPad>  PadVector;
+    typedef std::set<AliMpPad>     PadSet;
+    typedef PadSet::const_iterator PadSetCIterator;
+#endif
+#ifdef WITH_ROOT
+    typedef TObjArray  PadVector;
+    typedef TObjArray  PadSet;
+#endif
+
   public:
     AliMpNeighboursPadIterator();
     AliMpNeighboursPadIterator(const AliMpSectorSegmentation* segmentation,
@@ -54,7 +75,7 @@ class AliMpNeighboursPadIterator : public AliMpVPadIterator
 #endif
 #ifdef WITH_ROOT
     PadVector* PadVectorLine(const AliMpPad& from,
-                            const AliMpIntPair& direction) const;
+                             const AliMpIntPair& direction) const;
     void      UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
 #endif
     void      FillPadsVector(Bool_t includeCenter);
index d469c7925bf716d5cbf58ae01a4908c028fd48a3..1d1437df2005fc4a4ef55d0934b8dea779f905fe 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpPadRow.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpPadRow.h,v 1.7 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpPadRow
 #ifndef ALI_MP_PAD_ROW_H
 #define ALI_MP_PAD_ROW_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
+
 #include <TObject.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpXDirection.h"
 
 class AliMpVPadRowSegment;
@@ -23,6 +32,14 @@ class AliMpMotif;
 
 class AliMpPadRow : public TObject
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpVPadRowSegment*>  PadRowSegmentVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TObjArray  PadRowSegmentVector;
+#endif
+
   public:
     AliMpPadRow(AliMpXDirection direction);
     AliMpPadRow();
index f16f1b0ee4492a98dca92315b981f66765570945..dc9bc623f52c5bd7d4965327df3b4ec32bcd0df6 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpRow.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpRow.h,v 1.8 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpRow
 #ifndef ALI_MP_ROW_H
 #define ALI_MP_ROW_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TList.h>
+#endif
+
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVIndexed.h"
 #include "AliMpDirection.h"
 
@@ -26,6 +35,14 @@ class AliMpMotifMap;
 
 class AliMpRow : public AliMpVIndexed
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TList  RowSegmentVector;
+#endif
+
   public:
     AliMpRow(Int_t id, AliMpMotifMap* motifMap);
     AliMpRow();
index a3f0d2e7a0071652d8420807b14c4164f002ead9..54fc570460db8514bef6427b75166fbf0d12cb35 100755 (executable)
@@ -15,7 +15,6 @@
 
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVRowSegmentSpecial.h"
 
 class AliMpRow;
index 08bc4563f43a7dd3c5743c446e1be954fa99c3a5..3b5c963165522151b30c59229b39f3d855855b5a 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVRowSegmentSpecial.h"
 
 class AliMpRow;
index 6d5db82819a006ffd99ed36b178b103b2039e45b..a2f970188aaedcf96d0f431b78b61fdf3c93eff3 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSector.cxx,v 1.9 2005/09/02 10:01:09 ivana Exp $
+// $MpId: AliMpSector.cxx,v 1.10 2005/09/26 16:12:23 ivana Exp $
 // Category: sector
 //
 // Class AliMpSector
@@ -41,7 +41,7 @@ ClassImp(AliMpSector)
 //_____________________________________________________________________________
 AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows, 
                          AliMpDirection direction, const TVector2& offset) 
-  : TObject(),
+  : TNamed("Sector", ""),
     fID(id),
     fOffset(offset),
     fZones(),
@@ -51,7 +51,8 @@ AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
 {
 /// Standard constructor
 
-  fMotifMap = new AliMpMotifMap();
+  fMotifMap = new AliMpMotifMap(true);
+  //fMotifMap = new AliMpMotifMap();
 
 #ifdef WITH_STL
   for (Int_t izone = 0; izone<nofZones; izone++) 
@@ -72,7 +73,7 @@ AliMpSector::AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
 
 //_____________________________________________________________________________
 AliMpSector::AliMpSector(const AliMpSector& right) 
-  : TObject(right) 
+  : TNamed(right) 
 {
 /// Protected copy constructor (not provided) 
 
@@ -81,7 +82,7 @@ AliMpSector::AliMpSector(const AliMpSector& right)
 
 //_____________________________________________________________________________
 AliMpSector::AliMpSector() 
-  : TObject(),
+  : TNamed(),
     fID(""),    
     fOffset(TVector2(0., 0.)),
     fZones(),
index 303c71c9db072b1762166b54cf9e92a1bdbd645c..3976ae2d42cc97bf4de5d28182c65949fe236c70 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSector.h,v 1.8 2005/09/02 10:00:49 ivana Exp $
+// $MpId: AliMpSector.h,v 1.9 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpSector
 #ifndef ALI_MP_SECTOR_H
 #define ALI_MP_SECTOR_H
 
-#include <TObject.h>
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
+
+#include <TNamed.h>
 #include <TString.h>
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpDirection.h"
 
 class AliMpZone;
@@ -27,8 +36,18 @@ class AliMpVMotif;
 class AliMpVPadIterator;
 class AliMpMotifMap;
 
-class AliMpSector : public TObject
+class AliMpSector : public TNamed
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpRow*> RowVector;
+    typedef std::vector<AliMpZone*> ZoneVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TObjArray  RowVector;
+    typedef TObjArray  ZoneVector;
+#endif
+
   public:
     AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
                 AliMpDirection direction, const TVector2& offset);
index 195adc76fa803a37dd0d50974a81a13a381b5104..09b7159e97cb301c5cfdf70b7c943b262c1e695d 100755 (executable)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSectorReader.cxx,v 1.4 2005/09/02 10:01:09 ivana Exp $
+// $MpId: AliMpSectorReader.cxx,v 1.5 2005/09/26 16:12:23 ivana Exp $
 // Category: sector
 //
 // Class AliMpSectorReader
@@ -469,7 +469,7 @@ void AliMpSectorReader::ReadRowSegmentSpecialData(ifstream& in,
   // Process data
   //
     
-  PadRowVector  newPadRows;
+  AliMpVRowSegmentSpecial::PadRowVector  newPadRows;
   for (Int_t i=0; i<nofPadRows; i++) {
     
      // Create pad row
index c40f60711f9c2b30c69c6e5fa123adcf05ac92cc..302731f6248bd092ac7d038c6e06448ff602f34f 100755 (executable)
@@ -18,7 +18,6 @@
 #include <TObject.h>
 #include <TString.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpStationType.h"
 #include "AliMpPlaneType.h"
 #include "AliMpXDirection.h"
index 23aeec219f27cad322b20901867324e8f1946be7..d7b8c9329cd44f9ebbfe29ca0af06857f6a08359 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSectorSegmentation.h,v 1.9 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpSectorSegmentation.h,v 1.10 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpSectorSegmentation
 #ifndef ALI_MP_SECTOR_SEGMENTATION_H
 #define ALI_MP_SECTOR_SEGMENTATION_H
 
+
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <map>
+#endif
+
+#ifdef WITH_ROOT
+#include <TExMap.h>
+#endif
+
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVSegmentation.h"
 #include "AliMpPad.h"
 
@@ -31,6 +41,16 @@ class AliMpArea;
 
 class AliMpSectorSegmentation : public AliMpVSegmentation
 {
+  public:
+#ifdef WITH_STL
+    typedef std::map<Int_t, TVector2>         PadDimensionsMap;
+    typedef PadDimensionsMap::const_iterator  PadDimensionsMapCIterator;
+#endif
+#ifdef WITH_ROOT
+    typedef  TExMap      PadDimensionsMap;
+    typedef  TExMapIter  PadDimensionsMapCIterator;
+#endif
+
   public:
     AliMpSectorSegmentation(const AliMpSector* sector);
     AliMpSectorSegmentation();
@@ -91,7 +111,7 @@ class AliMpSectorSegmentation : public AliMpVSegmentation
     const AliMpSector*  fkSector;   // Sector
     AliMpPad*           fPadBuffer; // The pad buffer
 #ifdef WITH_STL
-    PadDimensionsMap    fPadDimensionsMap; //! Map between zone IDs and pad dimensions
+    PadDimensionsMap    fPadDimensionsMap; // Map between zone IDs and pad dimensions
                               // EXCLUDED FOR CINT (does not compile on HP)    
 #endif    
 #ifdef WITH_ROOT
diff --git a/MUON/mapping/AliMpSectorTypes.h b/MUON/mapping/AliMpSectorTypes.h
deleted file mode 100644 (file)
index c2939eb..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-// $Id$
-// $MpId: AliMpSectorTypes.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
-
-/// \ingroup sector
-/// AliMpSectorTypes
-/// System dependent types definitions for sector category.
-///
-/// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
-
-#ifndef ALI_MP_SECTOR_TYPES_H
-#define ALI_MP_SECTOR_TYPES_H
-
-#include "AliMpContainers.h"
-
-#ifdef WITH_STL
-  #include <vector>
-  #include <map>
-  #include <set>
-#endif
-
-#ifdef WITH_ROOT
-  #include <TArrayI.h>
-  #include <TObjArray.h>
-  #include <TList.h>
-  #include <TExMap.h>
-#endif
-
-#include <string>
-
-#include <TVector2.h>
-
-#include "AliMpPad.h"
-
-class AliMpVPadRowSegment;
-class AliMpPadRow;
-class AliMpVMotif;
-class AliMpVRowSegment;
-class AliMpSubZone;
-class AliMpZone;
-class AliMpRow;
-
-#ifdef WITH_STL
-#ifdef __HP_aCC
-  typedef vector<Int_t> MotifPositionIdVector;
-  typedef vector<AliMpPad> PadVector;
-  typedef vector<AliMpPadRow*>  PadRowVector;
-  typedef vector<AliMpVMotif*>  MotifVector;
-  typedef vector<AliMpVRowSegment*>  RowSegmentVector;
-  typedef vector<AliMpVPadRowSegment*>  PadRowSegmentVector;
-  typedef vector<AliMpSubZone*> SubZoneVector;
-  typedef vector<AliMpRow*> RowVector;
-  typedef vector<AliMpZone*> ZoneVector;
-  typedef map<Int_t, TVector2>  PadDimensionsMap;
-  typedef PadDimensionsMap::const_iterator  PadDimensionsMapCIterator;
-  typedef set<AliMpPad> PadSet;
-  typedef PadSet::const_iterator PadSetIterator;
-#else
-  typedef std::vector<Int_t> MotifPositionIdVector;
-  typedef std::vector<AliMpPad> PadVector;
-  typedef std::vector<AliMpPadRow*>  PadRowVector;
-  typedef std::vector<AliMpVMotif*>  MotifVector;
-  typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
-  typedef std::vector<AliMpVPadRowSegment*>  PadRowSegmentVector;
-  typedef std::vector<AliMpSubZone*>  SubZoneVector;
-  typedef std::vector<AliMpRow*> RowVector;
-  typedef std::vector<AliMpZone*> ZoneVector;
-  typedef std::map<Int_t, TVector2>  PadDimensionsMap;
-  typedef PadDimensionsMap::const_iterator  PadDimensionsMapCIterator;
-  typedef std::set<AliMpPad> PadSet;
-  typedef PadSet::const_iterator PadSetIterator;
-#endif
-#endif
-
-#ifdef WITH_ROOT
-#ifndef __HP_aCC
-  using std::string;
-#endif
-  typedef TArrayI    MotifPositionIdVector;
-  typedef TObjArray  PadVector;
-  typedef TObjArray  PadRowVector;
-  typedef TObjArray  MotifVector;
-  typedef TList      RowSegmentVector;
-  typedef TObjArray  PadRowSegmentVector;
-  typedef TObjArray  SubZoneVector;
-  typedef TObjArray  RowVector;
-  typedef TObjArray  ZoneVector;
-  typedef TExMap     PadDimensionsMap;
-  typedef TExMapIter PadDimensionsMapCIterator;
-  typedef TObjArray  PadSet;
-#endif
-
-#endif //ALI_MP_SECTOR_TYPES_H
index e59e534f33d388ff3c5a413a103f12d6070d6b0e..5b1e6b88005ab6860ea37ea61cdf34bd4e4cb78d 100644 (file)
@@ -14,7 +14,7 @@
 **************************************************************************/
 
 // $Id$
-// $MpId: AliMpSt345Reader.cxx,v 1.4 2005/09/19 19:01:31 ivana Exp $
+// $MpId: AliMpSt345Reader.cxx,v 1.5 2005/09/23 12:57:32 ivana Exp $
 
 #include "AliMpSt345Reader.h"
 
index 37fa6a69b4aee686dae83fee3f8fe70d39dfbb5c..c5c9ec329737ef34d494929424aa420643d45968 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpSubZone.h,v 1.7 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpSubZone.h,v 1.8 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpSubZone
 #ifndef ALI_MP_SUB_ZONE_H
 #define ALI_MP_SUB_ZONE_H
 
-#include <TObject.h>
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TList.h>
+#endif
 
-#include "AliMpSectorTypes.h"
+#include <TObject.h>
 
 class AliMpVMotif;
 class AliMpVRowSegment;
 
 class AliMpSubZone : public TObject
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpVRowSegment*>  RowSegmentVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TList  RowSegmentVector;
+#endif
+
   public:
     AliMpSubZone(AliMpVMotif* motif);
     AliMpSubZone();
index 56628b692e1596e1b22d62e8adb90dfba20d2b83..cad564230a8b3f674c610705393493efde50f385 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpVRowSegmentSpecial.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpVRowSegmentSpecial.h,v 1.7 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpVRowSegmentSpecial
 #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TArrayI.h>
+#include <TObjArray.h>
+#endif
+
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVRowSegment.h"
 #include "AliMpVMotif.h"
 
@@ -27,6 +37,18 @@ class AliMpIntPair;
 
 class AliMpVRowSegmentSpecial : public AliMpVRowSegment
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpPadRow*>  PadRowVector;
+    typedef std::vector<AliMpVMotif*>  MotifVector;
+    typedef std::vector<Int_t>         MotifPositionIdVector;
+#endif
+#ifdef WITH_ROOT
+    typedef  TObjArray  PadRowVector;
+    typedef  TObjArray  MotifVector;
+    typedef  TArrayI    MotifPositionIdVector;
+#endif
+
   public:
     AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
     AliMpVRowSegmentSpecial();
@@ -92,8 +114,9 @@ class AliMpVRowSegmentSpecial : public AliMpVRowSegment
     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
+    Int_t  fNofMotifPositionIds; // number of motif positions Ids
 #endif    
     
   ClassDef(AliMpVRowSegmentSpecial,1)  //Row segment
index 126b698a15c57b26377ec8d097906cef2050f2c0..e1f8999bba2cd12a7e9524e4519828ced1e6c784 100755 (executable)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 // $Id$
-// $MpId: AliMpZone.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
+// $MpId: AliMpZone.h,v 1.7 2005/09/26 16:12:11 ivana Exp $
 
 /// \ingroup sector
 /// \class AliMpZone
 #ifndef ALI_MP_ZONE_H
 #define ALI_MP_ZONE_H
 
+#include "AliMpContainers.h"
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
+
 #include <TObject.h>
 #include <TVector2.h>
 
-#include "AliMpSectorTypes.h"
-
 class AliMpSubZone;
+class AliMpVMotif;
 
 class AliMpZone : public TObject
 {
+  public:
+#ifdef WITH_STL
+    typedef std::vector<AliMpSubZone*>  SubZoneVector;
+#endif
+#ifdef WITH_ROOT
+    typedef TObjArray  SubZoneVector;
+#endif
+
   public:
     AliMpZone(Int_t id);
     AliMpZone();