]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVClusterStore.cxx
Adding classes AliMUONVRawStreamTracker, AliMUONRawStreamTrackerHP
[u/mrichter/AliRoot.git] / MUON / AliMUONVClusterStore.cxx
index 9c4b7f03f214d8a8b3f9bdd8fd4bc8379b2d581b..e8320acdee82f64a29533ab44b908b3595bfe2bf 100644 (file)
 ///
 /// An interface of a cluster container
 ///
-/// Please note that the the object stored are currently supposed to 
-/// be concrete class AliMUONRawCluster.
-/// This is likely to change to something like AliMUONVCluster...
+/// The object stored are inherited from AliMUONVCluster
 ///
 /// \author Laurent Aphecetche, Subatech
 //-----------------------------------------------------------------------------
 
 #include "AliMUONVClusterStore.h"
-#include "AliMUONRawCluster.h"
+#include "AliMUONVCluster.h"
 
 /// \cond CLASSIMP
 ClassImp(AliMUONVClusterStore)
@@ -51,7 +49,7 @@ Bool_t
 AliMUONVClusterStore::Add(TObject* object)
 {
   /// Add an object, if it is of the right class
-  AliMUONRawCluster* cluster = dynamic_cast<AliMUONRawCluster*>(object);
+  AliMUONVCluster* cluster = dynamic_cast<AliMUONVCluster*>(object);
   if (cluster)
   {
     Add(*cluster);
@@ -67,3 +65,21 @@ AliMUONVClusterStore::Create(TTree& tree)
   /// Create a VClusterStore from the tree
   return static_cast<AliMUONVClusterStore*>(AliMUONVStore::Create(tree,"Cluster"));
 }
+
+//______________________________________________________________________________
+AliMUONVCluster* AliMUONVClusterStore::FindObject(const TObject *obj) const
+{
+  /// Find an object, if of AliMUONVCluster type
+  const AliMUONVCluster* cluster = dynamic_cast<const AliMUONVCluster*>(obj);
+  if (cluster)
+    return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(obj));
+  return 0x0;
+}
+
+//_____________________________________________________________________________
+AliMUONVCluster* AliMUONVClusterStore::FindObject(UInt_t uniqueID) const
+{
+  /// Find an object by its uniqueID (default is the same as in AliMUONVStore)
+  return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(uniqueID));
+}
+