LCOV - code coverage report
Current view: top level - MUON/MUONbase - AliMUONVDigitStore.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 3 33.3 %
Date: 2016-06-14 17:26:59 Functions: 1 7 14.3 %

          Line data    Source code
       1             : #ifndef ALIMUONVDIGITSTORE_H
       2             : #define ALIMUONVDIGITSTORE_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             : * See cxx source for full Copyright notice                               */
       6             : 
       7             : // $Id$
       8             : 
       9             : /// \ingroup base
      10             : /// \class AliMUONVDigitStore
      11             : /// \brief Interface for a digit container
      12             : /// 
      13             : // Author Laurent Aphecetche, Subatech
      14             : 
      15             : #ifndef ALIMUONVSTORE_H
      16             : #  include "AliMUONVStore.h"
      17             : #endif
      18             : 
      19             : #ifndef ALIMUONVDIGIT_H
      20             : #  include "AliMUONVDigit.h" // must be there for covariant return type of FindObjet methods
      21             : #endif
      22             : 
      23           0 : class AliMUONVDigitStore : public AliMUONVStore
      24             : {  
      25             : public:
      26             :   
      27             :   /// Replacement policy : what to do when adding a digit to the store
      28             :   enum EReplacePolicy { kAllow, kDeny, kMerge, kIgnore };
      29             :   
      30             : public:
      31             :   AliMUONVDigitStore();
      32             :   virtual ~AliMUONVDigitStore();
      33             :   
      34             :   /// Add an object, if it is of the right class
      35             :   virtual Bool_t Add(TObject* object);
      36             :   
      37             :   /// Create an (empty) object of the same concrete class as *this
      38             :   virtual AliMUONVDigitStore* Create() const = 0;
      39             :   
      40             :   static AliMUONVDigitStore* Create(TTree& tree);
      41             :   
      42             :   static AliMUONVDigitStore* Create(const char* classname);
      43             :   
      44             :   /// Create a digit
      45             :   virtual AliMUONVDigit* CreateDigit(Int_t detElemId, Int_t manuId,
      46             :                                      Int_t manuChannel, Int_t cathode) const = 0;
      47             : 
      48             :   /// Add a digit and return the newly created digit
      49             :   virtual AliMUONVDigit* Add(Int_t detElemId, 
      50             :                              Int_t manuId,
      51             :                              Int_t manuChannel,
      52             :                              Int_t cathode,
      53             :                              EReplacePolicy replace);
      54             :   
      55             :   /** Add a (s)digit. Digit is adopted. 
      56             :     @param digit the digit to be added
      57             :     @param replace specify what to do if the digit is already there.
      58             :     kAllow means replacement is allowed, kDeny means it is forbidden (in which
      59             :     case we return 0x0), and kMerge means both digits will be merged).
      60             :   Finally, kIgnore means no check is done at all. This is the most rapid option,
      61             :   but also the more dangerous ;-)
      62             :   */
      63             :   virtual AliMUONVDigit* Add(const AliMUONVDigit& digit, EReplacePolicy replace) = 0;
      64             : 
      65             :   /// Create an iterator to loop over all our digits.
      66             :   virtual TIterator* CreateIterator() const = 0;
      67             :   
      68             :   /** Create an iterator to loop over all digits of a group of detection elements,
      69             :     and a given cathode (if cathode != -1)
      70             :     */
      71             :   virtual TIterator* CreateIterator(Int_t firstDetElemId, 
      72             :                                     Int_t lastDetElemId,
      73             :                                     Int_t cathode=2) const = 0;
      74             :   
      75             :   /// Create an iterator to loop over tracker digits only
      76             :   virtual TIterator* CreateTrackerIterator() const = 0;
      77             : 
      78             :   /// Create an iterator to loop over trigger digits only
      79             :   virtual TIterator* CreateTriggerIterator() const = 0;
      80             : 
      81             :   using AliMUONVStore::FindObject;
      82             : 
      83             :   /// Find an object (default is to forward to FindObject(object->GetUniqueID())
      84             :   virtual AliMUONVDigit* FindObject(const TObject* object) const;
      85             :   
      86             :   /// Find an object by its uniqueID
      87             :   virtual AliMUONVDigit* FindObject(UInt_t uniqueID) const;
      88             :   
      89             :   /// Find a digit by the quadruplet (de,manu,channel,cathode)
      90             :   virtual AliMUONVDigit* FindObject(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const = 0;
      91             :   
      92             :   /// Number of digits we store
      93             :   virtual Int_t GetSize() const = 0;
      94             :   
      95             :   /// Remove an element
      96             :   virtual AliMUONVDigit* Remove(AliMUONVDigit& digit) = 0;
      97             :   
      98             :   /// Number of digits in a given detection element
      99           0 :   virtual Int_t GetSize(Int_t detElemId) const { return GetSize(detElemId,2); }
     100             :   
     101             :   /// Number of digits in a given detection element and a given cathode (2 for both cathodes)
     102             :   virtual Int_t GetSize(Int_t detElemId, Int_t cathode) const;
     103             :   
     104             :   /// Whether we have any MC related information (e.g. at least one simulated digit)
     105             :   virtual Bool_t HasMCInformation() const = 0;
     106             :   
     107          18 :   ClassDef(AliMUONVDigitStore,1) // Digit container interface
     108             : };
     109             : 
     110             : #endif

Generated by: LCOV version 1.11