AliRoot Core  3dc7879 (3dc7879)
AliMpExMap Class Reference

Helper class making Root persistent TExMap. More...

#include <AliMpExMap.h>

Inheritance diagram for AliMpExMap:

Public Member Functions

 AliMpExMap ()
 
 AliMpExMap (TRootIOCtor *)
 
 AliMpExMap (const AliMpExMap &rhs)
 
AliMpExMapoperator= (const AliMpExMap &rhs)
 
virtual ~AliMpExMap ()
 
virtual void Clear (Option_t *opt="")
 
virtual void Print (Option_t *opt="") const
 
void Add (Int_t keyFirst, Int_t keySecond, 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)
 
Int_t GetSize () const
 
Int_t GetCapacity () const
 
TObject * GetValue (Int_t keyFirst, Int_t keySecond) const
 
TObject * GetValue (const TString &key) const
 
TObject * GetValue (Int_t key) const
 
AliMpExMapIteratorCreateIterator () const
 

Static Public Member Functions

static Long_t GetIndex (const TString &s)
 
static TString GetString (Long_t index)
 

Private Member Functions

void FillMap ()
 
void AddKey (Long_t key)
 
void Copy (TObject &dest) const
 

Static Private Member Functions

static const TString & GetCharacterMap ()
 
static Long_t GetIndex (Int_t first, Int_t second)
 
static Int_t GetPairFirst (Long_t index)
 
static Int_t GetPairSecond (Long_t index)
 

Private Attributes

TExMap fMap
 ! Transient map class More...
 
TObjArray fObjects
 Array of objects. More...
 
TArrayL fKeys
 Array of keys. More...
 

Static Private Attributes

static const Int_t fgkDefaultSize = 300
 Default initial size. More...
 
static const Bool_t fgkDefaultOwnership = true
 Default ownership. More...
 
static const Int_t fgkSeparator1 = 10000
 the separator used for conversion of Int_t pair to Int_t More...
 
static const Int_t fgkSeparator2 = 100
 the separator used for conversion of TString to Int_t More...
 

Friends

class AliMpExMapIterator
 

Detailed Description

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

Definition at line 28 of file AliMpExMap.h.

Constructor & Destructor Documentation

AliMpExMap::AliMpExMap ( )

Default constructor

Definition at line 104 of file AliMpExMap.cxx.

AliMpExMap::AliMpExMap ( TRootIOCtor *  )

"Root - I/O" constructor

Definition at line 116 of file AliMpExMap.cxx.

AliMpExMap::AliMpExMap ( const AliMpExMap rhs)

Copy ctor

Definition at line 127 of file AliMpExMap.cxx.

AliMpExMap::~AliMpExMap ( )
virtual

Destructor

Definition at line 152 of file AliMpExMap.cxx.

Member Function Documentation

void AliMpExMap::Add ( const TString &  key,
TObject *  object 
)

Add object with its key to the map and arrays

Definition at line 302 of file AliMpExMap.cxx.

void AliMpExMap::Add ( Int_t  key,
TObject *  object 
)

Add object with its key to the map and arrays

Definition at line 312 of file AliMpExMap.cxx.

void AliMpExMap::AddKey ( Long_t  key)
private

Add key in array with checking size

Definition at line 212 of file AliMpExMap.cxx.

Referenced by Add().

void AliMpExMap::Clear ( Option_t *  opt = "")
virtual
void AliMpExMap::Copy ( TObject &  dest) const
private

Copy this to dest Copy implies that dest will become owner of its objects, whatever the ownership of (*this) is.

Definition at line 227 of file AliMpExMap.cxx.

Referenced by AliMpExMap(), and operator=().

AliMpExMapIterator * AliMpExMap::CreateIterator ( ) const

Return iterator set to the beginning of the map

Definition at line 357 of file AliMpExMap.cxx.

