![]() |
AliRoot Core
3dc7879 (3dc7879)
|
Helper class making Root persistent TExMap. More...
#include <AliMpExMap.h>
Public Member Functions | |
AliMpExMap () | |
AliMpExMap (TRootIOCtor *) | |
AliMpExMap (const AliMpExMap &rhs) | |
AliMpExMap & | operator= (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 |
AliMpExMapIterator * | CreateIterator () 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 |
Helper class making Root persistent TExMap.
The objects and keys from TExMap are store in additional arrays which are Root persistent.
Definition at line 28 of file AliMpExMap.h.
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.
|
virtual |
Destructor
Definition at line 152 of file AliMpExMap.cxx.
void AliMpExMap::Add | ( | Int_t | keyFirst, |
Int_t | keySecond, | ||
TObject * | object | ||
) |
Add object with its key to the map and arrays
Definition at line 292 of file AliMpExMap.cxx.
Referenced by AliMpSlat::Add(), AliMUONTriggerCrateStore::AddCrate(), AliMUONCheckItem::AddItem(), AliMpDetElement::AddManu(), AliMpMotifMap::AddMotif(), AliMpMotifMap::AddMotifPosition(), AliMpMotifMap::AddMotifType(), AliMUONGeometryTransformer::CreateDEAreas(), AliMUONGeometryTransformer::CreateModules(), AliMUONRawWriter::Digits2BusPatchMap(), AliMpSegmentation::FillElCardsMap(), AliMpMotifMap::FillMotifPositionMap2(), AliMUONContourHandler::GenerateTransformations(), AliMUONESDInterface::LoadEvent(), AliMUONGeometryMisAligner::MisAlign(), AliMUONRegionalTriggerConfig::ReadData(), AliMpRegionalTrigger::ReadData(), AliMpDDLStore::ReadDDLs(), AliMpDEStore::ReadDENames(), AliMUONTriggerCrateStore::ReadFromFile(), AliMUONSurveyUtil::ReAlign(), AliMUONAlignment::ReAlign(), ReAlign(), AliMUON1DMap::Set(), AliMUON2DMap::Set(), AliMpMotifSpecial::SetPadDimensions(), AliMUONCDB::ShowConfig(), AliMUONVGeometryBuilder::UpdateDetElements(), AliMUONClusterStoreV2::UpdateMap(), and AliMUONSimpleClusterServer::UseDigits().
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.
|
private |
Add key in array with checking size
Definition at line 212 of file AliMpExMap.cxx.
Referenced by Add().
|
virtual |
Clear memory
Definition at line 259 of file AliMpExMap.cxx.
Referenced by AliMUON2DMap::Clear(), AliMUONClusterStoreV2::Clear(), AliMUON1DMap::Clear(), AliMUONClusterStoreV2::ReMap(), and AliMUONESDInterface::Reset().
|
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().
|
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.
|
staticprivate |
Return the string mapping characters to integers
Definition at line 60 of file AliMpExMap.cxx.
Referenced by GetIndex(), and GetString().
|
static |
Convert the TString to integer.
Definition at line 69 of file AliMpExMap.cxx.
Referenced by Add(), AliMpMotifReader::BuildMotifType(), and GetValue().
|
staticprivate |
Convert the pair of integers to integer.
Definition at line 162 of file AliMpExMap.cxx.
|
staticprivate |
Return first integer from index (encoded pair)
Definition at line 183 of file AliMpExMap.cxx.
Referenced by AliMpExMapIterator::Next().
|
staticprivate |
Return second integer from index (encoded pair)
Definition at line 191 of file AliMpExMap.cxx.
Referenced by AliMpExMapIterator::Next().
Int_t AliMpExMap::GetSize | ( | ) | const |
Return the map size
Definition at line 340 of file AliMpExMap.cxx.
Referenced by AliMpSlat::Add(), AliMpDetElement::AddManu(), AliMUON1DMap::Create(), AliMpDEStore::FillDEs(), AliMpSegmentation::FillElCardsMap(), AliMpMotifMap::FillMotifPositionMap2(), AliMpMotifMap::GetAllMotifPositionsIDs(), AliMpSlat::GetNofElectronicCards(), AliMpMotifMap::GetNofMotifPositions(), AliMUONRegionalTriggerConfig::GetNofTriggerCrates(), AliMpRegionalTrigger::GetNofTriggerCrates(), AliMUON1DMap::GetSize(), AliMUON2DMap::GetSize(), AliMUONCheckItem::IsFull(), AliMUONGeometryMisAligner::MisAlign(), AliMUONTriggerCrateStore::NumberOfCrates(), AliMUONTriggerCrateStore::NumberOfLocalBoards(), AliMUONCheckItem::Print(), AliMpSlat::Print(), AliMpMotifMap::PrintGlobalIndices(), AliMpMotifMap::PrintMotifPositions(), AliMpMotifMap::PrintMotifPositions2(), AliMpMotifMap::PrintMotifs(), AliMpMotifMap::PrintMotifTypes(), AliMUONRegionalTriggerConfig::ReadData(), AliMpRegionalTrigger::ReadData(), AliMUONSurveyUtil::ReAlign(), ReAlign(), and AliMUONCDB::ShowConfig().
|
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.
|
virtual |
Print out
Definition at line 269 of file AliMpExMap.cxx.
void AliMpExMap::SetOwner | ( | Bool_t | owner | ) |
Set given ownership to object array
Definition at line 332 of file AliMpExMap.cxx.
Referenced by AliMpDetElement::AddManu(), AliMpDDLStore::AliMpDDLStore(), AliMpDEStore::AliMpDEStore(), AliMpMotifMap::AliMpMotifMap(), AliMpSegmentation::AliMpSegmentation(), AliMpSlat::AliMpSlat(), AliMUON1DMap::AliMUON1DMap(), AliMpSegmentation::FillElCardsMap(), AliMUONESDInterface::LoadEvent(), AliMUONTriggerCrateStore::ReadFromFile(), AliMUONClusterStoreV2::ReMap(), AliMUONESDInterface::Reset(), and AliMpRegionalTrigger::SetTriggerCratesOwner().
void AliMpExMap::SetSize | ( | Int_t | size | ) |
Set given size to the key array
Definition at line 322 of file AliMpExMap.cxx.
Referenced by AliMpDetElement::AddManu(), AliMpDDLStore::AliMpDDLStore(), AliMUON1DMap::AliMUON1DMap(), AliMUON2DMap::AliMUON2DMap(), AliMUONRawWriter::Digits2Raw(), and AliMUON2DMap::Set().
|
friend |
Definition at line 30 of file AliMpExMap.h.
Referenced by CreateIterator().
|
staticprivate |
|
staticprivate |
Default initial size.
Definition at line 83 of file AliMpExMap.h.
|
staticprivate |
the separator used for conversion of Int_t pair to Int_t
Definition at line 86 of file AliMpExMap.h.
|
staticprivate |
the separator used for conversion of TString to Int_t
Definition at line 88 of file AliMpExMap.h.
Referenced by GetIndex(), and GetString().
|
private |
|
mutableprivate |
! Transient map class
Definition at line 92 of file AliMpExMap.h.
Referenced by Add(), Clear(), Copy(), FillMap(), GetValue(), and Print().
|
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().