fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/hw4/subrackkatrin.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_SUBRACKKATRIN_H_INCLUDED
00014 #define _HW4_SUBRACKKATRIN_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 
00506 #ifdef __linux__
00507   int closeHandler();
00508 #endif
00509 
00510   Slt * theSlt;
00511 
00512   Flt * theFlt[20];
00513 
00514 
00515 //protected:
00517   int initIRHandler(const char *inifile="");
00518 
00520   int closeIRHandler();
00521 
00523   int waitForInterrupt(unsigned long *irVector);
00524 
00525 
00537    int testFltConfig(FILE *fout, int level=1, bool header=false);
00538 
00543     int testFltStatistic(FILE *fout, int level=1, bool header=false);
00544 
00545 
00548    int testFltHitrateController(FILE *fout, int level=1, bool useStat=false, bool header=false);
00549 
00550 
00552    int testSltConfiguration(FILE *fout, int level=1, bool header=true);
00553 
00554 
00555 private:
00556   //unsigned long slotList;
00557 
00558 
00559 
00560   SimpleSocket *s;
00561 
00562 #ifdef __linux__
00563   pid_t pHandler;
00564 #endif
00565 
00566   //bool initPbus;
00567 
00569   float meanADCVar;
00570 
00571 };
00572 
00573 } // namespace hw4
00574 
00575 #endif /* _HW4_SUBRACKKATRIN_H_INCLUDED */
00576