Referenced by AliMUONGeometryTransformer::AddAlignableVolumes(), AliMUONSimpleClusterServer::AliMUONSimpleClusterServer(), AliMpMotifMap::CalculateNofPads(), AliMpDDLStore::CreateBusPatchIterator(), AliMUONESDInterface::CreateClusterIterator(), AliMUONRegionalTriggerConfig::CreateCrateIterator(), AliMUONTriggerCrateStore::CreateCrateIterator(), AliMpRegionalTrigger::CreateCrateIterator(), AliMUONESDInterface::CreateDigitIterator(), AliMUONESDInterface::CreateDigitIteratorInCluster(), AliMUONCheckItem::CreateIterator(), AliMUON1DMap::CreateIterator(), AliMUONTriggerCrateStore::CreateLocalBoardIterator(), AliMUONGeometryTransformer::CreateZeroAlignmentData(), AliMpMotifMap::FillMotifPositionMap2(), AliMUONESDInterface::FindCluster(), AliMpMotifMap::GetAllMotifPositionsIDs(), AliMpSlat::GetAllMotifPositionsIDs(), AliMpDEStore::GetDetElement(), AliMpMotifMap::GetMotifPosition(), AliMUON2DMap::GetSize(), AliMUONGeometryTransformer::LoadTransformations(), AliMUONGeometryMisAligner::MisAlign(), AliMUON2DMapIterator::NextIterator(), AliMUON2DMapIteratorByI::NextIterator(), Print(), AliMpSlat::Print(), AliMpMotifMap::PrintGlobalIndices(), AliMpMotifMap::PrintMotifPositions(), AliMpMotifMap::PrintMotifPositions2(), AliMpMotifMap::PrintMotifs(), AliMpMotifMap::PrintMotifTypes(), AliMUONSurveyUtil::ReAlign(), AliMUONAlignment::ReAlign(), ReAlign(), and AliMUONGeometryTransformer::WriteDetElemTransforms().

void AliMpExMap::FillMap ( )
private

Fill transient map from the arrays of objects and keys

Definition at line 203 of file AliMpExMap.cxx.

Referenced by Copy(), and GetValue().

Int_t AliMpExMap::GetCapacity ( ) const

Return the map capacity

Definition at line 348 of file AliMpExMap.cxx.

const TString & AliMpExMap::GetCharacterMap ( )
staticprivate

Return the string mapping characters to integers

Definition at line 60 of file AliMpExMap.cxx.

Referenced by GetIndex(), and GetString().

Long_t AliMpExMap::GetIndex ( const TString &  s)
static

Convert the TString to integer.

Definition at line 69 of file AliMpExMap.cxx.

Referenced by Add(), AliMpMotifReader::BuildMotifType(), and GetValue().

Long_t AliMpExMap::GetIndex ( Int_t  first,
Int_t  second 
)
staticprivate

Convert the pair of integers to integer.

Definition at line 162 of file AliMpExMap.cxx.

Int_t AliMpExMap::GetPairFirst ( Long_t  index)
staticprivate

Return first integer from index (encoded pair)

Definition at line 183 of file AliMpExMap.cxx.

Referenced by AliMpExMapIterator::Next().

Int_t AliMpExMap::GetPairSecond ( Long_t  index)
staticprivate

Return second integer from index (encoded pair)

Definition at line 191 of file AliMpExMap.cxx.

Referenced by AliMpExMapIterator::Next().

TString AliMpExMap::GetString ( Long_t  index)
static

Convert the integer index to the string.

Definition at line 86 of file AliMpExMap.cxx.

Referenced by AliMpExMapIterator::Next(), and AliMpMotifMap::PrintMotifTypes().

TObject * AliMpExMap::GetValue ( Int_t  keyFirst,
Int_t  keySecond 
) const

Return the object associated with the given key if found, otherwise return 0

Definition at line 365 of file AliMpExMap.cxx.

