]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVDigitStore.cxx
fix finding of pad neighbours; remove methods to write them in OCDB
[u/mrichter/AliRoot.git] / MUON / AliMUONVDigitStore.cxx
index 1954ad01d70f1cc0ca564501742537d7c195dedb..501d71d2917e5fce9bd1871ffd1dfe05b5e71d42 100644 (file)
@@ -15,6 +15,7 @@
 
 // $Id$
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONVDigitStore
 ///
 /// Interface for a digit (or sdigit) container
@@ -23,6 +24,7 @@
 /// can create iterators to loop over (part of) the elements.
 ///
 /// \author Laurent Aphecetche, Subatech
+//-----------------------------------------------------------------------------
 
 #include "AliMUONVDigitStore.h"
 
@@ -95,8 +97,10 @@ AliMUONVDigitStore::Add(Int_t detElemId,
 AliMUONVDigitStore* 
 AliMUONVDigitStore::Create(const char* digitstoreclassname)
 {
+  /// Create a concrete digitStore, given its classname
+  
   TClass* classPtr = TClass::GetClass(digitstoreclassname);
-  if (!classPtr)
+  if (!classPtr || !classPtr->InheritsFrom("AliMUONVDigitStore"))
   {
     return 0x0;
   }
@@ -122,6 +126,7 @@ AliMUONVDigitStore::Create(TTree& tree)
 AliMUONVDigit* 
 AliMUONVDigitStore::FindObject(const TObject* object) const
 {
+  /// Find an object, if of AliMUONVDigit type.
   const AliMUONVDigit* digit = dynamic_cast<const AliMUONVDigit*>(object);
   if (digit)
   {
@@ -148,9 +153,8 @@ AliMUONVDigitStore::GetSize(Int_t detElemId, Int_t cathode) const
 {
   /// Return the number of digits we have for a given detection element
   TIter next(CreateIterator(detElemId,detElemId,cathode));
-  AliMUONVDigit* digit;
   Int_t n(0);
-  while ( ( digit = static_cast<AliMUONVDigit*>(next()) ) )
+  while ( ( next() ) )
   {
     ++n;
   }