source: fact/BIASctrl/User.h@ 10067

Last change on this file since 10067 was 10059, checked in by ogrimm, 14 years ago
Fast ramping for many channels
File size: 1.3 KB
Line 
1
2#ifndef PROCESSIO_H_SEEN
3#define PROCESSIO_H_SEEN
4
5#include <stdarg.h>
6#include <errno.h>
7#include <math.h>
8#include <signal.h>
9#include <string>
10#include <pthread.h>
11#include <limits>
12
13#define SERVER_NAME "Bias" // Name to use in DIM
14#include "Evidence.h"
15
16#include "Crate.h"
17#include "../pixelmap/PixelMap.h"
18
19#define MAX_COM_SIZE 5000
20
21#define MIN_RATE 0.01
22#define MAX_RATE 50.0
23
24class User: public EvidenceServer {
25
26 PixelMap *pm;
27 DimCommand *DIMCommand;
28 DimService *ConsoleOut;
29 char *ConsoleText;
30 pthread_t Thread;
31 std::vector<std::string> Parameter;
32
33 std::vector<class Crate *> Crates;
34
35 void commandHandler();
36
37 struct Range {
38 int Min;
39 int Max;
40 };
41
42 bool Match(std::string, const char *);
43 bool ConvertToDouble(std::string, double *);
44 bool ConvertToInt(std::string, int *);
45 bool ConvertToRange(std::string, struct Range &);
46
47 public:
48 double fTimeOut;
49 float fStatusRefreshRate;
50 unsigned int fMaxDiff;
51
52 User();
53 ~User();
54
55 void PrintMessage(const char *, ...);
56 unsigned int RampVoltages(int, std::map<unsigned int, unsigned int>);
57 void Monitor();
58 static void LaunchMonitor(User *);
59
60 void cmd_hv(); void cmd_synch();
61 void cmd_status(); void cmd_gs();
62 void cmd_load(); void cmd_save();
63 void cmd_exit(); void cmd_rate();
64 void cmd_timeout(); void cmd_reset();
65 void cmd_help(); void cmd_ccal();
66};
67
68#endif
Note: See TracBrowser for help on using the repository browser.