AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONDigitStoreVImpl Class Referenceabstract

Base implementation of VDigitStore. More...

#include <AliMUONDigitStoreVImpl.h>

Inheritance diagram for AliMUONDigitStoreVImpl:

Public Member Functions

 AliMUONDigitStoreVImpl (const char *concreteClassName)
 
 AliMUONDigitStoreVImpl (const AliMUONDigitStoreVImpl &rhs)
 
AliMUONDigitStoreVImploperator= (const AliMUONDigitStoreVImpl &rhs)
 
virtual ~AliMUONDigitStoreVImpl ()
 
virtual Bool_t CanConnect () const
 Whether we can be connected to a TTree. More...
 
virtual Bool_t Connect (TTree &tree, Bool_t alone=kTRUE) const
 Connect us to a TTree (only valid if CanConnect()==kTRUE) More...
 
virtual void Clear (Option_t *opt="")
 Clear ourselves (i.e. Reset) More...
 
virtual AliMUONVDigitCreateDigit (Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const =0
 Create a digit. More...
 
virtual AliMUONVDigitAdd (const AliMUONVDigit &digit, EReplacePolicy replace)
 
virtual TIterator * CreateIterator () const
 Create an iterator to loop over all our digits. More...
 
virtual TIterator * CreateIterator (Int_t firstDetElemId, Int_t lastDetElemId, Int_t cathode=2) const
 
virtual TIterator * CreateTrackerIterator () const
 Create an iterator to loop over tracker digits only. More...
 
virtual TIterator * CreateTriggerIterator () const
 Create an iterator to loop over trigger digits only. More...
 
virtual AliMUONVDigitFindObject (UInt_t uniqueID) const
 Find an object by its uniqueID. More...
 
virtual AliMUONVDigitFindObject (Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const
 Find a digit by the quadruplet (de,manu,channel,cathode) More...
 
virtual Int_t GetSize () const
 Number of digits we store. More...
 
virtual AliMUONVDigitRemove (AliMUONVDigit &digit)
 Remove an element. More...
 
- Public Member Functions inherited from AliMUONVDigitStore
 AliMUONVDigitStore ()
 
virtual ~AliMUONVDigitStore ()
 
virtual Bool_t Add (TObject *object)
 Add an object, if it is of the right class. More...
 
virtual AliMUONVDigitStoreCreate () const =0
 Create an (empty) object of the same concrete class as *this. More...
 
virtual AliMUONVDigitAdd (Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode, EReplacePolicy replace)
 Add a digit and return the newly created digit. More...
 
virtual AliMUONVDigitFindObject (const TObject *object) const
 Find an object (default is to forward to FindObject(object->GetUniqueID()) More...
 
virtual Int_t GetSize (Int_t detElemId) const
 Number of digits in a given detection element. More...
 
virtual Int_t GetSize (Int_t detElemId, Int_t cathode) const
 Number of digits in a given detection element and a given cathode (2 for both cathodes) More...
 
virtual Bool_t HasMCInformation () const =0
 Whether we have any MC related information (e.g. at least one simulated digit) 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 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...
 

Protected Member Functions

virtual AliMUONVDigitAddConcreteDigit (TClonesArray &a, const AliMUONVDigit &digit, Int_t index)=0
 Add concrete digit. More...
 

Private Member Functions

AliMUONVDigitFind (const AliMUONVDigit &digit) const
 
void UpdateIndex (const AliMUONVDigit &digit, Int_t index)
 
Int_t FindIndex (const AliMUONVDigit &digit) const
 
Int_t FindIndex (Int_t detElemId, Int_t internalManuId, Int_t manuChannel) const
 
void ReIndex ()
 
void ClearIndex ()
 

Private Attributes

TClonesArray * fDigits
 collection of digits More...
 
AliMUON2DMapfMap
 ! index map for fast digit retrieval More...
 
Bool_t fIndexed
 ! whether our internal indices fDEs and fManus are uptodate More...
 

Friends

class AliMUONDigitStoreVImplIterator
 

Additional Inherited Members

- Public Types inherited from AliMUONVDigitStore
enum  EReplacePolicy { kAllow, kDeny, kMerge, kIgnore }
 Replacement policy : what to do when adding a digit to the store. More...
 
- Static Public Member Functions inherited from AliMUONVDigitStore
static AliMUONVDigitStoreCreate (TTree &tree)
 
static AliMUONVDigitStoreCreate (const char *classname)
 
- Static Public Member Functions inherited from AliMUONVStore
static AliMUONVStoreCreate (TTree &tree, const char *what)
 Create a store from a TTree. More...
 

Detailed Description

Base implementation of VDigitStore.

Base implementation of VDigitStore, where digits are simply put within a single TClonesArray (to get compact output on disk) and fast search is achieved by using a separate index (a 2Dmap)

Note that this class is a base implementation only, because to add a digit to a TClonesArray, you need to give the concrete class name (made in subclass by overriding :

AliMUONVDigit* AddConcreteDigit(TClonesArray&,const AliMUONVDigit&, Int_t)

and

AliMUONVDigit* CreateDigit((Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const

methods.

Author
Laurent Aphecetche

Definition at line 22 of file AliMUONDigitStoreVImpl.h.

Constructor & Destructor Documentation

AliMUONDigitStoreVImpl::AliMUONDigitStoreVImpl ( const char *  concreteClassName)

ctor

Definition at line 82 of file AliMUONDigitStoreVImpl.cxx.

AliMUONDigitStoreVImpl::AliMUONDigitStoreVImpl ( const AliMUONDigitStoreVImpl rhs)

copy ctor

Definition at line 92 of file AliMUONDigitStoreVImpl.cxx.

AliMUONDigitStoreVImpl::~AliMUONDigitStoreVImpl ( )
virtual

dtor

Definition at line 113 of file AliMUONDigitStoreVImpl.cxx.

Member Function Documentation

AliMUONVDigit * AliMUONDigitStoreVImpl::Add ( const AliMUONVDigit digit,
EReplacePolicy  replace 
)
virtual

Add a (s)digit. Digit is adopted.

Parameters
digitthe digit to be added
replacespecify what to do if the digit is already there. kAllow means replacement is allowed, kDeny means it is forbidden (in which case we return 0x0), and kMerge means both digits will be merged). Finally, kIgnore means no check is done at all. This is the most rapid option, but also the more dangerous ;-)

Try to add a digit to the store. Return whether the try was successfull or not.

If the digit is already there, the action taken depends on "replace" kAllow -> replacement will occur (i.e. return kTRUE) kDeny -> replacement will not occur (and returned value is kFALSE) kMerge -> both digits will be merged into one (return kTRUE)

Implements AliMUONVDigitStore.

Definition at line 173 of file AliMUONDigitStoreVImpl.cxx.

Referenced by AliMUONTriggerGUI::CreateDigitStore(), AliMUONRecoCheck::MakeTriggerableTracks(), and TestRecPoints().

virtual AliMUONVDigit* AliMUONDigitStoreVImpl::AddConcreteDigit ( TClonesArray &  a,
const AliMUONVDigit digit,
Int_t  index 
)
protectedpure virtual

Add concrete digit.

Implemented in AliMUONDigitStoreV2R, and AliMUONDigitStoreV2S.

Referenced by Add().

virtual Bool_t AliMUONDigitStoreVImpl::CanConnect ( ) const
inlinevirtual

Whether we can be connected to a TTree.

Implements AliMUONVStore.

Definition at line 33 of file AliMUONDigitStoreVImpl.h.

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

Clear ourselves (i.e. Reset)

Clear the internal digit array AND the index

Implements AliMUONVStore.

Definition at line 148 of file AliMUONDigitStoreVImpl.cxx.

Referenced by AliMUONTriggerGUI::ClearDigitStore(), AliMUONTriggerUtilities::Init(), and TestRecPoints().

void AliMUONDigitStoreVImpl::ClearIndex ( )
private

Clear our internal index

Definition at line 157 of file AliMUONDigitStoreVImpl.cxx.

Referenced by Clear(), and ReIndex().

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

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

Connect this to the tree.

Connect to a Ttree

Reimplemented from AliMUONVStore.

Definition at line 122 of file AliMUONDigitStoreVImpl.cxx.

virtual AliMUONVDigit* AliMUONDigitStoreVImpl::CreateDigit ( Int_t  detElemId,
Int_t  manuId,
Int_t  manuChannel,
Int_t  cathode 
) const
pure virtual

Create a digit.

Implements AliMUONVDigitStore.

Implemented in AliMUONDigitStoreV2R, and AliMUONDigitStoreV2S.

TIterator * AliMUONDigitStoreVImpl::CreateIterator ( ) const
virtual

Create an iterator to loop over all our digits.

Create an iterator over the full store

Implements AliMUONVDigitStore.

Definition at line 213 of file AliMUONDigitStoreVImpl.cxx.

Referenced by AliMUONTriggerUtilities::Init(), AliMUONTriggerGUI::PrintDigitStore(), and TestRecPoints().

TIterator * AliMUONDigitStoreVImpl::CreateIterator ( Int_t  firstDetElemId,
Int_t  lastDetElemId,
Int_t  cathode = 2 
) const
virtual

Create an iterator to loop over all digits of a group of detection elements, and a given cathode (if cathode != -1)

Create an iterator on a given part of the store

Implements AliMUONVDigitStore.

Definition at line 221 of file AliMUONDigitStoreVImpl.cxx.

TIterator * AliMUONDigitStoreVImpl::CreateTrackerIterator ( ) const
virtual

Create an iterator to loop over tracker digits only.

Create an iterator to loop over tracker digits only

Implements AliMUONVDigitStore.

Definition at line 233 of file AliMUONDigitStoreVImpl.cxx.

TIterator * AliMUONDigitStoreVImpl::CreateTriggerIterator ( ) const
virtual

Create an iterator to loop over trigger digits only.

Create an iterator to loop over trigger digits only

Implements AliMUONVDigitStore.

Definition at line 244 of file AliMUONDigitStoreVImpl.cxx.

AliMUONVDigit * AliMUONDigitStoreVImpl::Find ( const AliMUONVDigit digit) const
private

Find a given digit Note that we only check for the id of the digit (i.e. de,manu,...) not for the actual content (charge, ...) to decide whether it's the same digit or not

Definition at line 254 of file AliMUONDigitStoreVImpl.cxx.

Referenced by Add().

Int_t AliMUONDigitStoreVImpl::FindIndex ( const AliMUONVDigit digit) const
private

Find the index of a given digit

Definition at line 331 of file AliMUONDigitStoreVImpl.cxx.

Referenced by FindObject().

Int_t AliMUONDigitStoreVImpl::FindIndex ( Int_t  detElemId,
Int_t  internalManuId,
Int_t  manuChannel 
) const
private

Find the index of a given (de,internalManu,ch) triplet

Definition at line 312 of file AliMUONDigitStoreVImpl.cxx.

AliMUONVDigit * AliMUONDigitStoreVImpl::FindObject ( UInt_t  uniqueID) const
virtual

Find an object by its uniqueID.

Find digit by its uniqueID

Find digit by its uniqueID

Reimplemented from AliMUONVDigitStore.

Definition at line 341 of file AliMUONDigitStoreVImpl.cxx.

Referenced by Find(), and AliMUONTriggerUtilities::Init().

AliMUONVDigit * AliMUONDigitStoreVImpl::FindObject ( Int_t  detElemId,
Int_t  manuId,
Int_t  manuChannel,
Int_t  cathode 
) const
virtual

Find a digit by the quadruplet (de,manu,channel,cathode)

Find a digit

Implements AliMUONVDigitStore.

Definition at line 353 of file AliMUONDigitStoreVImpl.cxx.

Int_t AliMUONDigitStoreVImpl::GetSize ( ) const
virtual

Number of digits we store.

Return the number of digits we hold

Implements AliMUONVDigitStore.

Definition at line 372 of file AliMUONDigitStoreVImpl.cxx.

Referenced by AliMUONTriggerGUI::CreateTriggerStore().

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

assignement operator

Definition at line 104 of file AliMUONDigitStoreVImpl.cxx.

void AliMUONDigitStoreVImpl::ReIndex ( )
private

Recompute the fMap, which map (de,manu,ch) to an index within the fDigits array

Definition at line 267 of file AliMUONDigitStoreVImpl.cxx.

AliMUONVDigit * AliMUONDigitStoreVImpl::Remove ( AliMUONVDigit digit)
virtual

Remove an element.

Remove a digit

Implements AliMUONVDigitStore.

Definition at line 380 of file AliMUONDigitStoreVImpl.cxx.

void AliMUONDigitStoreVImpl::UpdateIndex ( const AliMUONVDigit digit,
Int_t  index 
)
private

Update the internal index given this new digit

Definition at line 290 of file AliMUONDigitStoreVImpl.cxx.

Referenced by Add(), ReIndex(), and Remove().

Friends And Related Function Documentation

Member Data Documentation

TClonesArray* AliMUONDigitStoreVImpl::fDigits
private
Bool_t AliMUONDigitStoreVImpl::fIndexed
private

! whether our internal indices fDEs and fManus are uptodate

Definition at line 90 of file AliMUONDigitStoreVImpl.h.

Referenced by ClearIndex(), ReIndex(), and UpdateIndex().

AliMUON2DMap* AliMUONDigitStoreVImpl::fMap
private

! index map for fast digit retrieval

Definition at line 89 of file AliMUONDigitStoreVImpl.h.

Referenced by ClearIndex(), FindIndex(), UpdateIndex(), and ~AliMUONDigitStoreVImpl().


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