LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDdigitsManager.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 11 63.6 %
Date: 2016-06-14 17:26:59 Functions: 8 15 53.3 %

          Line data    Source code
       1             : #ifndef ALITRDDIGITSMANAGER_H
       2             : #define ALITRDDIGITSMANAGER_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             : /////////////////////////////////////////////////////////////
      10             : //  Manages the TRD digits                                 //
      11             : /////////////////////////////////////////////////////////////
      12             : 
      13             : #include <TObject.h>
      14             : 
      15             : class TFile;
      16             : class TTree;
      17             : class TBranch;  
      18             : class AliTRDdigit;
      19             : class AliTRDSignalIndex;
      20             : class AliTRDarrayADC;  
      21             : class AliTRDarraySignal; 
      22             : class AliTRDarrayDictionary;
      23             : class AliTRDdigitsParam;
      24             : 
      25             : class AliTRDdigitsManager : public TObject {
      26             : 
      27             :  public:
      28             : 
      29             :   enum { kNDict = 3 };
      30             : 
      31             :   AliTRDdigitsManager(Bool_t rawRec = kFALSE);  //if true digitsmanager uses only one entry in the TObjectArrays
      32             :   AliTRDdigitsManager(const AliTRDdigitsManager &m);
      33             :   virtual ~AliTRDdigitsManager();
      34             :   AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m);
      35             : 
      36             :   virtual void                Copy(TObject &m) const;
      37             : 
      38             :   virtual void                CreateArrays();
      39             :   void                        ClearArrays(Int_t det);
      40             :   virtual Bool_t              BuildIndexes(Int_t det);
      41             : 
      42             :   virtual Bool_t              MakeBranch(TTree * const tree);
      43             :   virtual Bool_t              ReadDigits(TTree * consttree);
      44             :   virtual Bool_t              WriteDigits();
      45             : 
      46          18 :   virtual void                SetEvent(Int_t evt)             { fEvent           = evt;  };
      47          34 :   virtual void                SetSDigits(Int_t v = 1)         { fHasSDigits      = v;    };
      48           4 :   virtual void                SetUseDictionaries(Bool_t kval) { fUseDictionaries = kval; };
      49             : 
      50        8648 :   virtual Bool_t              UsesDictionaries() const        { return fUseDictionaries; };
      51         760 :   virtual Bool_t              HasSDigits() const              { return fHasSDigits;      };
      52           0 :   static  Int_t               NDict()                         { return fgkNDict;         }; 
      53             : 
      54           0 :   virtual TObjArray          *GetDigits() const               { return fDigits;          };  
      55           0 :   virtual TObjArray          *GetDictionary(Int_t i) const    { return fDict[i];         }; 
      56             : 
      57             :   AliTRDdigit                *GetDigit(Int_t row, Int_t col, Int_t time, Int_t det) const;
      58             :   Int_t                       GetTrack(Int_t track, Int_t row, Int_t col, Int_t time, Int_t det) const;
      59             :   
      60             :   AliTRDarrayADC             *GetDigits(Int_t det)  const;
      61             :   AliTRDarraySignal          *GetSDigits(Int_t det) const;    
      62             :   AliTRDarrayDictionary      *GetDictionary(Int_t det, Int_t i) const;  
      63        8120 :   AliTRDdigitsParam          *GetDigitsParam() const          { return fDigitsParam;     };
      64             :   AliTRDSignalIndex          *GetIndexes(Int_t det);
      65           0 :   TObjArray                  *GetIndexes() const              { return fSignalIndexes;   };
      66             : 
      67             :   void                        RemoveDigits(Int_t det);
      68             :   void                        RemoveDictionaries(Int_t det);
      69             :   void                        RemoveIndexes(Int_t det);
      70             :   void                        ClearIndexes(Int_t det);
      71             :   
      72             :   Int_t                       GetTrack(Int_t track, const AliTRDdigit * const digit) const;
      73             :   Short_t                     GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const;
      74             :   UChar_t                     GetPadStatus(Int_t row, Int_t col, Int_t time, Int_t det) const;
      75             : 
      76             :   Bool_t                      LoadArrayDigits();
      77             :   Bool_t                      LoadArrayDict();
      78             :   Bool_t                      LoadDigitsParam();
      79             :   Bool_t                      StoreArrayDigits();
      80             :   Bool_t                      StoreArrayDict();
      81             :   Bool_t                      StoreDigitsParam();
      82             : 
      83             :  protected:
      84             :   
      85             :   static const Int_t  fgkNDict;            //  Number of track dictionary arrays
      86             :   Int_t               fEvent;              //  Event number
      87             :   TTree              *fTree;               //! Tree for the digits arrays
      88             :   TObjArray          *fDigits;             //  Digits data array               
      89             :   TObjArray          *fDict[kNDict];       //  Track dictionary data array   
      90             :   Bool_t              fHasSDigits;         //  Switch for the summable digits
      91             :   TObjArray          *fSignalIndexes;      //  Provides access to the active pads and tbins
      92             :   Bool_t              fUseDictionaries;    //  Use dictionaries or not (case of real data)
      93             :   Int_t               fDets;               //  No of Detectors
      94             :   Bool_t              fRawRec;             //  Reconstruct from raw files? If its kTRUE then the TObjArrays have only one entry.
      95             :   AliTRDdigitsParam  *fDigitsParam;        //  Parameters of the digits
      96             : 
      97         208 :   ClassDef(AliTRDdigitsManager,8)          //  Manages the TRD digits
      98             : 
      99             : };
     100             : #endif

Generated by: LCOV version 1.11