![]() |
AliRoot Core
da88d91 (da88d91)
|
Base implementation of VDigitStore. More...
#include <AliMUONDigitStoreVImpl.h>
Public Member Functions | |
AliMUONDigitStoreVImpl (const char *concreteClassName) | |
AliMUONDigitStoreVImpl (const AliMUONDigitStoreVImpl &rhs) | |
AliMUONDigitStoreVImpl & | operator= (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 AliMUONVDigit * | CreateDigit (Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const =0 |
Create a digit. More... | |
virtual AliMUONVDigit * | Add (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 AliMUONVDigit * | FindObject (UInt_t uniqueID) const |
Find an object by its uniqueID. More... | |
virtual AliMUONVDigit * | FindObject (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 AliMUONVDigit * | Remove (AliMUONVDigit &digit) |
Remove an element. More... | |
![]() | |
AliMUONVDigitStore () | |
virtual | ~AliMUONVDigitStore () |
virtual Bool_t | Add (TObject *object) |
Add an object, if it is of the right class. More... | |
virtual AliMUONVDigitStore * | Create () const =0 |
Create an (empty) object of the same concrete class as *this. More... | |
virtual AliMUONVDigit * | Add (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 AliMUONVDigit * | FindObject (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... | |
![]() | |
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 AliMUONVDigit * | AddConcreteDigit (TClonesArray &a, const AliMUONVDigit &digit, Int_t index)=0 |
Add concrete digit. More... | |
Private Member Functions | |
AliMUONVDigit * | Find (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... | |
AliMUON2DMap * | fMap |
! 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 | |
![]() | |
enum | EReplacePolicy { kAllow, kDeny, kMerge, kIgnore } |
Replacement policy : what to do when adding a digit to the store. More... | |
![]() | |
static AliMUONVDigitStore * | Create (TTree &tree) |
static AliMUONVDigitStore * | Create (const char *classname) |
![]() | |
static AliMUONVStore * | Create (TTree &tree, const char *what) |
Create a store from a TTree. More... | |
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.
Definition at line 22 of file AliMUONDigitStoreVImpl.h.
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.
|
virtual |
dtor
Definition at line 113 of file AliMUONDigitStoreVImpl.cxx.
|
virtual |
Add a (s)digit. Digit is adopted.
digit | the digit to be added |
replace | specify 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().
|
protectedpure virtual |
Add concrete digit.
Implemented in AliMUONDigitStoreV2R, and AliMUONDigitStoreV2S.
Referenced by Add().
|
inlinevirtual |
Whether we can be connected to a TTree.
Implements AliMUONVStore.
Definition at line 33 of file AliMUONDigitStoreVImpl.h.
|
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().
|
private |
Clear our internal index
Definition at line 157 of file AliMUONDigitStoreVImpl.cxx.
|
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.
|
pure virtual |
Create a digit.
Implements AliMUONVDigitStore.
Implemented in AliMUONDigitStoreV2R, and AliMUONDigitStoreV2S.
|
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().
|
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.
|
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.
|
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.
|
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().
|
private |
Find the index of a given digit
Definition at line 331 of file AliMUONDigitStoreVImpl.cxx.
Referenced by FindObject().
|
private |
Find the index of a given (de,internalManu,ch) triplet
Definition at line 312 of file AliMUONDigitStoreVImpl.cxx.
|
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().
|
virtual |
Find a digit by the quadruplet (de,manu,channel,cathode)
Find a digit
Implements AliMUONVDigitStore.
Definition at line 353 of file AliMUONDigitStoreVImpl.cxx.
|
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.
|
private |
Recompute the fMap, which map (de,manu,ch) to an index within the fDigits array
Definition at line 267 of file AliMUONDigitStoreVImpl.cxx.
|
virtual |
Remove an element.
Remove a digit
Implements AliMUONVDigitStore.
Definition at line 380 of file AliMUONDigitStoreVImpl.cxx.
|
private |
Update the internal index given this new digit
Definition at line 290 of file AliMUONDigitStoreVImpl.cxx.
|
friend |
Definition at line 24 of file AliMUONDigitStoreVImpl.h.
Referenced by CreateIterator(), CreateTrackerIterator(), and CreateTriggerIterator().
|
private |
collection of digits
Definition at line 88 of file AliMUONDigitStoreVImpl.h.
Referenced by Add(), Clear(), Connect(), CreateIterator(), FindObject(), GetSize(), AliMUONDigitStoreVImplIterator::Next(), ReIndex(), Remove(), and ~AliMUONDigitStoreVImpl().
|
private |
! whether our internal indices fDEs and fManus are uptodate
Definition at line 90 of file AliMUONDigitStoreVImpl.h.
Referenced by ClearIndex(), ReIndex(), and UpdateIndex().
|
private |
! index map for fast digit retrieval
Definition at line 89 of file AliMUONDigitStoreVImpl.h.
Referenced by ClearIndex(), FindIndex(), UpdateIndex(), and ~AliMUONDigitStoreVImpl().