]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDigitStoreV1.cxx
Update HFE v2 analyses
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreV1.cxx
index 3600a9f205a3525bde1b053601d62a1d66c2f836..8331a3ba5245632f225210305ef5f0618f7db12a 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "AliMUONDigitStoreV1.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONDigitStoreV1
 ///
 /// (Legacy) Implementation of AliMUONVDigitStore. 
@@ -25,7 +26,7 @@
 /// to data stores.
 ///
 // \author Laurent Aphecetche, Subatech
-///
+//-----------------------------------------------------------------------------
 
 #include "AliLog.h"
 #include "AliMUONDigit.h"
@@ -55,6 +56,15 @@ namespace
   }
 }
 
+//_____________________________________________________________________________
+AliMUONDigitStoreV1::AliMUONDigitStoreV1(TRootIOCtor* /*dummy*/)
+: AliMUONVDigitStore(), 
+fDigits(0x0),
+fChamberDigits(0x0)
+{
+  /// ctor
+}
+
 //_____________________________________________________________________________
 AliMUONDigitStoreV1::AliMUONDigitStoreV1()
 : AliMUONVDigitStore(), 
@@ -214,8 +224,6 @@ AliMUONDigitStoreV1::ChamberDigitsPtr(Int_t chamberId) const
 {
   /// Get the address of the TClonesArray storing digits for chamberId.
 
-  return fDigits->GetObjectRef(fDigits->UncheckedAt(chamberId));
-
   TObject* object = fDigits->At(chamberId);
 
   if (!object)
@@ -365,3 +373,19 @@ AliMUONDigitStoreV1::GetSize() const
   }  
   return n;
 }
+
+//_____________________________________________________________________________
+Bool_t 
+AliMUONDigitStoreV1::HasMCInformation() const
+{
+  /// As this class is legacy, don't care about looping and loosing a bit of
+  /// time...
+  TIter next(CreateIterator());
+  AliMUONVDigit* digit;
+  while ( ( digit = static_cast<AliMUONVDigit*>(next()) ) )
+  {
+    if ( digit->HasMCInformation() ) return kTRUE;
+  }
+  return kFALSE;
+}
+