ROOT logo
AliRoot » MUON » AliMUONDataInterface

class AliMUONDataInterface: public TObject

 \class AliMUONDataInterface

 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.

 \author Laurent Aphecetche, Subatech & Artur Szostak <artursz@iafrica.com> (University of Cape Town)

Function Members (Methods)

public:
AliMUONDataInterface(const char* filename = "galice.root")
virtual~AliMUONDataInterface()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
AliMUONVClusterStore*ClusterStore(Int_t event)
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Int_tCurrentEvent() const
virtual voidTObject::Delete(Option_t* option = "")MENU
AliMUONVDigit*Digit(Int_t detElemId, Int_t index)
AliMUONVDigit*Digit(Int_t chamber, Int_t cathode, Int_t index)
AliMUONVDigitStore*DigitStore(Int_t event)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidDumpClusters(Int_t event, Bool_t sorted = kTRUE)
voidDumpDigits(Int_t event, Bool_t sorted = kTRUE)
voidDumpRecPoints(Int_t event, Bool_t sorted = kTRUE)
voidDumpTrigger(Int_t event, const char* treeLetter = "R")
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tGetEvent(Int_t event = 0)
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
AliMUONGlobalTrigger*GlobalTrigger()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
AliMUONLocalTrigger*LocalTrigger(Int_t index)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
Int_tNumberOfDigits(Int_t detElemId)
Int_tNumberOfDigits(Int_t chamber, Int_t cathode)
Int_tNumberOfEvents() const
Int_tNumberOfLocalTriggers()
Int_tNumberOfRawClusters(Int_t chamber)
Int_tNumberOfRegionalTriggers()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidOpen(const char* filename)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
AliMUONVCluster*RawCluster(Int_t chamber, Int_t index)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
AliMUONRegionalTrigger*RegionalTrigger(Int_t index)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
AliMUONVTriggerStore*TriggerStore(Int_t event, const char* treeLetter = "R")
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
AliMUONDataInterface(const AliMUONDataInterface& rhs)
Int_tCountObjects(TIterator* iter)
voidDumpSorted(const AliMUONVStore& store) const
TObject*FetchObject(TIterator* iter, Int_t index)
TIterator*GetIterator(AliMUONDataInterface::IteratorType type, Int_t x = 0, Int_t y = 0)
Bool_tLoadEvent(Int_t event)
voidNtupleTrigger(const char* treeLetter)
AliMUONDataInterface&operator=(const AliMUONDataInterface& rhs)
voidResetIterator()
voidResetStores()

Data Members

public:
enum IteratorType { kNoIterator
kDigitIteratorByDetectorElement
kDigitIteratorByChamberAndCathode
kRawClusterIterator
kLocalTriggerIterator
kRegionalTriggerIterator
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
AliMUONVClusterStore*fClusterStore!< current cluster store (owner)
Int_tfCurrentEvent!< Current event we've read in
Int_tfCurrentIndex!< A current index number maintained for certain iteration operations.
AliMUONDataInterface::IteratorTypefCurrentIteratorType!< The type of iterator that is currently set.
Int_tfDataX!< Extra data parameter about the iterator, can be the chamber number or detector element.
Int_tfDataY!< Extra data parameter about the iterator, can be the cathode number.
AliMUONVDigitStore*fDigitStore!< current digit store (owner)
Bool_tfIsValid!< whether we were initialized properly or not
TIterator*fIterator!< Iterator for various iteration operations.
AliLoader*fLoader!< Tree accessor
TStringfTreeLetter!< The tree letter used in the last call to TriggerStore().
AliMUONVTriggerStore*fTriggerStore!< current trigger store (owner)
static Int_tfgInstanceCounter!< To build unique folder name for each instance

Class Charts

Inheritance Chart:
TObject
AliMUONDataInterface

Function documentation

AliMUONDataInterface(const char* filename = "galice.root")
 ctor
 @param filename should be the full path to a valid galice.root file
~AliMUONDataInterface()
 dtor
DigitStore(Int_t event)
 Return digitStore for a given event.
 Return 0x0 if event not found.
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
ClusterStore(Int_t event)
 Return clusterStore for a given event.
 Return 0x0 if event not found.
 Returned pointer should not be deleted

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
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

