]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVClusterStore.cxx
removed obsolete AliMUONAlignmentRecord classes (AliMillePedeRecord is now used,...
[u/mrichter/AliRoot.git] / MUON / AliMUONVClusterStore.cxx
index 9c4b7f03f214d8a8b3f9bdd8fd4bc8379b2d581b..3f9d15a97e59d5e13c711c199deebae8b66ae672 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,11 +49,10 @@ 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);
-    return kTRUE;
+    return (Add(*cluster)) ? kTRUE : kFALSE;
   }
   return kFALSE;
 }
@@ -67,3 +64,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));
+}
+