NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Detector.h
1 #ifndef DETECTOR_H_
2 #define DETECTOR_H_
3 #include "Configuration.h"
4 #include <iostream>
5 #include <fstream>
6 #include <stdlib.h>
7 #include <vector>
8 #include "pixie16app_defs.h"
9 #include "pixie16app_export.h"
10 #include "Rtypes.h"
11 #define FILENAME_STR_MAXLEN 256
12 #define MAX_NUM_PIXIE16_MODULES 24
13 #define TOTAL_PIXIE16_VARIANTS 8
14 
15 class Detector
16 {
17 public:
18  Detector();
19  virtual ~Detector();
20  int ExitSystem();
21  void Boot();
22  bool IsBooted();
23  void SetSetFile(const char *newsetfile);
24  int Syncronise ();
25  int StartLSMRun (int continue_run);
26  int StartRun (int contine_run, int modnum);
27  int StartBaselineRun (int contine_run, int modnum);
28  int RunStatus ();
29  int Write2FileLSM(char *name);
30  int AcquireADCTrace (unsigned short *trace, unsigned long size,
31  unsigned short module, unsigned short ChanNum);
32 
33  unsigned short NumModules;
34 
35  unsigned short GetNumberModules() const {return NumModules;}
36  std::vector<unsigned short> GetPXISlotMap() const;
37  unsigned short GetModuleMSPS(unsigned int i) {return ModADCMSPS[i];}
38 
39 private:
40  int synchronize(int modnum);
41 
42 private:
43 
44  bool m_newset;
45  bool booted;
46  unsigned short *PXISlotMap;
47  unsigned short OfflineMode;
48  DAQ::DDAS::Configuration m_config;
49 
50  unsigned short ModRev[MAX_NUM_PIXIE16_MODULES]; // module revision in hex format (NSCL had D and F modules
51  unsigned short ModADCBits[MAX_NUM_PIXIE16_MODULES]; // adc bits of a module
52  unsigned short ModADCMSPS[MAX_NUM_PIXIE16_MODULES]; // sampling rate of a module
53  unsigned int ModSerNum[MAX_NUM_PIXIE16_MODULES]; // module serial number
54 
55 };
56 
57 #endif /*DETECTOR_H_*/
Definition: Detector.h:15
The Configuration class.
Definition: Configuration.h:50