LCOV - code coverage report
Current view: top level - MUON/MUONcalib - AliMUONTriggerIO.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 2 50.0 %
Date: 2016-06-14 17:26:59 Functions: 1 6 16.7 %

          Line data    Source code
       1             : #ifndef ALIMUONTRIGGERIO_H
       2             : #define ALIMUONTRIGGERIO_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 calib
      10             : /// \class AliMUONTriggerIO
      11             : /// \brief Handles read/write of masks and LUT to/from online files
      12             : /// 
      13             : //  Author Laurent Aphecetche, Subatech
      14             : 
      15             : #ifndef ROOT_TObject
      16             : #  include <TObject.h>
      17             : #endif
      18             : 
      19             : #include "AliMpExMap.h"
      20             : #include "AliMpRegionalTrigger.h"
      21             : 
      22             : #ifndef ROOT_TArrayI
      23             : #  include <TArrayI.h>
      24             : #endif
      25             : 
      26             : class TClonesArray;
      27             : class AliMUONTriggerLut;
      28             : class AliMUONVStore;
      29             : class AliMpExMap;
      30             : class AliMpDDL;
      31             : class AliMpTriggerCrate;
      32             : class AliMpLocalBoard;
      33             : class AliMUONGlobalCrateConfig;
      34             : class AliMUONRegionalTriggerConfig;
      35             : class AliMUONTriggerScalers;
      36             : 
      37             : class AliMUONTriggerIO : public TObject
      38             : {
      39             : public:
      40             :   AliMUONTriggerIO();
      41             :   AliMUONTriggerIO(const char* regionalFileToRead);
      42             :   virtual ~AliMUONTriggerIO();
      43             : 
      44             : 
      45             :   Bool_t ReadConfig(const char* localFile,
      46             :                    const char* regionalFile,
      47             :                    const char* globalFile,
      48             :                    AliMUONVStore* localMasks,
      49             :                     AliMUONRegionalTriggerConfig* regionalConfig,
      50             :                     AliMUONGlobalCrateConfig* globalConfig);
      51             : 
      52             :   Bool_t ReadTrigScalers(const char* scfile, TClonesArray& scalers) const;
      53             :   
      54             :   Bool_t WriteTrigScalers(const TClonesArray& scalers, const char* scfile) const;
      55             :   
      56             :   Bool_t ReadLUT(const char* lutFileToRead, AliMUONTriggerLut& lut);
      57             :   
      58             :   Bool_t WriteLUT(const AliMUONTriggerLut& lut,
      59             :                   const char* lutFileToWrite);
      60             :   
      61             :   Bool_t WriteConfig(const char* localFile,
      62             :                     const char* regionalFile,
      63             :                     const char* globalFile,
      64             :                     const AliMUONVStore* localMasks,
      65             :                     AliMUONRegionalTriggerConfig* regionalConfig,
      66             :                     AliMUONGlobalCrateConfig* globalConfig) const;
      67             : 
      68             :   
      69             :   Int_t  ReadGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
      70             : 
      71             :   Bool_t WriteGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
      72             : 
      73             :   Int_t  ReadRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig);
      74             : 
      75             :   Bool_t WriteRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig) const;
      76             : 
      77             :   Int_t  ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const;
      78             :   
      79             :   Bool_t WriteLocalMasks(const char* localFile, const AliMUONVStore& localMasks) const;
      80             : 
      81             :   void   ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut);
      82             :   
      83             :   void   WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId, 
      84             :                        FILE* flut);
      85             :                    
      86             :   Int_t LocalBoardId(Int_t index) const;
      87             :   Int_t LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const;
      88             : 
      89             : 
      90             : private:
      91             :   
      92             :   Bool_t DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, 
      93             :                      UShort_t address) const;
      94             :     
      95             :   void FillLut(AliMUONTriggerLut& lut,
      96             :                Int_t icirc, UChar_t istripX, UChar_t idev,  
      97             :                Int_t lutLpt[16][2], Int_t lutHpt[16][2]) ;
      98             :   
      99             :   
     100             :   /// Return number of local boards
     101           0 :   Int_t NofLocalBoards() const { return fRegionalTrigger.GetNofLocalBoards(); }
     102             :   
     103             :   
     104             :   
     105             : private:
     106             :   AliMpRegionalTrigger  fRegionalTrigger; //!<! Regional trigger
     107             :  
     108             :   static const UInt_t  fgkLocalLutSize;  ///< length of the lut for one local board
     109             : 
     110             :   
     111          18 :   ClassDef(AliMUONTriggerIO,2) // Read/Write trigger masks and LUT to/from online files
     112             : };
     113             : 
     114             : #endif

Generated by: LCOV version 1.11