fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/hw4/subrackusct.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     Subrack.h  -  description
00003 
00004     begin                : Thu Jun 29 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_SUBRACKUSCT_H_INCLUDED
00014 #define _HW4_SUBRACKUSCT_H_INCLUDED
00015 
00016 
00017 #define SUBRACK_VER 100
00018 
00019 #include <cstdio>
00020 
00021 #include <akutil/akinifile.h>
00022 
00023 #include <hw4/subrackbase.h>
00024 #include <hw4/slt.h>
00025 #include <hw4/flt.h>
00026 
00027 
00417 class SimpleSocket;
00418 
00419 
00420 namespace hw4 {
00421 
00422 class Slt;
00423 class Flt;
00424         
00425         
00435 //##ModelId=3991220A01C6
00436 class Subrack : public SubrackBase {
00437 
00438 public:
00446   Subrack(const char *inifile="FE.ini",int mode=0);
00447 
00448   ~Subrack();
00449 
00450 
00454   void reset();
00455 
00459   void configure();
00460 
00468   void dumpRegisters(FILE *fout=stdout, int cols = 8);
00469 
00470 
00494   void init(FILE *fout, char *inifile);
00495 
00500 #ifdef __linux__
00501   int handleErrors();
00502 #endif
00503 
00505 #ifdef __linux__
00506   int closeHandler();
00507 #endif
00508 
00509   Slt * theSlt;
00510 
00511   Flt * theFlt[20];
00512 
00513 
00514 //protected:
00516   int initIRHandler(const char *inifile="");
00517 
00519   int closeIRHandler();
00520 
00522   int waitForInterrupt(unsigned long *irVector);
00523 
00535    int testFltConfig(FILE *fout, int level=1, bool header=false);
00536 
00541    int testFltStatistic(FILE *fout, int level=1, bool header=false);
00542 
00544    int testFltHitrateController(FILE *fout, int level=1, bool useStat=false, bool header=false);
00545 
00547    int testSltConfiguration(FILE *fout, int level=1, bool header=true);
00548 
00549 private:
00550   //unsigned long slotList;
00551 
00552   SimpleSocket *s;
00553 
00554 #ifdef __linux__
00555   pid_t pHandler;
00556 #endif
00557 
00558   //bool initPbus;
00559 
00561   float meanADCVar;
00562 };
00563 
00564 } // namespace hw4
00565 
00566 #endif /* _HW4_SUBRACKUSCT_H_INCLUDED */
00567