CMS 3D CMS Logo

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 
30  inline void setDebug(int x) { m_debug = x; }
31  inline int getDebug() const { return m_debug; }
32  inline void setDummy(int x) { m_dummy = x; }
33  inline int getDummy() const { return m_dummy; }
34 
35  inline void setMatacqBaseAddress(int x) { m_mq_base = x; }
36  inline int getMatacqBaseAddress() const { return m_mq_base; }
37  inline void setMatacqNone(int x) { m_mq_none = x; }
38  inline int getMatacqNone() const { return m_mq_none; }
39  inline void setMatacqMode(std::string x) { m_mode = x; }
40  inline std::string getMatacqMode() const { return m_mode; }
41  inline void setChannelMask(int x) { m_chan_mask = x; }
42  inline int getChannelMask() const { return m_chan_mask; }
44  inline std::string getMaxSamplesForDaq() const { return m_samples; }
45  inline void setMatacqFedId(int x) { m_mq_fed = x; }
46  inline int getMatacqFedId() const { return m_mq_fed; }
48  inline std::string getPedestalFile() const { return m_ped_file; }
49  inline void setUseBuffer(int x) { m_use_buffer = x; }
50  inline int getUseBuffer() const { return m_use_buffer; }
51  inline void setPostTrig(int x) { m_post_trig = x; }
52  inline int getPostTrig() const { return m_post_trig; }
53  inline void setFPMode(int x) { m_fp_mode = x; }
54  inline int getFPMode() const { return m_fp_mode; }
56  inline std::string getHalModuleFile() const { return m_hal_mod_file; }
57  inline void setMatacqVernierMax(int x) { m_matacq_vernier_max = x; }
58  inline int getMatacqVernierMax() { return m_matacq_vernier_max; }
59  inline void setMatacqVernierMin(int x) { m_matacq_vernier_min = x; }
60  inline int getMatacqVernierMin() { return m_matacq_vernier_min; }
61 
64 
67 
69  inline std::string getMatacqSerialNumber() const { return m_serial; }
70 
71  inline void setPedestalRunEventCount(int x) { m_ped_count = x; }
72  inline int getPedestalRunEventCount() const { return m_ped_count; }
73 
74  inline void setRawDataMode(int x) { m_raw_mode = x; }
75  inline int getRawDataMode() const { return m_raw_mode; }
76 
78  inline std::string getMatacqAcquisitionMode() const { return m_aqmode; }
79 
81  inline std::string getLocalOutputFile() const { return m_mq_file; }
82 
83  // emtc
84  inline void setEMTCNone(int x) { m_emtc_1 = x; }
85  inline int getEMTCNone() const { return m_emtc_1; }
86  inline void setWTE2LaserDelay(int x) { m_emtc_2 = x; }
87  inline int getWTE2LaserDelay() const { return m_emtc_2; }
88  inline void setLaserPhase(int x) { m_emtc_3 = x; }
89  inline int getLaserPhase() const { return m_emtc_3; }
90  inline void setEMTCTTCIn(int x) { m_emtc_4 = x; }
91  inline int getEMTCTTCIn() const { return m_emtc_4; }
92  inline void setEMTCSlotId(int x) { m_emtc_5 = x; }
93  inline int getEMTCSlotId() const { return m_emtc_5; }
94 
95  // void setParameters(std::map<std::string,std::string> my_keys_map);
96 
97  // laser
98 
99  inline void setWaveLength(int x) { m_wave = x; }
100  inline int getWaveLength() const { return m_wave; }
101 
102  inline void setPower(int x) { m_power = x; }
103  inline int getPower() const { return m_power; }
104 
105  inline void setOpticalSwitch(int x) { m_switch = x; }
106  inline int getOpticalSwitch() const { return m_switch; }
107 
108  inline void setFilter(int x) { m_filter = x; }
109  inline int getFilter() const { return m_filter; }
110 
111  inline void setLaserControlOn(int x) { m_on = x; }
112  inline int getLaserControlOn() const { return m_on; }
113 
115  inline std::string getLaserControlHost() const { return m_laserhost; }
116 
117  inline void setLaserControlPort(int x) { m_laserport = x; }
118  inline int getLaserControlPort() const { return m_laserport; }
119 
120 
121 
122  inline void setLaserTag(std::string x) { m_laser_tag = x; }
123  inline std::string getLaserTag() const { return m_laser_tag ; }
124 
125 
126 
127  // new parameters
128 
129  inline void setWTE2LedDelay(int x) { m_wte_2_led_delay = x; }
130  inline int getWTE2LedDelay() const { return m_wte_2_led_delay; }
131 
132  inline void setLed1ON(int x) { m_led1_on = x; }
133  inline int getLed1ON() const { return m_led1_on; }
134 
135  inline void setLed2ON(int x) { m_led2_on = x; }
136  inline int getLed2ON() const { return m_led2_on; }
137 
138  inline void setLed3ON(int x) { m_led3_on = x; }
139  inline int getLed3ON() const { return m_led3_on; }
140 
141  inline void setLed4ON(int x) { m_led4_on = x; }
142  inline int getLed4ON() const { return m_led4_on; }
143 
144  inline void setVinj(int x) { m_vinj = x; }
145  inline int getVinj() const { return m_vinj; }
146 
148  inline int getOrangeLedMonAmpl() const { return m_orange_led_mon_ampl; }
149 
150  inline void setBlueLedMonAmpl(int x) { m_blue_led_mon_ampl = x; }
151  inline int getBlueLedMonAmpl() const { return m_blue_led_mon_ampl; }
152 
154  inline std::string getTrigLogFile() const { return m_trig_log_file; }
155 
156  inline void setLedControlON(int x) { m_led_control_on = x; }
157  inline int getLedControlON() const { return m_led_control_on; }
158 
161 
162  inline void setLedControlPort(int x) { m_led_control_port = x; }
163  inline int getLedControlPort() const { return m_led_control_port; }
164 
165  inline void setIRLaserPower(int x) { m_ir_laser_power = x; }
166  inline int getIRLaserPower() const { return m_ir_laser_power; }
167 
168  inline void setGreenLaserPower(int x) { m_green_laser_power = x; }
169  inline int getGreenLaserPower() const { return m_green_laser_power; }
170 
171  inline void setRedLaserPower(int x) { m_red_laser_power = x; }
172  inline int getRedLaserPower() const { return m_red_laser_power; }
173 
176 
178  inline int getIRLaserLogAttenuator() const { return m_ir_laser_log_attenuator; }
179 
182 
185 
188 
189  inline void setLaserClob(unsigned char* x) { m_laser_clob = x; }
190  inline unsigned char* getLaserClob() const { return m_laser_clob; }
191 
192  void setParameters(const std::map<std::string,std::string>& my_keys_map);
193 
194  int fetchNextId() noexcept(false);
195 
196  private:
197  void prepareWrite() noexcept(false) override;
198  void writeDB() noexcept(false);
199  void clear();
200  void fetchData(ODLaserConfig * result) noexcept(false);
201  int fetchID() noexcept(false);
202 
203 
204  // User data
205  int m_ID;
206 
207  // mataq
208  int m_dummy;
209  int m_debug;
215  int m_mq_fed;
230 
231  // emtc
232  int m_emtc_1;
233  int m_emtc_2;
234  int m_emtc_3;
235  int m_emtc_4;
236  int m_emtc_5;
237 
238  // laser
239  int m_wave;
240  int m_power;
241  int m_switch;
242  int m_filter;
243  int m_on;
246 
248 
249 
250  // led
252  int m_led1_on;
253  int m_led2_on ;
254  int m_led3_on ;
255  int m_led4_on ;
256  int m_vinj;
271  unsigned char* m_laser_clob ;
272  unsigned int m_size;
273 
274 
275 };
276 
277 #endif
void writeDB() noexcept(false)
int getLed2ON() const
int getMatacqVernierMin()
Definition: ODLaserConfig.h:60
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:31
std::string m_aqmode
void setDummy(int x)
Definition: ODLaserConfig.h:32
int getIRLaserLogAttenuator() const
std::string m_led_control_host
void setIRLaserLogAttenuator(int x)
void setLed1ON(int x)
int getBlueLaserLogAttenuator() const
void setChannelMask(int x)
Definition: ODLaserConfig.h:41
std::string getMatacqMode() const
Definition: ODLaserConfig.h:40
int getChannelMask() const
Definition: ODLaserConfig.h:42
int getLaserPhase() const
Definition: ODLaserConfig.h:89
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:45
void setLedControlHost(std::string x)
#define noexcept
std::string getMaxSamplesForDaq() const
Definition: ODLaserConfig.h:44
int getFilter() const
void setPedestalFile(std::string x)
Definition: ODLaserConfig.h:47
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:53
void setPower(int x)
std::string m_serial
int getLed1ON() const
int fetchNextId() noexcept(false)
void setMatacqNone(int x)
Definition: ODLaserConfig.h:37
int getIRLaserPower() const
void setTrigLogFile(std::string x)
int getEMTCNone() const
Definition: ODLaserConfig.h:85
int getLed3ON() const
int getWTE2LaserDelay() const
Definition: ODLaserConfig.h:87
int getRedLaserPower() const
int getMatacqVernierMax()
Definition: ODLaserConfig.h:58
void setEMTCSlotId(int x)
Definition: ODLaserConfig.h:92
void setMatacqBaseAddress(int x)
Definition: ODLaserConfig.h:35
void setGreenLaserLogAttenuator(int x)
int getLedControlON() const
int getLed4ON() const
void setMatacqVernierMin(int x)
Definition: ODLaserConfig.h:59
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:75
std::string getLedControlHost() const
void setMatacqAcquisitionMode(std::string x)
Definition: ODLaserConfig.h:77
std::string getMatacqAcquisitionMode() const
Definition: ODLaserConfig.h:78
void setRawDataMode(int x)
Definition: ODLaserConfig.h:74
int m_ir_laser_log_attenuator
void setEMTCNone(int x)
Definition: ODLaserConfig.h:84
void setLedControlON(int x)
std::string getHalStaticTableFile() const
Definition: ODLaserConfig.h:66
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:43
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:72
std::string getLaserControlHost() const
void setHalAddressTableFile(std::string x)
Definition: ODLaserConfig.h:62
int getFPMode() const
Definition: ODLaserConfig.h:54
int getRedLaserLogAttenuator() const
void setMatacqVernierMax(int x)
Definition: ODLaserConfig.h:57
std::string getPedestalFile() const
Definition: ODLaserConfig.h:48
void setLaserPhase(int x)
Definition: ODLaserConfig.h:88
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:93
int getOrangeLedMonAmpl() const
void setLaserConfigFile(std::string x)
void setMatacqMode(std::string x)
Definition: ODLaserConfig.h:39
void setPedestalRunEventCount(int x)
Definition: ODLaserConfig.h:71
void setWTE2LedDelay(int x)
void setLedControlPort(int x)
int getEMTCTTCIn() const
Definition: ODLaserConfig.h:91
int getMatacqNone() const
Definition: ODLaserConfig.h:38
int m_green_laser_log_attenuator
std::string getMatacqSerialNumber() const
Definition: ODLaserConfig.h:69
void setGreenLaserPower(int x)
void setUseBuffer(int x)
Definition: ODLaserConfig.h:49
int getDummy() const
Definition: ODLaserConfig.h:33
int getUseBuffer() const
Definition: ODLaserConfig.h:50
void setBlueLedMonAmpl(int x)
int m_matacq_vernier_max
std::string getLocalOutputFile() const
Definition: ODLaserConfig.h:81
std::string getTrigLogFile() const
int getWTE2LedDelay() const
void setLocalOutputFile(std::string x)
Definition: ODLaserConfig.h:80
void setPostTrig(int x)
Definition: ODLaserConfig.h:51
int getId() const
Definition: ODLaserConfig.h:25
int getMatacqBaseAddress() const
Definition: ODLaserConfig.h:36
void setWTE2LaserDelay(int x)
Definition: ODLaserConfig.h:86
unsigned char * m_laser_clob
int getVinj() const
void setMatacqSerialNumber(std::string x)
Definition: ODLaserConfig.h:68
std::string m_mq_file
void setHalModuleFile(std::string x)
Definition: ODLaserConfig.h:55
~ODLaserConfig() override
std::string getTable() override
Definition: ODLaserConfig.h:22
void setHalStaticTableFile(std::string x)
Definition: ODLaserConfig.h:65
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
void setEMTCTTCIn(int x)
Definition: ODLaserConfig.h:90
std::string m_trig_log_file
void setDebug(int x)
Definition: ODLaserConfig.h:30
void setWaveLength(int x)
Definition: ODLaserConfig.h:99
std::string getHalAddressTableFile() const
Definition: ODLaserConfig.h:63
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:46
std::string getHalModuleFile() const
Definition: ODLaserConfig.h:56
void fetchData(ODLaserConfig *result) noexcept(false)
int getPostTrig() const
Definition: ODLaserConfig.h:52