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  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;
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;
264  unsigned char* m_laser_clob;
265  unsigned int m_size;
266 };
267 
268 #endif
void writeDB() noexcept(false)
int getMatacqVernierMin()
Definition: ODLaserConfig.h:59
void prepareWrite() noexcept(false) override
void setLaserClob(unsigned char *x)
void setFilter(int x)
std::string m_mode
std::string m_aqmode
void setDummy(int x)
Definition: ODLaserConfig.h:31
int getBlueLedMonAmpl() const
int getPower() const
int getRedLaserPower() const
int getLedControlON() const
std::string m_led_control_host
void setIRLaserLogAttenuator(int x)
void setLed1ON(int x)
void setChannelMask(int x)
Definition: ODLaserConfig.h:40
std::string getHalAddressTableFile() const
Definition: ODLaserConfig.h:62
int getDebug() const
Definition: ODLaserConfig.h:30
int m_matacq_vernier_min
int getEMTCSlotId() const
Definition: ODLaserConfig.h:92
void setOrangeLedMonAmpl(int x)
int getOrangeLedMonAmpl() const
int m_orange_led_mon_ampl
std::string getMatacqAcquisitionMode() const
Definition: ODLaserConfig.h:77
int getLed4ON() const
int getOpticalSwitch() const
void setSize(unsigned int id)
Definition: ODLaserConfig.h:26
void setMatacqFedId(int x)
Definition: ODLaserConfig.h:44
void setLedControlHost(std::string x)
int getUseBuffer() const
Definition: ODLaserConfig.h:49
void setPedestalFile(std::string x)
Definition: ODLaserConfig.h:46
std::string getHalStaticTableFile() const
Definition: ODLaserConfig.h:65
std::string m_hal_add_file
void setParameters(const std::map< std::string, std::string > &my_keys_map)
int getMatacqNone() const
Definition: ODLaserConfig.h:37
void setOpticalSwitch(int x)
void setFPMode(int x)
Definition: ODLaserConfig.h:52
void setPower(int x)
std::string getLaserControlHost() const
int getRawDataMode() const
Definition: ODLaserConfig.h:74
std::string m_serial
int fetchNextId() noexcept(false)
int getLaserControlPort() const
void setMatacqNone(int x)
Definition: ODLaserConfig.h:36
void setTrigLogFile(std::string x)
std::string getLaserTag() const
int getWTE2LaserDelay() const
Definition: ODLaserConfig.h:86
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)
void setMatacqVernierMin(int x)
Definition: ODLaserConfig.h:58
std::string getLaserConfigFile() const
int getMatacqFedId() const
Definition: ODLaserConfig.h:45
void setLed2ON(int x)
int fetchID() noexcept(false)
int getIRLaserPower() const
void setLaserControlHost(std::string x)
int getEMTCTTCIn() const
Definition: ODLaserConfig.h:90
void setRedLaserPower(int x)
void setMatacqAcquisitionMode(std::string x)
Definition: ODLaserConfig.h:76
void setRawDataMode(int x)
Definition: ODLaserConfig.h:73
int getVinj() const
int getIRLaserLogAttenuator() const
int getLed2ON() const
int m_ir_laser_log_attenuator
void setEMTCNone(int x)
Definition: ODLaserConfig.h:83
void setLedControlON(int x)
void setVinj(int x)
std::string getTrigLogFile() const
void setBlueLaserLogAttenuator(int x)
std::string m_laser_tag
int getPedestalRunEventCount() const
Definition: ODLaserConfig.h:71
void setLed4ON(int x)
void setIRLaserPower(int x)
void setMaxSamplesForDaq(std::string x)
Definition: ODLaserConfig.h:42
int getLaserControlOn() const
void setRedLaserLogAttenuator(int x)
void setId(int id)
Definition: ODLaserConfig.h:24
void setLed3ON(int x)
int getRedLaserLogAttenuator() const
int getFilter() const
std::string m_laserhost
std::string getLedControlHost() const
void setHalAddressTableFile(std::string x)
Definition: ODLaserConfig.h:61
std::string getHalModuleFile() const
Definition: ODLaserConfig.h:55
int getWTE2LedDelay() const
unsigned int getSize() const
Definition: ODLaserConfig.h:27
void setMatacqVernierMax(int x)
Definition: ODLaserConfig.h:56
std::string getLocalOutputFile() const
Definition: ODLaserConfig.h:80
void setLaserPhase(int x)
Definition: ODLaserConfig.h:87
unsigned int m_size
std::string m_laser_config_file
unsigned char * getLaserClob() const
std::string m_ped_file
void setLaserTag(std::string x)
int getGreenLaserPower() const
std::string getMatacqMode() const
Definition: ODLaserConfig.h:39
std::string getMaxSamplesForDaq() const
Definition: ODLaserConfig.h:43
void setLaserConfigFile(std::string x)
void setMatacqMode(std::string x)
Definition: ODLaserConfig.h:38
void setPedestalRunEventCount(int x)
Definition: ODLaserConfig.h:70
int getLed3ON() const
void setWTE2LedDelay(int x)
void setLedControlPort(int x)
int m_green_laser_log_attenuator
void setGreenLaserPower(int x)
void setUseBuffer(int x)
Definition: ODLaserConfig.h:48
void setBlueLedMonAmpl(int x)
int m_matacq_vernier_max
std::string getMatacqSerialNumber() const
Definition: ODLaserConfig.h:68
void setLocalOutputFile(std::string x)
Definition: ODLaserConfig.h:79
int getFPMode() const
Definition: ODLaserConfig.h:53
int getLedControlPort() const
void setPostTrig(int x)
Definition: ODLaserConfig.h:50
void setWTE2LaserDelay(int x)
Definition: ODLaserConfig.h:85
int getMatacqBaseAddress() const
Definition: ODLaserConfig.h:35
unsigned char * m_laser_clob
void setMatacqSerialNumber(std::string x)
Definition: ODLaserConfig.h:67
int getBlueLaserLogAttenuator() const
std::string m_mq_file
int getWaveLength() const
Definition: ODLaserConfig.h:99
void setHalModuleFile(std::string x)
Definition: ODLaserConfig.h:54
~ODLaserConfig() override
int getEMTCNone() const
Definition: ODLaserConfig.h:84
std::string getTable() override
Definition: ODLaserConfig.h:22
std::string getPedestalFile() const
Definition: ODLaserConfig.h:47
int getChannelMask() const
Definition: ODLaserConfig.h:41
void setHalStaticTableFile(std::string x)
Definition: ODLaserConfig.h:64
int getPostTrig() const
Definition: ODLaserConfig.h:51
int getLaserPhase() const
Definition: ODLaserConfig.h:88
std::string m_hal_mod_file
int getDummy() const
Definition: ODLaserConfig.h:32
void setLaserControlOn(int x)
std::string m_hal_tab_file
int m_blue_laser_log_attenuator
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 m_samples
int m_red_laser_log_attenuator
void setLaserControlPort(int x)
int getLed1ON() const
void fetchData(ODLaserConfig *result) noexcept(false)
int getId() const
Definition: ODLaserConfig.h:25
int getGreenLaserLogAttenuator() const