 \note If a previous store has been retrieved by one of the methods of
 this class, but for a different event number, then those stores will
 be deleted and no longer valid.
 If you require access to the data for the earlier retrieved store,
 but for different events, then you should deep copy / clone the object.
DumpDigits(Int_t event, Bool_t sorted = kTRUE)
 Dump the digits for a given event, sorted if so required
DumpRecPoints(Int_t event, Bool_t sorted = kTRUE)
 Dump the recpoints for a given event, sorted if so required
DumpSorted(const AliMUONVStore& store) const
 Dump the given store, in sorted order
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
NtupleTrigger(const char* treeLetter)
 Loop over events to build trigger ntuples

LoadEvent(Int_t event)
 Load event if different from the current one.
 Returns kFALSE on error and kTRUE if the event was loaded.
NumberOfEvents() const
 Number of events in the current galice.root file we're attached to
Open(const char* filename)
 Connect to a given galice.root file
Bool_t GetEvent(Int_t event = 0)
 Loads all reconstructed data for the given event.
Int_t NumberOfDigits(Int_t detElemId)
 Returns the number of digits to be found on a given detector element.
 @param detElemId  The detector element ID number to search on.
AliMUONVDigit* Digit(Int_t detElemId, Int_t index)
 Returns the a pointer to the index'th digit on the specified detector element.
 @param detElemId  The detector element ID number to search on.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(detElemId)
Int_t NumberOfDigits(Int_t chamber, Int_t cathode)
 Returns the number of digits to be found on a specific chamber and cathode.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
AliMUONVDigit* 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.
 @param chamber  The chamber number in the range [0 .. 13].
 @param cathode  The cathode in the range [0 .. 1], where 0 is the bending and
   1 is the non-bending plane.
 @param index  The index number of the digit to fetch in the range [0 .. N-1],
   where N = NumberOfDigits(chamber, cathode)
Int_t NumberOfRawClusters(Int_t chamber)
 Returns the number of reconstructed raw clusters on the specified chamber.
 @param chamber  The chamber number in the range [0 .. 13].
AliMUONVCluster* RawCluster(Int_t chamber, Int_t index)
 Returns a pointer to the index'th raw cluster on the specified chamber.
 @param chamber  The chamber number in the range [0 .. 13].
 @param index  The index number of the raw cluster to fetch in the range [0 .. N-1],
   where N = NumberOfRawClusters(chamber)
Int_t NumberOfLocalTriggers()
 Returns the number of reconstructed local trigger objects.
AliMUONLocalTrigger* LocalTrigger(Int_t index)
 Returns a pointer to the index'th local trigger object.
 @param index  The index number of the local trigger object to fetch in the range [0 .. N-1],
   where N = NumberOfLocalTriggers()
Int_t NumberOfRegionalTriggers()
 Returns the number of regional trigger objects reconstructed.
AliMUONRegionalTrigger* RegionalTrigger(Int_t index)
 Returns a pointer to the index'th regional trigger object.
 @param index  The index number of the regional trigger object to fetch in the range [0 .. N-1],
   where N = NumberOfRegionalTriggers()
AliMUONGlobalTrigger* GlobalTrigger()
 Returns a pointer to the reconstructed global trigger object for the event.
void ResetStores()
 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.
TIterator* GetIterator(AliMUONDataInterface::IteratorType type, Int_t x = 0, Int_t y = 0)
 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.
 @param type  The type of iterator to create.
 @param 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.
 @param y  If type == kDigitIteratorByChamberAndCathode then this parameter is the
           cathode number. In all other cases this parameter is
           ignored.
void ResetIterator()
 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.
Int_t CountObjects(TIterator* iter)
 Counts the number of objects in the iterator and resets it.
 @return The number of objects in 'iter'.
TObject* FetchObject(TIterator* iter, Int_t index)
 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.
 @param iter  The iterator to fetch an object from.
 @param index The index number of the object to fetch in the range [0 .. N-1]
        where N = CountObjects(iter)
AliMUONDataInterface(const char* filename = "galice.root")
Bool_t IsValid() const
 Returns true if the data interface was able to open the root file correctly.
{ return fIsValid; }
Int_t CurrentEvent() const
 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).
{ return fCurrentEvent; }
void DumpClusters(Int_t event, Bool_t sorted = kTRUE)
 Dump the clusters for a given event, sorted if so required
{ return DumpRecPoints(event,sorted); }
AliMUONDataInterface& operator=(const AliMUONDataInterface& rhs)
 Not implemented