Referenced by AliMpSlat::Add(), AliMUONTriggerCrateStore::AddCrate(), AliMpDetElement::AddManu(), AliMUONGeometryEnvelopeStore::AlignEnvelope(), AliMUONSimpleClusterServer::Clusterize(), AliMUONTriggerCrateStore::Crate(), AliMUONESDInterface::CreateClusterIterator(), AliMUONESDInterface::CreateDigitIterator(), AliMUONESDInterface::CreateDigitIteratorInCluster(), AliMUONManuContourMaker::CreateManuContour(), AliMUONRawWriter::Digits2BusPatchMap(), AliMUONESDInterface::FindCluster(), AliMpRegionalTrigger::FindLocalBoard(), AliMpMotifMap::FindMotif(), AliMpMotifMap::FindMotifPosition(), AliMpSlat::FindMotifPosition(), AliMpMotifMap::FindMotifType(), AliMUON1DMap::FindObject(), AliMUON2DMap::FindObject(), AliMUONClusterStoreV2::FindObject(), AliMUONRegionalTriggerConfig::FindTriggerCrate(), AliMpRegionalTrigger::FindTriggerCrate(), AliMpDDLStore::GetBusPatch(), AliMUONGeometryTransformer::GetDEArea(), AliMpDEStore::GetDetElement(), AliMUONGeometryModuleTransformer::GetDetElement(), AliMUONCheckItem::GetItem(), AliMpSegmentation::GetMpSegmentationByElectronics(), AliMpMotifSpecial::GetPadDimensionsByIndices(), AliMUON2DMap::GetSize(), AliMUONPainterHelper::Global2Local(), AliMUONPainterHelper::Local2Global(), AliMUONTriggerCrateStore::LocalBoard(), AliMpDetElement::ManusForHV(), AliMUONSimpleClusterServer::PadArray(), AliMUONRegionalTriggerConfig::ReadData(), AliMpRegionalTrigger::ReadData(), AliMpDEStore::ReadDENames(), AliMUON2DMap::Set(), AliMUONCDB::ShowConfig(), AliMUONVGeometryBuilder::UpdateDetElements(), and AliMUONRawWriter::WriteTrackerDDL().

TObject * AliMpExMap::GetValue ( const TString &  key) const

Return the object associated with the given key if found, otherwise return 0

Definition at line 374 of file AliMpExMap.cxx.

TObject * AliMpExMap::GetValue ( Int_t  key) const

Return the object associated with the given key if found, otherwise return 0

Definition at line 383 of file AliMpExMap.cxx.

AliMpExMap & AliMpExMap::operator= ( const AliMpExMap rhs)

Assignment operator

Definition at line 140 of file AliMpExMap.cxx.

void AliMpExMap::Print ( Option_t *  opt = "") const
virtual

Print out

Definition at line 269 of file AliMpExMap.cxx.

void AliMpExMap::SetSize ( Int_t  size)

Friends And Related Function Documentation

friend class AliMpExMapIterator
friend

Definition at line 30 of file AliMpExMap.h.

Referenced by CreateIterator().

Member Data Documentation

const Bool_t AliMpExMap::fgkDefaultOwnership = true
staticprivate

Default ownership.

Definition at line 84 of file AliMpExMap.h.

Referenced by AliMpExMap().

const Int_t AliMpExMap::fgkDefaultSize = 300
staticprivate

Default initial size.

Definition at line 83 of file AliMpExMap.h.

const Int_t AliMpExMap::fgkSeparator1 = 10000
staticprivate

the separator used for conversion of Int_t pair to Int_t

Definition at line 86 of file AliMpExMap.h.

const Int_t AliMpExMap::fgkSeparator2 = 100
staticprivate

the separator used for conversion of TString to Int_t

Definition at line 88 of file AliMpExMap.h.

Referenced by GetIndex(), and GetString().

TArrayL AliMpExMap::fKeys
private

Array of keys.

Definition at line 94 of file AliMpExMap.h.

Referenced by AddKey(), Clear(), Copy(), FillMap(), Print(), and SetSize().

TExMap AliMpExMap::fMap
mutableprivate

! Transient map class

Definition at line 92 of file AliMpExMap.h.

Referenced by Add(), Clear(), Copy(), FillMap(), GetValue(), and Print().

TObjArray AliMpExMap::fObjects
private

Array of objects.

Definition at line 93 of file AliMpExMap.h.

Referenced by Add(), AddKey(), AliMpExMap(), Clear(), Copy(), FillMap(), GetCapacity(), GetSize(), Print(), and SetOwner().


The documentation for this class was generated from the following files: