AliRoot Core  edcc906 (edcc906)
AliMUONClusterStoreV2 Class Reference

Implementation of VClusterStore. More...

#include <AliMUONClusterStoreV2.h>

Inheritance diagram for AliMUONClusterStoreV2:

Public Member Functions

 AliMUONClusterStoreV2 ()
 
 AliMUONClusterStoreV2 (TRootIOCtor *dummy)
 
 AliMUONClusterStoreV2 (const AliMUONClusterStoreV2 &store)
 
AliMUONClusterStoreV2operator= (const AliMUONClusterStoreV2 &store)
 
virtual ~AliMUONClusterStoreV2 ()
 
virtual void Clear (Option_t *opt="")
 Clear container. More...
 
virtual Bool_t CanConnect () const
 Whether the Connect(TTree&) method is implemented. More...
 
virtual Bool_t Connect (TTree &tree, Bool_t alone=kTRUE) const
 Connect us to a TTree (only valid if CanConnect()==kTRUE) More...
 
virtual AliMUONClusterStoreV2Create () const
 Create an empty copy of this. More...
 
virtual AliMUONVClusterCreateCluster (Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const
 Create a cluster. More...
 
virtual AliMUONVClusterAdd (const AliMUONVCluster &Cluster)
 Add a cluster object to the store. More...
 
virtual AliMUONVClusterAdd (Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
 Create a new cluster with an unique ID and add it to the store. More...
 
virtual AliMUONVClusterRemove (AliMUONVCluster &cluster)
 Remove a cluster object to the store. More...
 
virtual Int_t GetSize () const
 Return the number of clusters we hold. More...
 
AliMUONVClusterFindObject (const TObject *object) const
 Find an object. More...
 
AliMUONVClusterFindObject (UInt_t uniqueID) const
 Find an object using a single id. More...
 
virtual TIterator * CreateIterator () const
 Return an iterator to loop over the whole store. More...
 
virtual TIterator * CreateChamberIterator (Int_t firstChamberId, Int_t lastChamberId) const
 Return an iterator to loop over the store in the given chamber range. More...
 
- Public Member Functions inherited from AliMUONVClusterStore
 AliMUONVClusterStore ()
 
virtual ~AliMUONVClusterStore ()
 
virtual Bool_t Add (TObject *object)
 Add an object to the store. More...
 
- Public Member Functions inherited from AliMUONVStore
 AliMUONVStore ()
 
virtual ~AliMUONVStore ()
 
virtual TObject * FindObject (const char *name) const
 Find an object by name. More...
 
virtual TObject * FindObject (Int_t i, Int_t j) const
 Find an object using 2 ids. More...
 
virtual Int_t GetSize (Int_t i) const
 The number of objects stored for firstid=i. Not implemented by default. More...
 
virtual Bool_t IsEmpty () const
 Whether we are empty or not. More...
 
virtual void Print (Option_t *wildcard="") const
 Print all objects whose name matches wildcard. More...
 
virtual void Print (Option_t *wildcard, Option_t *opt) const
 Print, with option, all objects whose name matches wildcard. More...
 

Private Member Functions

void ReMap ()
 
void UpdateMap (AliMUONVCluster &cluster)
 

Private Attributes

TClonesArray * fClusters
 collection of clusters More...
 
TClonesArray * fMap
 ! index map for fast cluster retrieval More...
 
Bool_t fMapped
 ! whether our internal indices are uptodate More...
 

Friends

class AliMUONClusterStoreV2Iterator
 

Additional Inherited Members

- Static Public Member Functions inherited from AliMUONVClusterStore
static AliMUONVClusterStoreCreate (TTree &tree)
 
- Static Public Member Functions inherited from AliMUONVStore
static AliMUONVStoreCreate (TTree &tree, const char *what)
 Create a store from a TTree. More...
 

Detailed Description

Implementation of VClusterStore.

Implementation of VClusterStore.

Note that clusters are identified by their UniqueID, so it MUST be correctly set

Author
Philippe Pillot, Subatech

Definition at line 22 of file AliMUONClusterStoreV2.h.

Constructor & Destructor Documentation

AliMUONClusterStoreV2::AliMUONClusterStoreV2 ( )

Constructor

Definition at line 58 of file AliMUONClusterStoreV2.cxx.

Referenced by Create().

AliMUONClusterStoreV2::AliMUONClusterStoreV2 ( TRootIOCtor *  dummy)

Dummy IO ctor that does not allocate memory

Definition at line 48 of file AliMUONClusterStoreV2.cxx.

AliMUONClusterStoreV2::AliMUONClusterStoreV2 ( const AliMUONClusterStoreV2 store)

Copy constructor

Definition at line 68 of file AliMUONClusterStoreV2.cxx.

AliMUONClusterStoreV2::~AliMUONClusterStoreV2 ( )
virtual

Destructor

Definition at line 93 of file AliMUONClusterStoreV2.cxx.

Member Function Documentation

AliMUONVCluster * AliMUONClusterStoreV2::Add ( const AliMUONVCluster Cluster)
virtual

Add a cluster object to the store.

Add a cluster to this store

Implements AliMUONVClusterStore.

Definition at line 147 of file AliMUONClusterStoreV2.cxx.

Referenced by Create().

AliMUONVCluster * AliMUONClusterStoreV2::Add ( Int_t  chamberId,
Int_t  detElemId,
Int_t  clusterIndex 
)
virtual

Create a new cluster with an unique ID and add it to the store.

Add an empty cluster with an unique ID to this store

Implements AliMUONVClusterStore.

Definition at line 182 of file AliMUONClusterStoreV2.cxx.

virtual Bool_t AliMUONClusterStoreV2::CanConnect ( ) const
inlinevirtual

Whether the Connect(TTree&) method is implemented.

Implements AliMUONVStore.

Definition at line 36 of file AliMUONClusterStoreV2.h.

void AliMUONClusterStoreV2::Clear ( Option_t *  opt = "")
virtual

Clear container.

Clear the internal cluster array AND the index

Implements AliMUONVClusterStore.

Definition at line 101 of file AliMUONClusterStoreV2.cxx.

Referenced by TestRecPoints().

Bool_t AliMUONClusterStoreV2::Connect ( TTree &  tree,
Bool_t  alone = kTRUE 
) const
virtual

Connect us to a TTree (only valid if CanConnect()==kTRUE)

Connect this to the tree, i.e. make the branches or set their addresses.

Connect to a Ttree

Reimplemented from AliMUONVStore.

Definition at line 119 of file AliMUONClusterStoreV2.cxx.

Referenced by CanConnect().

virtual AliMUONClusterStoreV2* AliMUONClusterStoreV2::Create ( ) const
inlinevirtual

Create an empty copy of this.

Implements AliMUONVStore.

Definition at line 40 of file AliMUONClusterStoreV2.h.

TIterator * AliMUONClusterStoreV2::CreateChamberIterator ( Int_t  firstChamberId,
Int_t  lastChamberId 
) const
virtual

Return an iterator to loop over the store in the given chamber range.

Return an iterator to loop over clusters in the chambers within the given range

Implements AliMUONVClusterStore.

Definition at line 293 of file AliMUONClusterStoreV2.cxx.

Referenced by GetSize().

AliMUONVCluster * AliMUONClusterStoreV2::CreateCluster ( Int_t  chamberId,
Int_t  detElemId,
Int_t  clusterIndex 
) const
virtual

Create a cluster.

Create a cluster

Implements AliMUONVClusterStore.

Definition at line 140 of file AliMUONClusterStoreV2.cxx.

Referenced by Create().

TIterator * AliMUONClusterStoreV2::CreateIterator ( ) const
virtual

Return an iterator to loop over the whole store.

Return an iterator to loop over all clusters

Implements AliMUONVClusterStore.

Definition at line 286 of file AliMUONClusterStoreV2.cxx.

Referenced by GetSize(), and TestRecPoints().

AliMUONVCluster * AliMUONClusterStoreV2::FindObject ( const TObject *  object) const
virtual

Find an object.

Find an object, if of AliMUONVCluster type.

Reimplemented from AliMUONVClusterStore.

Definition at line 268 of file AliMUONClusterStoreV2.cxx.

Referenced by Add(), and GetSize().

AliMUONVCluster * AliMUONClusterStoreV2::FindObject ( UInt_t  uniqueID) const
virtual

Find an object using a single id.

Find a cluster by its UniqueID

Generic find method. Should be overriden by derived class if it can be made more efficient there.

Reimplemented from AliMUONVClusterStore.

Definition at line 277 of file AliMUONClusterStoreV2.cxx.

virtual Int_t AliMUONClusterStoreV2::GetSize ( ) const
inlinevirtual

Return the number of clusters we hold.

Implements AliMUONVStore.

Definition at line 54 of file AliMUONClusterStoreV2.h.

AliMUONClusterStoreV2 & AliMUONClusterStoreV2::operator= ( const AliMUONClusterStoreV2 store)

Assignment operator

Definition at line 79 of file AliMUONClusterStoreV2.cxx.

void AliMUONClusterStoreV2::ReMap ( )
private

Recompute the fMap, which map (ch) to an index within the fClusters array

Definition at line 228 of file AliMUONClusterStoreV2.cxx.

Referenced by AliMUONClusterStoreV2(), GetSize(), operator=(), and UpdateMap().

AliMUONVCluster * AliMUONClusterStoreV2::Remove ( AliMUONVCluster cluster)
virtual

Remove a cluster object to the store.

Remove a cluster

Implements AliMUONVClusterStore.

Definition at line 209 of file AliMUONClusterStoreV2.cxx.

Referenced by Create().

void AliMUONClusterStoreV2::UpdateMap ( AliMUONVCluster cluster)
private

Update the internal index given this new cluster

Definition at line 260 of file AliMUONClusterStoreV2.cxx.

Referenced by Add(), GetSize(), and ReMap().

Friends And Related Function Documentation

friend class AliMUONClusterStoreV2Iterator
friend

Definition at line 24 of file AliMUONClusterStoreV2.h.

Referenced by CreateChamberIterator().

Member Data Documentation

TClonesArray* AliMUONClusterStoreV2::fClusters
private

collection of clusters

Definition at line 69 of file AliMUONClusterStoreV2.h.

Referenced by Add(), Clear(), Connect(), CreateIterator(), GetSize(), operator=(), ReMap(), Remove(), and ~AliMUONClusterStoreV2().

TClonesArray* AliMUONClusterStoreV2::fMap
private
Bool_t AliMUONClusterStoreV2::fMapped
private

! whether our internal indices are uptodate

Definition at line 71 of file AliMUONClusterStoreV2.h.

Referenced by AliMUONClusterStoreV2(), Clear(), CreateChamberIterator(), FindObject(), operator=(), ReMap(), Remove(), and UpdateMap().


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