GTS/TFndTrig.h

00001 // @(#)fROOT/GTS:$Name:  $:$Id: TFndTrig.h,v 1.11 2007/09/05 09:44:53 Diego_Faso Exp $
00002 // Revision Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 // Original author: P. Cerello <mailto:cerello@to.infn.it>, 2001
00004 
00005 #ifndef FROOT_TFndTrig
00006 #define FROOT_TFndTrig
00007 
00009 //            //
00010 //  TFndTrig  //
00011 //            //
00013 
00014 #include "TObject.h"
00015 
00016 //class TFndRdt;
00017 
00018 #include "FROOT.h"
00019 using namespace FROOT;
00020 
00021 class TFndTrig : public TObject {
00022 
00023  private:
00024   UInt_t fPU_cont[K_N_GTS_P_UNITS]; // 16 bit words (Pattern Units content)
00025   UInt_t fPU_mult[K_N_GTS_P_UNITS]; // 16 bit words (Pattern Units content)
00026   UInt_t fMalu[K_N_GTS_MALU];  // 32 bits for every malu (total): 2*(16 bit words)
00027   UInt_t fTrigSel[K_N_GTS_SELECTORS];  // (Trigger selector content)
00028 
00029  public: 
00030   TFndTrig();                   //  Default constructor
00031   ~TFndTrig();                  //  Destructor
00032   
00033   void SetPU_cont(const UInt_t &val,const UInt_t &PUnum){ fPU_cont[PUnum] = val; }
00034   void SetPU_mult(const UInt_t &val,const UInt_t &PUnum){ fPU_mult[PUnum] = val; }
00035   //  void SetMalu_cont(const UInt_t &val,const UInt_t &MALUnum){ fMalu[MALUnum] = val; }
00036   void SetMalu_cont(UInt_t pat1,UInt_t pat2,const UInt_t &MALUnum) { 
00037     fMalu[MALUnum] = UInt_t ( (pat2 << 16) | (pat1 & 0xFFFF) );
00038   }
00039   void SetTriggerSelector(const UInt_t &val,const UInt_t &TSnum) { fTrigSel[TSnum] = val; }
00040 
00041   UShort_t GetPU_cont_bit(const UInt_t &mod_num,const UInt_t &bit);
00042   UShort_t GetPU_mult_bit(const UInt_t &mod_num,const UInt_t &bit);
00043   UShort_t GetMalu_bit(const UInt_t &mod_num,const UInt_t &bit);
00044   UShort_t GetTriggerSelector_bit(const UInt_t &mod_num,const UInt_t &bit);
00045 
00046   UInt_t GetPU_cont(const UInt_t &PUnum){ return fPU_cont[PUnum]; }
00047   UInt_t GetPU_mult(const UInt_t &PUnum){ return fPU_mult[PUnum]; }
00048   UInt_t GetMalu_cont(const UInt_t &MALUnum){ return fMalu[MALUnum]; }
00049   UInt_t GetTriggerSelector(const UInt_t &TSnum) { return fTrigSel[TSnum]; }
00050   
00051   void Reset();
00052 
00053   void PrintTrigger(Int_t depth=1) const;
00054    
00055   ClassDef(TFndTrig,1)   //  The Trigger
00056     };
00057 
00058 #endif // FROOT_TFndTrig
00059 
00060 
00061     

Generated on Tue Oct 16 15:40:46 2007 by  doxygen 1.5.2