fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/hw4/subrackauger.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     SubrackAuger.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 #ifndef _HW4_SUBRACKAUGER_H_INCLUDED
00011 #define _HW4_SUBRACKAUGER_H_INCLUDED
00012 
00013 
00014 #define SUBRACK_VER 100
00015 
00016 #include <cstdio>
00017 
00018 #include <akutil/akinifile.h>
00019 
00020 #include <Hw/subrackbase.h>
00021 #include <hw4/sltauger.h>
00022 #include <hw4/flt.h>
00023 
00024 
00415 class SimpleSocket;
00416 
00417 
00418 namespace hw4 {
00419 
00420 class SltAuger;
00421 class Flt;
00422 
00423 
00424 
00434 class SubrackAuger : public SubrackBase {
00435 
00436 public:
00444   SubrackAuger(const char *inifile="FE.ini",int mode=0);
00445 
00446   ~SubrackAuger();
00447 
00448 
00452   void reset();
00453 
00457   void configure();
00458 
00459 
00483   void init(FILE *fout, char *inifile);
00484 
00489 #ifdef __linux__
00490   int handleErrors();
00491 #endif
00492 
00495 #ifdef __linux__
00496   int closeHandler();
00497 #endif
00498 
00499   SltAuger * theSlt;
00500 
00501   Flt * theFlt[20];
00502 
00503 
00504 //protected:
00506   int initIRHandler(const char *inifile="");
00507 
00509   int closeIRHandler();
00510 
00512   int waitForInterrupt(unsigned long *irVector);
00513 
00514 
00526    int testFltConfig(FILE *fout, int level=1, bool header=false);
00527 
00532    int testFltStatistic(FILE *fout, int level=1, bool header=false);
00533 
00534 
00537    int testFltHitrateController(FILE *fout, int level=1, bool useStat=false, bool header=false);
00538 
00539 
00541    int testSltConfiguration(FILE *fout, int level=1, bool header=true);
00542 
00543 
00544 private:
00545   SimpleSocket *s;
00546 
00547 #ifdef __linux__
00548   pid_t pHandler;
00549 #endif
00550 
00552   float meanADCVar;
00553 
00554 };
00555         
00556 } // namespace hw4
00557         
00558 #endif // _HW4_SUBRACKAUGER_H_INCLUDED
00559