LCOV - code coverage report
Current view: top level - MUON/MUONraw - AliMUONRawStreamTracker.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 19 5.3 %

          Line data    Source code
       1             : #ifndef ALIMUONRAWSTREAMTRACKER_H
       2             : #define ALIMUONRAWSTREAMTRACKER_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             : /// \ingroup raw
       9             : /// \class AliMUONRawStreamTracker
      10             : /// \brief Class for reading MUON raw digits
      11             : ///
      12             : //  Author: Christian Finck
      13             : 
      14             : #include <TObject.h>
      15             : #include "AliMUONPayloadTracker.h"
      16             : #include "AliMUONVRawStreamTracker.h"
      17             : 
      18             : class AliRawReader;
      19             : class AliMUONDDLTracker;
      20             : class AliMUONDspHeader;
      21             : class AliMUONBusStruct;
      22             : class AliMUONBlockHeader;
      23             : 
      24             : class AliMUONRawStreamTracker: public AliMUONVRawStreamTracker {
      25             :   public :
      26             :     AliMUONRawStreamTracker();
      27             :     AliMUONRawStreamTracker(TRootIOCtor* dummy);
      28             :     AliMUONRawStreamTracker(AliRawReader* rawReader);
      29             :     virtual ~AliMUONRawStreamTracker();
      30             : 
      31             :     /// Initialize iterator
      32             :     void First();
      33             : 
      34             :     /// Returns current DDL object during iteration
      35           0 :     AliMUONDDLTracker* CurrentDDL() const { return fCurrentDDL; }
      36             :     
      37             :     /// Returns current BlockHeader object during iteration
      38           0 :     AliMUONBlockHeader* CurrentBlockHeader() const { return fCurrentBlockHeader; }
      39             :     
      40             :     /// Returns current DspHeader object during iteration
      41           0 :     AliMUONDspHeader* CurrentDspHeader() const { return fCurrentDspHeader; }
      42             :     
      43             :     /// Returns current BusStruct object during iteration
      44           0 :     AliMUONBusStruct* CurrentBusStruct() const { return fCurrentBusStruct; }
      45             :     
      46             :     /// Advance one step in the iteration. Returns false if finished.
      47             :     virtual Bool_t Next(Int_t& busPatchId, 
      48             :                         UShort_t& manuId, UChar_t& manuChannel, 
      49             :                         UShort_t& adc);
      50             :     
      51             :     virtual Bool_t NextDDL();
      52             : 
      53             :     /// Return maximum number of block per DDL in DATE file
      54           0 :     Int_t GetMaxBlock() const {return  fPayload->GetMaxBlock();}
      55             :     /// Return maximum number of Dsp per block in DATE file
      56           0 :     Int_t GetMaxDsp()   const {return  fPayload->GetMaxDsp();}
      57             :     /// Return maximum number of Buspatch per Dsp in DATE file
      58           0 :     Int_t GetMaxBus()   const {return  fPayload->GetMaxBus();}
      59             : 
      60             :     // check input before assigment
      61             :     void SetMaxBlock(Int_t blk);
      62             : 
      63             :     /// Set maximum number of Dsp per block in DATE file
      64             :     /// does not check, done via BusPatchManager
      65           0 :     void SetMaxDsp(Int_t dsp) {fPayload->SetMaxDsp(dsp);}
      66             :     /// Set maximum number of Buspatch per Dsp in DATE file
      67             :     /// does not check, done via BusPatchManager
      68           0 :     void SetMaxBus(Int_t bus) {fPayload->SetMaxBus(bus);}
      69             : 
      70             :     /// Return pointer for DDL
      71           0 :     AliMUONDDLTracker*      GetDDLTracker() const {return fPayload->GetDDLTracker();}
      72             : 
      73             :     /// Return number of DDL
      74           0 :     Int_t GetDDL() const {return fDDL - 1;}
      75             :                 
      76             :                 /// Return current DDL index
      77           0 :     Int_t GetCurentDDL() const {return fCurrentDDLIndex;}
      78             : 
      79             :     /// Return pointer for payload
      80           0 :     AliMUONPayloadTracker*  GetPayLoad()    const {return fPayload;}
      81             : 
      82             :     /// Whether the iteration is finished or not
      83             :     Bool_t IsDone() const;
      84             : 
      85             :     /// add error message into error logger
      86             :     void AddErrorMessage();
      87             :     
      88             :     /// Disable Warnings
      89           0 :     void DisableWarnings() {fPayload->DisableWarnings();}
      90             :     
      91             :     /// check error/Warning presence
      92             :     Bool_t IsErrorMessage() const;
      93             : 
      94             :     /// error numbers
      95             :     enum rawStreamTrackerError {
      96             :       kGlitchErr      = 1, ///< glitch error 
      97             :       kPaddingWordErr = 2, ///< padding word error
      98             :       kParityErr      = 3  ///< parity error
      99             :     };
     100             : 
     101             :   private :
     102             :     /// Not implemented
     103             :     AliMUONRawStreamTracker(const AliMUONRawStreamTracker& stream);
     104             :     /// Not implemented
     105             :     AliMUONRawStreamTracker& operator = (const AliMUONRawStreamTracker& stream);
     106             : 
     107             :     Bool_t GetNextDDL();
     108             :     Bool_t GetNextBlockHeader();
     109             :     Bool_t GetNextDspHeader();
     110             :     Bool_t GetNextBusStruct();
     111             : 
     112             :  
     113             :  private:
     114             : 
     115             :     AliMUONPayloadTracker* fPayload;         ///< pointer to payload decoder
     116             :     AliMUONDDLTracker* fCurrentDDL;          //!<! for iterator: current ddl ptr
     117             :     Int_t fCurrentDDLIndex;                  //!<! for iterator: current ddl index
     118             :     AliMUONBlockHeader* fCurrentBlockHeader; //!<! for iterator: current block ptr
     119             :     Int_t fCurrentBlockHeaderIndex;          //!<! for iterator: current block index    
     120             :     AliMUONDspHeader* fCurrentDspHeader;     //!<! for iterator: current dsp ptr
     121             :     Int_t fCurrentDspHeaderIndex;            //!<! for iterator: current dsp index    
     122             :     AliMUONBusStruct* fCurrentBusStruct;     //!<! for iterator: current bus ptr
     123             :     Int_t fCurrentBusStructIndex;            //!<! for iterator: current bus index    
     124             :     Int_t fCurrentDataIndex;                 //!<! for iterator: current data index
     125             :     Int_t  fDDL;                             //!<! number of DDL
     126             : 
     127          18 :     ClassDef(AliMUONRawStreamTracker, 4)    // base class for reading MUON raw digits
     128             : };
     129             : 
     130             : #endif

Generated by: LCOV version 1.11