![]() |
AliRoot Core
d69033e (d69033e)
|
An easy to use interface to MUON data. More...
#include <AliMUONDataInterface.h>
Public Member Functions | |
AliMUONDataInterface (const char *filename="galice.root") | |
virtual | ~AliMUONDataInterface () |
Bool_t | IsValid () const |
Returns true if the data interface was able to open the root file correctly. More... | |
void | Open (const char *filename) |
Int_t | NumberOfEvents () const |
Int_t | CurrentEvent () const |
AliMUONVDigitStore * | DigitStore (Int_t event) |
AliMUONVClusterStore * | ClusterStore (Int_t event) |
AliMUONVTriggerStore * | TriggerStore (Int_t event, const char *treeLetter="R") |
void | DumpClusters (Int_t event, Bool_t sorted=kTRUE) |
Dump the clusters for a given event, sorted if so required. More... | |
void | DumpRecPoints (Int_t event, Bool_t sorted=kTRUE) |
void | DumpDigits (Int_t event, Bool_t sorted=kTRUE) |
void | DumpTrigger (Int_t event, const char *treeLetter="R") |
Bool_t | GetEvent (Int_t event=0) |
Int_t | NumberOfDigits (Int_t detElemId) |
AliMUONVDigit * | Digit (Int_t detElemId, Int_t index) |
Int_t | NumberOfDigits (Int_t chamber, Int_t cathode) |
AliMUONVDigit * | Digit (Int_t chamber, Int_t cathode, Int_t index) |
Int_t | NumberOfRawClusters (Int_t chamber) |
AliMUONVCluster * | RawCluster (Int_t chamber, Int_t index) |
Int_t | NumberOfLocalTriggers () |
AliMUONLocalTrigger * | LocalTrigger (Int_t index) |
Int_t | NumberOfRegionalTriggers () |
AliMUONRegionalTrigger * | RegionalTrigger (Int_t index) |
AliMUONGlobalTrigger * | GlobalTrigger () |
Private Types | |
enum | IteratorType { kNoIterator, kDigitIteratorByDetectorElement, kDigitIteratorByChamberAndCathode, kRawClusterIterator, kLocalTriggerIterator, kRegionalTriggerIterator } |
The various identifiers for the type of iterator constructed. More... | |
Private Member Functions | |
void | DumpSorted (const AliMUONVStore &store) const |
Bool_t | LoadEvent (Int_t event) |
void | NtupleTrigger (const char *treeLetter) |
void | ResetStores () |
TIterator * | GetIterator (IteratorType type, Int_t x=0, Int_t y=0) |
void | ResetIterator () |
Int_t | CountObjects (TIterator *iter) |
TObject * | FetchObject (TIterator *iter, Int_t index) |
AliMUONDataInterface (const AliMUONDataInterface &rhs) | |
Not implemented. More... | |
AliMUONDataInterface & | operator= (const AliMUONDataInterface &rhs) |
Not implemented. More... | |
Private Attributes | |
AliLoader * | fLoader |
! Tree accessor More... | |
AliMUONVDigitStore * | fDigitStore |
! current digit store (owner) More... | |
AliMUONVTriggerStore * | fTriggerStore |
! current trigger store (owner) More... | |
AliMUONVClusterStore * | fClusterStore |
! current cluster store (owner) More... | |
Int_t | fCurrentEvent |
! Current event we've read in More... | |
TString | fTreeLetter |
! The tree letter used in the last call to TriggerStore(). More... | |
Bool_t | fIsValid |
! whether we were initialized properly or not More... | |
IteratorType | fCurrentIteratorType |
! The type of iterator that is currently set. More... | |
Int_t | fCurrentIndex |
! A current index number maintained for certain iteration operations. More... | |
Int_t | fDataX |
! Extra data parameter about the iterator, can be the chamber number or detector element. More... | |
Int_t | fDataY |
! Extra data parameter about the iterator, can be the cathode number. More... | |
TIterator * | fIterator |
! Iterator for various iteration operations. More... | |
Static Private Attributes | |
static Int_t | fgInstanceCounter |
! To build unique folder name for each instance More... | |
An easy to use interface to MUON data.
An easy to use interface to the MUON data data stored in TreeS, TreeD and TreeR.
For MC related information (i.e. TreeH, TreeK, TreeTR), see AliMUONMCDataInterface.
This interface in not necessarily the fastest way to fetch the data but it is the easiest.
Definition at line 35 of file AliMUONDataInterface.h.
|
private |
The various identifiers for the type of iterator constructed.
Definition at line 86 of file AliMUONDataInterface.h.
AliMUONDataInterface::AliMUONDataInterface | ( | const char * | filename = "galice.root" | ) |
ctor
filename | should be the full path to a valid galice.root file |
Definition at line 75 of file AliMUONDataInterface.cxx.
|
virtual |
dtor
Definition at line 109 of file AliMUONDataInterface.cxx.
|
private |
Not implemented.
AliMUONVClusterStore * AliMUONDataInterface::ClusterStore | ( | Int_t | event | ) |
Return clusterStore for a given event. Return 0x0 if event not found. Returned pointer should not be deleted
Definition at line 167 of file AliMUONDataInterface.cxx.
Referenced by DumpRecPoints(), GetEvent(), GetIterator(), and RawClustersOk().
|
private |
Counts the number of objects in the iterator and resets it.
Definition at line 868 of file AliMUONDataInterface.cxx.
Referenced by NumberOfDigits(), NumberOfLocalTriggers(), NumberOfRawClusters(), and NumberOfRegionalTriggers().
|
inline |
Returns the index number of the current event loaded. This is the event number as was used in the last calls to DigitStore(Int_t), ClusterStore(Int_t), TriggerStore(Int_t) or GetEvent(Int_t).
Definition at line 52 of file AliMUONDataInterface.h.
AliMUONVDigit * AliMUONDataInterface::Digit | ( | Int_t | detElemId, |
Int_t | index | ||
) |
Returns the a pointer to the index'th digit on the specified detector element.
detElemId | The detector element ID number to search on. |
index | The index number of the digit to fetch in the range [0 .. N-1], where N = NumberOfDigits(detElemId) |
Definition at line 613 of file AliMUONDataInterface.cxx.
Referenced by RecDigitsOk().
AliMUONVDigit * AliMUONDataInterface::Digit | ( | Int_t | chamber, |
Int_t | cathode, | ||
Int_t | index | ||
) |
Returns the a pointer to the index'th digit on the specified chamber and cathode.
chamber | The chamber number in the range [0 .. 13]. |
cathode | The cathode in the range [0 .. 1], where 0 is the bending and 1 is the non-bending plane. |
index | The index number of the digit to fetch in the range [0 .. N-1], where N = NumberOfDigits(chamber, cathode) |
Definition at line 637 of file AliMUONDataInterface.cxx.
AliMUONVDigitStore * AliMUONDataInterface::DigitStore | ( | Int_t | event | ) |
Return digitStore for a given event. Return 0x0 if event not found. Returned pointer should not be deleted
Definition at line 118 of file AliMUONDataInterface.cxx.
Referenced by AliMUONCheck::CheckOccupancy(), DumpDigits(), GetEvent(), GetIterator(), and RecDigitsOk().
|
inline |
Dump the clusters for a given event, sorted if so required.
Definition at line 59 of file AliMUONDataInterface.h.
void AliMUONDataInterface::DumpDigits | ( | Int_t | event, |
Bool_t | sorted = kTRUE |
||
) |
Dump the digits for a given event, sorted if so required
Definition at line 301 of file AliMUONDataInterface.cxx.
void AliMUONDataInterface::DumpRecPoints | ( | Int_t | event, |
Bool_t | sorted = kTRUE |
||
) |
Dump the recpoints for a given event, sorted if so required
Definition at line 320 of file AliMUONDataInterface.cxx.
Referenced by DumpClusters().
|
private |
Dump the given store, in sorted order
Definition at line 339 of file AliMUONDataInterface.cxx.
Referenced by DumpDigits(), and DumpRecPoints().
void AliMUONDataInterface::DumpTrigger | ( | Int_t | event, |
const char * | treeLetter = "R" |
||
) |
Dump trigger for a given event from a given tree (if event>=0) or loop over all events and build a trigger ntuple if event<0 treeLetter can be R or D to tell from which tree to read the information
Definition at line 360 of file AliMUONDataInterface.cxx.
|
private |
Fetches the index'th object from the iterator counting the first object returned by iterator after it is reset as index == 0. The next object has index == 1 and so on where the last object returned by the iterator has index == N-1 where N = CountObjects(iter) This method will only reset the iterator if index is smaller than fCurrentIndex, which is used to track the iteration progress and is updated when a new object if returned by this method.
iter | The iterator to fetch an object from. |
index | The index number of the object to fetch in the range [0 .. N-1] where N = CountObjects(iter) |
Definition at line 883 of file AliMUONDataInterface.cxx.
Referenced by Digit(), LocalTrigger(), RawCluster(), and RegionalTrigger().
Bool_t AliMUONDataInterface::GetEvent | ( | Int_t | event = 0 | ) |
Loads all reconstructed data for the given event.
Definition at line 592 of file AliMUONDataInterface.cxx.
Referenced by RawClustersOk(), RecDigitsOk(), and TriggersOk().
|
private |
Creates an appropriate iterator object and returns it. If the iterator has already been created then that one is returned otherwise a new object is created. Depending on the value of 'type' the semantics of parameters x and y can change.
type | The type of iterator to create. |
x | This is the detector element ID if type == kDigitIteratorByDetectorElement If type equals kDigitIteratorByChamberAndCathode or kRawClusterIterator then this is the chamber number. In all other cases this parameter is ignored. |
y | If type == kDigitIteratorByChamberAndCathode then this parameter is the cathode number. In all other cases this parameter is ignored. |
Definition at line 747 of file AliMUONDataInterface.cxx.
Referenced by Digit(), LocalTrigger(), NumberOfDigits(), NumberOfLocalTriggers(), NumberOfRawClusters(), NumberOfRegionalTriggers(), RawCluster(), and RegionalTrigger().
AliMUONGlobalTrigger * AliMUONDataInterface::GlobalTrigger | ( | ) |
Returns a pointer to the reconstructed global trigger object for the event.
Definition at line 713 of file AliMUONDataInterface.cxx.
Referenced by TriggersOk().
|
inline |
Returns true if the data interface was able to open the root file correctly.
Definition at line 43 of file AliMUONDataInterface.h.
Referenced by ClusterStore(), DigitStore(), LoadEvent(), MUONTriggerEfficiency(), MUONTriggerEfficiencyPt(), NumberOfEvents(), Open(), and TriggerStore().
|
private |
Load event if different from the current one. Returns kFALSE on error and kTRUE if the event was loaded.
Definition at line 507 of file AliMUONDataInterface.cxx.
Referenced by ClusterStore(), DigitStore(), and TriggerStore().
AliMUONLocalTrigger * AliMUONDataInterface::LocalTrigger | ( | Int_t | index | ) |
Returns a pointer to the index'th local trigger object.
index | The index number of the local trigger object to fetch in the range [0 .. N-1], where N = NumberOfLocalTriggers() |
Definition at line 682 of file AliMUONDataInterface.cxx.
Referenced by TriggersOk().
|
private |
Loop over events to build trigger ntuples
Definition at line 383 of file AliMUONDataInterface.cxx.
Referenced by DumpTrigger().
Int_t AliMUONDataInterface::NumberOfDigits | ( | Int_t | detElemId | ) |
Returns the number of digits to be found on a given detector element.
detElemId | The detector element ID number to search on. |
Definition at line 603 of file AliMUONDataInterface.cxx.
Referenced by RecDigitsOk().
Int_t AliMUONDataInterface::NumberOfDigits | ( | Int_t | chamber, |
Int_t | cathode | ||
) |
Returns the number of digits to be found on a specific chamber and cathode.
chamber | The chamber number in the range [0 .. 13]. |
cathode | The cathode in the range [0 .. 1], where 0 is the bending and 1 is the non-bending plane. |
Definition at line 625 of file AliMUONDataInterface.cxx.
Int_t AliMUONDataInterface::NumberOfEvents | ( | ) | const |
Number of events in the current galice.root file we're attached to
Definition at line 526 of file AliMUONDataInterface.cxx.
Referenced by MUONReCalcGlobalTrigger(), NtupleTrigger(), RawClustersOk(), RecDigitsOk(), and TriggersOk().
Int_t AliMUONDataInterface::NumberOfLocalTriggers | ( | ) |
Returns the number of reconstructed local trigger objects.
Definition at line 673 of file AliMUONDataInterface.cxx.
Referenced by TriggersOk().
Int_t AliMUONDataInterface::NumberOfRawClusters | ( | Int_t | chamber | ) |
Returns the number of reconstructed raw clusters on the specified chamber.
chamber | The chamber number in the range [0 .. 13]. |
Definition at line 651 of file AliMUONDataInterface.cxx.
Referenced by RawClustersOk().
Int_t AliMUONDataInterface::NumberOfRegionalTriggers | ( | ) |
Returns the number of regional trigger objects reconstructed.
Definition at line 693 of file AliMUONDataInterface.cxx.
Referenced by TriggersOk().
void AliMUONDataInterface::Open | ( | const char * | filename | ) |
Connect to a given galice.root file
Definition at line 535 of file AliMUONDataInterface.cxx.
|
private |
Not implemented.
AliMUONVCluster * AliMUONDataInterface::RawCluster | ( | Int_t | chamber, |
Int_t | index | ||
) |
Returns a pointer to the index'th raw cluster on the specified chamber.
chamber | The chamber number in the range [0 .. 13]. |
index | The index number of the raw cluster to fetch in the range [0 .. N-1], where N = NumberOfRawClusters(chamber) |
Definition at line 661 of file AliMUONDataInterface.cxx.
Referenced by RawClustersOk().
AliMUONRegionalTrigger * AliMUONDataInterface::RegionalTrigger | ( | Int_t | index | ) |
Returns a pointer to the index'th regional trigger object.
index | The index number of the regional trigger object to fetch in the range [0 .. N-1], where N = NumberOfRegionalTriggers() |
Definition at line 702 of file AliMUONDataInterface.cxx.
Referenced by TriggersOk().
|
private |
The temporary iterator object is deleted if it exists and the pointer reset to 0x0. The iterator type and temporary data indicating the state of the iterator are also reset.
Definition at line 855 of file AliMUONDataInterface.cxx.
Referenced by GetIterator(), and ResetStores().
|
private |
Deletes all the store objects that have been created and resets the pointers to 0x0. The temporary iterator object is automatically reset. See ResetIterator for more details.
Definition at line 723 of file AliMUONDataInterface.cxx.
Referenced by ClusterStore(), DigitStore(), Open(), TriggerStore(), and ~AliMUONDataInterface().
AliMUONVTriggerStore * AliMUONDataInterface::TriggerStore | ( | Int_t | event, |
const char * | treeLetter = "R" |
||
) |
Return the triggerStore for a given event. Return 0x0 if event not found. Returned pointer should not be deleted treeLetter can be R or D to tell from which tree to read the information
Definition at line 216 of file AliMUONDataInterface.cxx.
Referenced by DumpTrigger(), GetEvent(), GetIterator(), GlobalTrigger(), MUONReCalcGlobalTrigger(), MUONTriggerEfficiency(), MUONTriggerEfficiencyPt(), NtupleTrigger(), and TriggersOk().
|
private |
! current cluster store (owner)
Definition at line 119 of file AliMUONDataInterface.h.
Referenced by ClusterStore(), DumpRecPoints(), and ResetStores().
|
private |
! Current event we've read in
Definition at line 120 of file AliMUONDataInterface.h.
Referenced by ClusterStore(), CurrentEvent(), DigitStore(), GetIterator(), GlobalTrigger(), LoadEvent(), Open(), and TriggerStore().
|
private |
! A current index number maintained for certain iteration operations.
Definition at line 125 of file AliMUONDataInterface.h.
Referenced by CountObjects(), FetchObject(), and ResetIterator().
|
private |
! The type of iterator that is currently set.
Definition at line 124 of file AliMUONDataInterface.h.
Referenced by GetIterator(), and ResetIterator().
|
private |
! Extra data parameter about the iterator, can be the chamber number or detector element.
Definition at line 126 of file AliMUONDataInterface.h.
Referenced by GetIterator(), and ResetIterator().
|
private |
! Extra data parameter about the iterator, can be the cathode number.
Definition at line 127 of file AliMUONDataInterface.h.
Referenced by GetIterator(), and ResetIterator().
|
private |
! current digit store (owner)
Definition at line 117 of file AliMUONDataInterface.h.
Referenced by DigitStore(), DumpDigits(), and ResetStores().
|
staticprivate |
! To build unique folder name for each instance
Definition at line 130 of file AliMUONDataInterface.h.
Referenced by Open(), and ~AliMUONDataInterface().
|
private |
! whether we were initialized properly or not
Definition at line 122 of file AliMUONDataInterface.h.
|
private |
! Iterator for various iteration operations.
Definition at line 128 of file AliMUONDataInterface.h.
Referenced by GetIterator(), and ResetIterator().
|
private |
! Tree accessor
Definition at line 116 of file AliMUONDataInterface.h.
Referenced by ClusterStore(), DigitStore(), LoadEvent(), NtupleTrigger(), NumberOfEvents(), Open(), and TriggerStore().
|
private |
! The tree letter used in the last call to TriggerStore().
Definition at line 121 of file AliMUONDataInterface.h.
Referenced by TriggerStore().
|
private |
! current trigger store (owner)
Definition at line 118 of file AliMUONDataInterface.h.
Referenced by DumpTrigger(), ResetStores(), and TriggerStore().