LCOV - code coverage report
Current view: top level - RAW/RAWDatarec - AliCaloRawStream.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 20 5.0 %
Date: 2016-06-14 17:26:59 Functions: 1 24 4.2 %

          Line data    Source code
       1             : #ifndef ALICALORAWSTREAM_H
       2             : #define ALICALORAWSTREAM_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ///////////////////////////////////////////////////////////////////////////////
       9             : ///
      10             : /// This class provides access to Calo digits in raw data.
      11             : ///
      12             : ///Modification: Class exported from PHOS to be used by EMCAL and PHOS
      13             : ///November 2006 Gustavo Conesa Balbastre 
      14             : ///////////////////////////////////////////////////////////////////////////////
      15             : 
      16             : // --- ROOT system ---
      17             : #include "TString.h"
      18             : 
      19             : // --- AliRoot header files ---
      20             : #include "AliAltroRawStream.h"
      21             : class AliRawReader;
      22             : class AliAltroMapping;
      23             : 
      24             : class AliCaloRawStream: public AliAltroRawStream {
      25             : 
      26             : public :
      27             :   AliCaloRawStream(AliRawReader* rawReader,  TString calo, AliAltroMapping **mapping = NULL);
      28             :   virtual ~AliCaloRawStream();
      29             :  
      30             :   virtual void             Reset();
      31             :   virtual Bool_t           Next();
      32             :   
      33           0 :   Int_t            GetModule()     const {return fModule;}
      34           0 :   Int_t            GetRow()        const {return fRow;}
      35           0 :   Int_t            GetColumn()     const {return fColumn;}
      36           0 :   Int_t            GetPrevModule() const {return fPrevModule;}
      37           0 :   Int_t            GetPrevRow()    const {return fPrevRow;}
      38           0 :   Int_t            GetPrevColumn() const {return fPrevColumn;}
      39           0 :   Bool_t           IsNewModule()   const {return GetModule() != GetPrevModule();}
      40           0 :   Bool_t           IsNewRow()      const {return (GetRow() != GetPrevRow()) || IsNewModule();}
      41           0 :   Bool_t           IsNewColumn()   const {return (GetColumn() != GetPrevColumn()) || IsNewRow();}
      42           0 :   Int_t            GetNRCU() const {return fNRCU;}
      43           0 :   Int_t            GetNSides() const {return fNSides;}
      44           0 :   TString          GetCalorimeter() const {return fCalo;}
      45             :   enum EAliCaloFlag { kLowGain=0, kHighGain=1, kTRUData=2, kLEDMonData=3 };
      46           0 :   Bool_t           IsLowGain()     const {return (fCaloFlag == kLowGain);}
      47           0 :   Bool_t           IsHighGain()    const {return (fCaloFlag == kHighGain);}
      48           0 :   Bool_t           IsTRUData()     const {return (fCaloFlag == kTRUData);}
      49           0 :   Bool_t           IsLEDMonData()  const {return (fCaloFlag == kLEDMonData);} 
      50             : 
      51           0 :   Int_t GetCaloFlag() const { return fCaloFlag; } 
      52           0 :   Int_t GetFilter() const { return fFilter; } 
      53             : 
      54             :   void SkipData(EAliCaloFlag caloFlag=kLEDMonData) 
      55           0 :     { fFilter |= (1<<caloFlag); }
      56             : 
      57             : protected:
      58             : 
      59             :   AliCaloRawStream(const AliCaloRawStream& stream);
      60             :   AliCaloRawStream& operator = (const AliCaloRawStream& stream);
      61             : 
      62             :   virtual void ApplyAltroMapping();
      63             : 
      64             :   Int_t            fModule;       // index of current module
      65             :   Int_t            fPrevModule;   // index of previous module
      66             :   Int_t            fRow;          // index of current row
      67             :   Int_t            fPrevRow;      // index of previous row
      68             :   Int_t            fColumn;       // index of current column
      69             :   Int_t            fPrevColumn;   // index of previous column
      70             :   Int_t            fCaloFlag;     // low (0) or (1) high gain; see enum EAliCaloFlag above
      71             :   Int_t            fFilter; // default 0 = let everything through
      72             :   Int_t            fNRCU;   // number of RCU per (super)module
      73             :   Int_t            fNSides;   // Division of EMCal in "A" "C" sides
      74             :   TString          fCalo; // Calorimeter name
      75             :   Bool_t           fExternalMapping;   // use external mapping or create a default one
      76             :   AliAltroMapping *fMapping[4];   // pointers to ALTRO mapping
      77             : 
      78         128 :   ClassDef(AliCaloRawStream, 1)   // class for reading PHOS/EMCAL raw digits
      79             : 
      80             : };
      81             : 
      82             : #endif
      83             : 

Generated by: LCOV version 1.11