CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ODLaserConfig.h
Go to the documentation of this file.
1 #ifndef ODLASERCONFIG_H
2 #define ODLASERCONFIG_H
3 
4 #include <map>
5 #include <stdexcept>
8 #define USE_NORM 1
9 #define USE_CHUN 2
10 #define USE_BUFF 3
11 
12 /* Buffer Size */
13 #define BUFSIZE 200;
14 
15 class ODLaserConfig : public IODConfig {
16 public:
17  friend class EcalCondDBInterface;
18  ODLaserConfig();
19  ~ODLaserConfig() override;
20 
21  // User data methods
22  inline std::string getTable() override { return "ECAL_Laser_CONFIGURATION"; }
23 
24  inline void setId(int id) { m_ID = id; }
25  inline int getId() const { return m_ID; }
26  inline void setSize(unsigned int id) { m_size = id; }
27  inline unsigned int getSize() const { return m_size; }
28 
29  inline void setDebug(int x) { m_debug = x; }
30  inline int getDebug() const { return m_debug; }
31  inline void setDummy(int x) { m_dummy = x; }
32  inline int getDummy() const { return m_dummy; }
33 
34  inline void setMatacqBaseAddress(int x) { m_mq_base = x; }
35  inline int getMatacqBaseAddress() const { return m_mq_base; }
36  inline void setMatacqNone(int x) { m_mq_none = x; }
37  inline int getMatacqNone() const { return m_mq_none; }
38  inline void setMatacqMode(std::string x) { m_mode = x; }
39  inline std::string getMatacqMode() const { return m_mode; }
40  inline void setChannelMask(int x) { m_chan_mask = x; }
41  inline int getChannelMask() const { return m_chan_mask; }
43  inline std::string getMaxSamplesForDaq() const { return m_samples; }
44  inline void setMatacqFedId(int x) { m_mq_fed = x; }
45  inline int getMatacqFedId() const { return m_mq_fed; }
47  inline std::string getPedestalFile() const { return m_ped_file; }
48  inline void setUseBuffer(int x) { m_use_buffer = x; }
49  inline int getUseBuffer() const { return m_use_buffer; }
50  inline void setPostTrig(int x) { m_post_trig = x; }
51  inline int getPostTrig() const { return m_post_trig; }
52  inline void setFPMode(int x) { m_fp_mode = x; }
53  inline int getFPMode() const { return m_fp_mode; }
55  inline std::string getHalModuleFile() const { return m_hal_mod_file; }
56  inline void setMatacqVernierMax(int x) { m_matacq_vernier_max = x; }
57  inline int getMatacqVernierMax() { return m_matacq_vernier_max; }
58  inline void setMatacqVernierMin(int x) { m_matacq_vernier_min = x; }
59  inline int getMatacqVernierMin() { return m_matacq_vernier_min; }
60 
63 
66 
68  inline std::string getMatacqSerialNumber() const { return m_serial; }
69 
70  inline void setPedestalRunEventCount(int x) { m_ped_count = x; }
71  inline int getPedestalRunEventCount() const { return m_ped_count; }
72 
73  inline void setRawDataMode(int x) { m_raw_mode = x; }
74  inline int getRawDataMode() const { return m_raw_mode; }
75 
77  inline std::string getMatacqAcquisitionMode() const { return m_aqmode; }
78 
80  inline std::string getLocalOutputFile() const { return m_mq_file; }
81 
82  // emtc
83  inline void setEMTCNone(int x) { m_emtc_1 = x; }
84  inline int getEMTCNone() const { return m_emtc_1; }
85  inline void setWTE2LaserDelay(int x) { m_emtc_2 = x; }
86  inline int getWTE2LaserDelay() const { return m_emtc_2; }
87  inline void setLaserPhase(int x) { m_emtc_3 = x; }
88  inline int getLaserPhase() const { return m_emtc_3; }
89  inline void setEMTCTTCIn(int x) { m_emtc_4 = x; }
90  inline int getEMTCTTCIn() const { return m_emtc_4; }
91  inline void setEMTCSlotId(int x) { m_emtc_5 = x; }
92  inline int getEMTCSlotId() const { return m_emtc_5; }
93 
94  // void setParameters(std::map<std::string,std::string> my_keys_map);
95 
96  // laser
97 
98  inline void setWaveLength(int x) { m_wave = x; }
99  inline int getWaveLength() const { return m_wave; }
100 
101  inline void setPower(int x) { m_power = x; }
102  inline int getPower() const { return m_power; }
103 
104  inline void setOpticalSwitch(int x) { m_switch = x; }
105  inline int getOpticalSwitch() const { return m_switch; }
106 
107  inline void setFilter(int x) { m_filter = x; }
108  inline int getFilter() const { return m_filter; }
109 
110  inline void setLaserControlOn(int x) { m_on = x; }
111  inline int getLaserControlOn() const { return m_on; }
112 
114  inline std::string getLaserControlHost() const { return m_laserhost; }
115 
116  inline void setLaserControlPort(int x) { m_laserport = x; }
117  inline int getLaserControlPort() const { return m_laserport; }
118 
119  inline void setLaserTag(std::string x) { m_laser_tag = x; }
120  inline std::string getLaserTag() const { return m_laser_tag; }
121 
122  // new parameters
123 
124  inline void setWTE2LedDelay(int x) { m_wte_2_led_delay = x; }
125  inline int getWTE2LedDelay() const { return m_wte_2_led_delay; }
126 
127  inline void setLed1ON(int x) { m_led1_on = x; }
128  inline int getLed1ON() const { return m_led1_on; }
129 
130  inline void setLed2ON(int x) { m_led2_on = x; }
131  inline int getLed2ON() const { return m_led2_on; }
132 
133  inline void setLed3ON(int x) { m_led3_on = x; }
134  inline int getLed3ON() const { return m_led3_on; }
135 
136  inline void setLed4ON(int x) { m_led4_on = x; }
137  inline int getLed4ON() const { return m_led4_on; }
138 
139  inline void setVinj(int x) { m_vinj = x; }
140  inline int getVinj() const { return m_vinj; }
141 
143  inline int getOrangeLedMonAmpl() const { return m_orange_led_mon_ampl; }
144 
145  inline void setBlueLedMonAmpl(int x) { m_blue_led_mon_ampl = x; }
146  inline int getBlueLedMonAmpl() const { return m_blue_led_mon_ampl; }
147 
149  inline std::string getTrigLogFile() const { return m_trig_log_file; }
150 
151  inline void setLedControlON(int x) { m_led_control_on = x; }
152  inline int getLedControlON() const { return m_led_control_on; }
153 
156 
157  inline void setLedControlPort(int x) { m_led_control_port = x; }
158  inline int getLedControlPort() const { return m_led_control_port; }
159 
160  inline void setIRLaserPower(int x) { m_ir_laser_power = x; }
161  inline int getIRLaserPower() const { return m_ir_laser_power; }
162 
163  inline void setGreenLaserPower(int x) { m_green_laser_power = x; }
164  inline int getGreenLaserPower() const { return m_green_laser_power; }
165 
166  inline void setRedLaserPower(int x) { m_red_laser_power = x; }
167  inline int getRedLaserPower() const { return m_red_laser_power; }
168 
171 
173  inline int getIRLaserLogAttenuator() const { return m_ir_laser_log_attenuator; }
174 
177 
180 
183 
184  inline void setLaserClob(unsigned char* x) { m_laser_clob = x; }
185  inline unsigned char* getLaserClob() const { return m_laser_clob; }
186 
187  void setParameters(const std::map<std::string, std::string>& my_keys_map);
188 
189  int fetchNextId() noexcept(false);
190 
191 private:
192  void prepareWrite() noexcept(false) override;
193  void writeDB() noexcept(false);
194  void clear();
195  void fetchData(ODLaserConfig* result) noexcept(false);
196  int fetchID() noexcept(false);
197 
198  // User data
199  int m_ID;
200 
201  // mataq
202  int m_dummy;
203  int m_debug;
206  std::string m_mode;
208  std::string m_samples;
209  int m_mq_fed;
210  std::string m_ped_file;
214  std::string m_hal_mod_file;
215  std::string m_hal_add_file;
216  std::string m_hal_tab_file;
217  std::string m_serial;
220  std::string m_aqmode;
221  std::string m_mq_file;
224 
225  // emtc
226  int m_emtc_1;
227  int m_emtc_2;
228  int m_emtc_3;
229  int m_emtc_4;
230  int m_emtc_5;
231 
232  // laser
233  int m_wave;
234  int m_power;
235  int m_switch;
236  int m_filter;
237  int m_on;
238  std::string m_laserhost;
240 
241  std::string m_laser_tag;
242 
243  // led
249  int m_vinj;
252  std::string m_trig_log_file;
254  std::string m_led_control_host;
263  std::string m_laser_config_file;
264  unsigned char* m_laser_clob;
265  unsigned int m_size;
266 };
267 
268 #endif
void writeDB() noexcept(false)
int getLed2ON() const
int getMatacqVernierMin()
Definition: ODLaserConfig.h:59
void prepareWrite() noexcept(false) override
void setLaserClob(unsigned char *x)
void setFilter(int x)
int getLaserControlPort() const
int getLaserControlOn() const
std::string m_mode
int getDebug() const
Definition: ODLaserConfig.h:30
std::string m_aqmode
void setDummy(int x)
Definition: ODLaserConfig.h:31
int getIRLaserLogAttenuator() const
uint16_t *__restrict__ id
std::string m_led_control_host
void setIRLaserLogAttenuator(int x)
void setLed1ON(int x)
int getBlueLaserLogAttenuator() const
void setChannelMask(int x)
Definition: ODLaserConfig.h:40
std::string getMatacqMode() const
Definition: ODLaserConfig.h:39
int getChannelMask() const
Definition: ODLaserConfig.h:41
int getLaserPhase() const
Definition: ODLaserConfig.h:88
std::string getLaserTag() const
int m_matacq_vernier_min
void setOrangeLedMonAmpl(int x)
int m_orange_led_mon_ampl
int getGreenLaserPower() const
void setSize(unsigned int id)
Definition: ODLaserConfig.h:26
int getLedControlPort() const
void setMatacqFedId(int x)
Definition: ODLaserConfig.h:44
void setLedControlHost(std::string x)
std::string getMaxSamplesForDaq() const
Definition: ODLaserConfig.h:43
int getFilter() const
void setPedestalFile(std::string x)
Definition: ODLaserConfig.h:46
std::string m_hal_add_file
void setParameters(const std::map< std::string, std::string > &my_keys_map)
void setOpticalSwitch(int x)
void setFPMode(int x)
Definition: ODLaserConfig.h:52
void setPower(int x)
std::string m_serial
int getLed1ON() const
int fetchNextId() noexcept(false)
void setMatacqNone(int x)
Definition: ODLaserConfig.h:36
int getIRLaserPower() const
void setTrigLogFile(std::string x)
int getEMTCNone() const
Definition: ODLaserConfig.h:84
int getLed3ON() const
int getWTE2LaserDelay() const
Definition: ODLaserConfig.h:86
int getRedLaserPower() const
int getMatacqVernierMax()
Definition: ODLaserConfig.h:57
void setEMTCSlotId(int x)
Definition: ODLaserConfig.h:91
void setMatacqBaseAddress(int x)
Definition: ODLaserConfig.h:34
void setGreenLaserLogAttenuator(int x)
int getLedControlON() const
int getLed4ON() const
void setMatacqVernierMin(int x)
Definition: ODLaserConfig.h:58
tuple result
Definition: mps_fire.py:311
void setLed2ON(int x)
int fetchID() noexcept(false)
void setLaserControlHost(std::string x)
unsigned int getSize() const
Definition: ODLaserConfig.h:27
void setRedLaserPower(int x)
int getRawDataMode() const
Definition: ODLaserConfig.h:74
std::string getLedControlHost() const
void setMatacqAcquisitionMode(std::string x)
Definition: ODLaserConfig.h:76
std::string getMatacqAcquisitionMode() const
Definition: ODLaserConfig.h:77
void setRawDataMode(int x)
Definition: ODLaserConfig.h:73
int m_ir_laser_log_attenuator
void setEMTCNone(int x)
Definition: ODLaserConfig.h:83
void setLedControlON(int x)
std::string getHalStaticTableFile() const
Definition: ODLaserConfig.h:65
void setVinj(int x)
std::string getLaserConfigFile() const
void setBlueLaserLogAttenuator(int x)
int getOpticalSwitch() const
std::string m_laser_tag
void setLed4ON(int x)
void setIRLaserPower(int x)
void setMaxSamplesForDaq(std::string x)
Definition: ODLaserConfig.h:42
void setRedLaserLogAttenuator(int x)
void setId(int id)
Definition: ODLaserConfig.h:24
void setLed3ON(int x)
std::string m_laserhost
int getPedestalRunEventCount() const
Definition: ODLaserConfig.h:71
std::string getLaserControlHost() const
void setHalAddressTableFile(std::string x)
Definition: ODLaserConfig.h:61
int getFPMode() const
Definition: ODLaserConfig.h:53
int getRedLaserLogAttenuator() const
void setMatacqVernierMax(int x)
Definition: ODLaserConfig.h:56
std::string getPedestalFile() const
Definition: ODLaserConfig.h:47
void setLaserPhase(int x)
Definition: ODLaserConfig.h:87
unsigned int m_size
std::string m_laser_config_file
std::string m_ped_file
void setLaserTag(std::string x)
int getEMTCSlotId() const
Definition: ODLaserConfig.h:92
int getOrangeLedMonAmpl() const
void setLaserConfigFile(std::string x)
void setMatacqMode(std::string x)
Definition: ODLaserConfig.h:38
void setPedestalRunEventCount(int x)
Definition: ODLaserConfig.h:70
void setWTE2LedDelay(int x)
void setLedControlPort(int x)
int getEMTCTTCIn() const
Definition: ODLaserConfig.h:90
int getMatacqNone() const
Definition: ODLaserConfig.h:37
int m_green_laser_log_attenuator
std::string getMatacqSerialNumber() const
Definition: ODLaserConfig.h:68
void setGreenLaserPower(int x)
void setUseBuffer(int x)
Definition: ODLaserConfig.h:48
int getDummy() const
Definition: ODLaserConfig.h:32
int getUseBuffer() const
Definition: ODLaserConfig.h:49
void setBlueLedMonAmpl(int x)
int m_matacq_vernier_max
std::string getLocalOutputFile() const
Definition: ODLaserConfig.h:80
std::string getTrigLogFile() const
int getWTE2LedDelay() const
void setLocalOutputFile(std::string x)
Definition: ODLaserConfig.h:79
void setPostTrig(int x)
Definition: ODLaserConfig.h:50
int getId() const
Definition: ODLaserConfig.h:25
int getMatacqBaseAddress() const
Definition: ODLaserConfig.h:35
void setWTE2LaserDelay(int x)
Definition: ODLaserConfig.h:85
unsigned char * m_laser_clob
int getVinj() const
void setMatacqSerialNumber(std::string x)
Definition: ODLaserConfig.h:67
std::string m_mq_file
void setHalModuleFile(std::string x)
Definition: ODLaserConfig.h:54
~ODLaserConfig() override
std::string getTable() override
Definition: ODLaserConfig.h:22
void setHalStaticTableFile(std::string x)
Definition: ODLaserConfig.h:64
std::string m_hal_mod_file
void setLaserControlOn(int x)
std::string m_hal_tab_file
int m_blue_laser_log_attenuator
int getWaveLength() const
Definition: ODLaserConfig.h:99
void setEMTCTTCIn(int x)
Definition: ODLaserConfig.h:89
std::string m_trig_log_file
void setDebug(int x)
Definition: ODLaserConfig.h:29
void setWaveLength(int x)
Definition: ODLaserConfig.h:98
std::string getHalAddressTableFile() const
Definition: ODLaserConfig.h:62
std::string m_samples
int getPower() const
int m_red_laser_log_attenuator
int getGreenLaserLogAttenuator() const
int getBlueLedMonAmpl() const
void setLaserControlPort(int x)
unsigned char * getLaserClob() const
int getMatacqFedId() const
Definition: ODLaserConfig.h:45
std::string getHalModuleFile() const
Definition: ODLaserConfig.h:55
void fetchData(ODLaserConfig *result) noexcept(false)
int getPostTrig() const
Definition: ODLaserConfig.h:51