LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSTRURawReader.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 7 28.6 %
Date: 2016-06-14 17:26:59 Functions: 2 11 18.2 %

          Line data    Source code
       1             : #ifndef ALIPHOSTRURAWREADER_H
       2             : #define ALIPHOSTRURAWREADER_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : /* $Id$ */
       6             : 
       7             : 
       8             : class AliCaloRawStreamV3;
       9             : 
      10             : #include "TObject.h"
      11             : 
      12             : /* 
      13             :  * Class for reading TRU data from a bunch from a raw datastream.
      14             :  * Author: Henrik Qvigstad <henrik.qvigstad@cern.ch>
      15             :  * Author: Jussi Viinikainen <jussi.viinikainen@cern.ch> (adaptation to Run2 format)
      16             :  */
      17             : class AliPHOSTRURawReader : public TObject
      18             : {
      19             :  public:
      20             :   AliPHOSTRURawReader();
      21             :   virtual ~AliPHOSTRURawReader();
      22             : 
      23           0 :   Short_t GetTriggerSignal(Int_t xIdx, Int_t zIdx, Int_t timeBin) const {return fSignals[xIdx][zIdx][timeBin];}
      24             :   Bool_t GetTriggerFlag(Int_t xIdx, Int_t zIdx, Int_t timeBin) const;
      25         256 :   bool IsActive() const {return fActive;}
      26           0 :   bool IsActive(Int_t timeBin) const {return fActiveTime[timeBin];}
      27           0 :   bool HasSignal() const {return fHasSignal;}
      28           0 :   bool HasSignal(Int_t timeBin) const {return fHasSignalTime[timeBin];}
      29             :   
      30             :   void ReadFromStream(AliCaloRawStreamV3* rawStream);
      31             :   void Reset();
      32             :   
      33           0 :   static Int_t GetDefaultSignalValue() { return fgkDefaultSignalValue; };
      34             :   
      35             :  private:
      36             :   AliPHOSTRURawReader(const AliPHOSTRURawReader &); // not implemented
      37             :   AliPHOSTRURawReader& operator= (const AliPHOSTRURawReader &); // not implemented
      38             :   
      39             :   // constants
      40             :   static const Int_t fgkDefaultSignalValue = 512; // Default/Ideal TRU amplitude pedestal
      41             :   static const Int_t fgkNReadoutChannels = 112;  // number of readout channels in tru
      42             :   static const Int_t fgkN4x4TriggerFlags = 91;  // number of possible 4x4 area in PHOS
      43             :   static const Int_t fgkFinalProductionChannel = 123; // The last channel of production bits, contains markesr to choose between 2x2 and 4x4 algorithm
      44             :   static const Int_t fgkWordLength = 10; // Length of one data word in raw data
      45             :   static const Int_t fgkNTimeBins = 128; // Number of timeBins
      46             :   static const Int_t fgkN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row
      47             :   static const Int_t fgkN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch
      48             :   static const Int_t fgkN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row
      49             :   static const Int_t fgkN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch
      50             :   
      51             :   Short_t fSignals[fgkN2x2XPrTRURow][fgkN2x2ZPrBranch][fgkNTimeBins]; // 2x2 Trigger Signal Sum, [x][z][t]
      52             :   Bool_t  fFlags[fgkN4x4XPrTRURow][fgkN4x4ZPrBranch][fgkNTimeBins]; // 4x4 Trigger Flag, [x][z][t]
      53             :   Bool_t  fFlags2x2[fgkN2x2XPrTRURow][fgkN2x2ZPrBranch][fgkNTimeBins]; // 2x2 Trigger Flag, [x][z][t]
      54             :   
      55             :   Bool_t fActive; // Active
      56             :   Bool_t fHasSignal; // Has Signal
      57             :   Bool_t fActiveTime[fgkNTimeBins]; // Active [t]
      58             :   Bool_t fHasSignalTime[fgkNTimeBins]; // Has Signal [t]
      59             :   Bool_t fUse4x4Flags; // True is the 4x4 analysis bit (bit number 112) is 1, otherwise false
      60             :   
      61          22 :   ClassDef(AliPHOSTRURawReader, 2)
      62             : };
      63             : 
      64             : #endif // ALIPHOSTRURAWREADER_H

Generated by: LCOV version 1.11