fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/hw4/flt.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     Flt.h  - description
00003 
00004     begin                : Mon Jul 3 2000
00005     copyright            : (C) 2000 by Andreas Kopmann
00006     email                : kopmann@hpe.fzk.de
00007  ***************************************************************************/
00008 
00009 
00010 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00011 #pragma once
00012 #endif
00013 #ifndef _HW4_FLT_H_INCLUDED
00014 #define _HW4_FLT_H_INCLUDED
00015 
00016 
00017 #include <hw4/baseregister.h>
00018 
00019 #include <hw4/fltperiphregister.h>
00020 #include <hw4/fltstatistic.h>
00021 #include <hw4/fltcontrol.h>
00022 #include <hw4/flthitrate.h>
00023 #include <hw4/flthitratecontrol.h>
00024 #include <hw4/fltruncontrol.h>
00025 #include <hw4/fltperiphstatus.h>
00026 #include <hw4/fltinterrupt.h>
00027 #include <hw4/fltthreshold.h>
00028 #include <hw4/fltversion.h>
00029 #include <hw4/fltstatisticcontrol.h>
00030 #include <hw4/flthitratemargins.h>
00031 #include <hw4/fltcommand.h>
00032 #include <hw4/fltstatus.h>
00033 #include <hw4/fltautoincram.h>
00034 #include <hw4/baseboardidreg.h>
00035 
00036 #include <hw4/subrack.h>
00037 #include <hw4/subrackboard.h>
00038 
00039 
00040 namespace hw4 {
00041 
00043 static const int kFLT_REGS = 30;
00044 
00046 static const int kFLT_PIXREGS = 16;
00047 
00048 // --- forward declaration(s)
00049 
00050 class Subrack;
00051         
00080 class Flt : public hw4::SubrackBoard
00081 {
00082 public:
00083 
00084   Flt(int ID);
00085 
00086   virtual ~Flt();
00087 
00088 #if 0
00089   enum Flt4Constants {   //I use this temporarily instead of the defines in fltdef.h -tb-
00090       kFLT_PAGES = 64,
00091       kFLT_PAGE_SIZE = 2000 // for unsigned shorts (for v3 this was 1000)
00092   };
00093 #endif
00094 
00097    bool checkPresence();
00098 
00099 
00100    int getVersion(int unit=0);
00101    
00102 
00110    int getHardwareModelVersion(); 
00111 
00123    int testMemory(FILE *fout, int ch = -1);
00124 
00137    int testTransferRate(FILE *fout, int ch = -1, int page = -1);
00138 
00139 
00146   int compareData(FILE *fout, unsigned short *data,
00147                   unsigned short *patter, int shift, int n, int output=1);
00148 
00149 
00151   int getMeanAdcValue(int ch, double *value);
00152 
00158   int setThresholdToAdc(int ch, unsigned long delta);
00159 
00160   SubrackBase* theSubrack; //-tb- was Subrack
00161 
00162   FltStatus * status;
00163 
00164   FltControl * control;
00165         
00166   FltCommand * command;
00167 
00168   FltVersion * version;
00169 
00170   FltInterrupt * interruptMask;
00171 
00172   FltInterrupt * interruptRequest;
00173 
00174   BaseBoardIdReg * boardId;
00175 
00176   BaseRegister * channelOnOff;
00177 
00178   BaseRegister * hitrateMeasureEnable;
00179 
00180   BaseRegister * hitrateControlEnable;
00181 
00182   BaseRegister * testpulseEnable;
00183 
00184   BaseRegister * pixelTriggerSettings;
00185 
00186   BaseRegister * accessTest;
00187 
00188   FltHitrateControl * hitrateControl;
00189 
00190   FltHitrateMargins * hitrateMargins;
00191 
00192   BaseRegister * offset;
00193 
00194   BaseRegister * gain;
00195 
00196   FltHitrate * hitrate;
00197 
00198   BaseRegister * testPattern;
00199 
00200   FltPeriphStatus * periphStatus;                                         
00201 
00202   FltVersion * periphVersion;
00203 
00204   FltRunControl * runControl;
00205 
00206   FltStatisticControl * statisticSet;
00207         
00217   FltStatistic * statistic;
00218 
00219   FltThreshold * threshold;
00220 
00221   BaseRegister * adcSettings;
00222 
00223   BaseRegister * ramData;
00224    //-tb-
00232   FltAutoIncRAM * ramDataBurst; 
00233 };
00234         
00235 } // namespace hw4
00236 
00237 #endif /* _HW4_FLT_H_INCLUDED */
00238