DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::sspmodules::SSPLEDCalibWrapper Class Reference

#include <SSPLEDCalibWrapper.hpp>

Collaboration diagram for dunedaq::sspmodules::SSPLEDCalibWrapper:
[legend]

Public Types

using data_t = nlohmann::json
 

Public Member Functions

 SSPLEDCalibWrapper ()
 SSPLEDCalibWrapper Constructor.
 
 ~SSPLEDCalibWrapper ()
 
 SSPLEDCalibWrapper (const SSPLEDCalibWrapper &)=delete
 SSPLEDCalibWrapper is not copy-constructible.
 
SSPLEDCalibWrapperoperator= (const SSPLEDCalibWrapper &)=delete
 SSPLEDCalibWrapper is not copy-assignable.
 
 SSPLEDCalibWrapper (SSPLEDCalibWrapper &&)=delete
 SSPLEDCalibWrapper is not move-constructible.
 
SSPLEDCalibWrapperoperator= (SSPLEDCalibWrapper &&)=delete
 SSPLEDCalibWrapper is not move-assignable.
 
void init (const appmodel::SSPLEDCalibModule *mcfg)
 
void conf (const appmodel::SSPLEDCalibModule *mcfg)
 
void start (const data_t &args)
 
void stop (const data_t &args)
 

Private Member Functions

void validate_config (const data_t &args)
 
void configure_single_pulse ()
 
void configure_burst_mode ()
 
void manual_configure_device (const std::vector< const appmodel::SSPRegister * > &hw_conf)
 

Private Attributes

dunedaq::sspmodules::DeviceInterfacem_device_interface
 
std::atomic< bool > m_run_marker
 
std::atomic< bool > m_configure
 
unsigned int m_board_id {0}
 
unsigned long m_board_ip
 
unsigned int m_partition_number {0}
 
unsigned int m_timing_address {0}
 
unsigned long m_module_id
 
bool m_burst_mode = false
 
bool m_double_pulse = false
 
bool m_single_pulse = false
 
unsigned int m_number_channels {12}
 
unsigned int m_channel_mask {4095}
 
unsigned int m_burst_count {1}
 
unsigned int m_double_pulse_delay_ticks {0}
 
unsigned int m_pulse1_width_ticks {0}
 
unsigned int m_pulse2_width_ticks {0}
 
unsigned int m_pulse_bias_percent_270nm {0}
 
unsigned int m_pulse_bias_percent_367nm {0}
 
std::string m_instance_name_for_metrics
 

Detailed Description

Definition at line 26 of file SSPLEDCalibWrapper.hpp.

Member Typedef Documentation

◆ data_t

Definition at line 40 of file SSPLEDCalibWrapper.hpp.

Constructor & Destructor Documentation

◆ SSPLEDCalibWrapper() [1/3]

dunedaq::sspmodules::SSPLEDCalibWrapper::SSPLEDCalibWrapper ( )

SSPLEDCalibWrapper Constructor.

Parameters
nameInstance name for this CardWrapper instance

Definition at line 29 of file SSPLEDCalibWrapper.cpp.

31 , m_run_marker{ false }
32{
33}
dunedaq::sspmodules::DeviceInterface * m_device_interface

◆ ~SSPLEDCalibWrapper()

dunedaq::sspmodules::SSPLEDCalibWrapper::~SSPLEDCalibWrapper ( )

Definition at line 35 of file SSPLEDCalibWrapper.cpp.

36{
37}

◆ SSPLEDCalibWrapper() [2/3]

dunedaq::sspmodules::SSPLEDCalibWrapper::SSPLEDCalibWrapper ( const SSPLEDCalibWrapper & )
delete

SSPLEDCalibWrapper is not copy-constructible.

◆ SSPLEDCalibWrapper() [3/3]

dunedaq::sspmodules::SSPLEDCalibWrapper::SSPLEDCalibWrapper ( SSPLEDCalibWrapper && )
delete

SSPLEDCalibWrapper is not move-constructible.

Member Function Documentation

◆ conf()

void dunedaq::sspmodules::SSPLEDCalibWrapper::conf ( const appmodel::SSPLEDCalibModule * mcfg)

Definition at line 83 of file SSPLEDCalibWrapper.cpp.

84{
85 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::conf called." << std::endl;
86
87 try {
88 m_device_interface->ConfigureLEDCalib(conf); //This sets up the ethernet interface and make sure that the pdts is synched
90 //m_device_interface->SetRegisterByName("eventDataInterfaceSelect", m_cfg.interface_type);
91 } catch (const std::exception & e) {
92 throw FailedLEDCalibrationConf(ERS_HERE, e);
93 }
94
95 if ( conf->get_pulse_mode() == "single") {
96 m_single_pulse = true;
97 TLOG(TLVL_FULL_DEBUG) << "SSPLEDCalibWrapper: I think that you want SSP LED Calib module to be in single pulse..." << std::endl;
98 } else if ( conf->get_pulse_mode() == "burst") {
99 m_burst_mode = true;
100 TLOG(TLVL_FULL_DEBUG) << "SSPLEDCalibWrapper: I think that you want SSP LED Calib module to be in BURST MODE..." << std::endl;
101 }
102
103 if ( (m_single_pulse && m_burst_mode) ) {
104 std::stringstream ss;
105 ss << "ERROR: SOMEHOW ENDED UP WITH SEVERAL PULSE MODES SET ON!!!!" << std::endl;
106 TLOG() << ss.str();
107 throw ConfigurationError(ERS_HERE, ss.str());
108 }
109
110 if (m_burst_mode) {
111 TLOG(TLVL_FULL_DEBUG) << "SSPLEDCalibWrapper: Configuring for BURST MODE..." << std::endl;
112 this->configure_burst_mode();
113 } else if (m_single_pulse) {
114 TLOG(TLVL_FULL_DEBUG) << "SSPLEDCalibWrapper: Configuring for single pulse mode..." << std::endl;
116 } else {
117 std::stringstream ss;
118 ss << "ERROR: SOMEHOW ENDED UP WITH NO PULSE MODES SET ON!!!!" << std::endl;
119 TLOG() << ss.str();
120 throw ConfigurationError(ERS_HERE, ss.str());
121 }
122
123 //if there are "literal" entries in the configuration they are explicit writes to the specified register with given value
124 //these literal entries are paresed and applied last after any other parameters so this method call needs to be after the
125 //other configuration calls
126 this->manual_configure_device(conf->get_hardware_configuration());
127
128 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::conf complete.";
129}
@ TLVL_FULL_DEBUG
#define ERS_HERE
void SetRegisterByName(std::string name, unsigned int value)
void ConfigureLEDCalib(const appmodel::SSPLEDCalibModule *conf)
void manual_configure_device(const std::vector< const appmodel::SSPRegister * > &hw_conf)
void conf(const appmodel::SSPLEDCalibModule *mcfg)
#define TLVL_ENTER_EXIT_METHODS
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112
#define TLOG(...)
Definition macro.hpp:22
ConfigurationError
Definition util.hpp:27

◆ configure_burst_mode()

void dunedaq::sspmodules::SSPLEDCalibWrapper::configure_burst_mode ( )
private

Definition at line 258 of file SSPLEDCalibWrapper.cpp.

259{
260 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureBurstMode called.";
261
262 m_device_interface->SetRegister(0x80000464, 0x000002E7); //pdts_cmd_control_1
263 m_device_interface->SetRegister(0x80000940, 0x00030036); //pdts_cmd_delay_0
264 m_device_interface->SetRegister(0x80000944, 0x00030036); //pdts_cmd_delay_1
265 m_device_interface->SetRegister(0x80000948, 0x00030036); //pdts_cmd_delay_2
266 m_device_interface->SetRegister(0x8000094C, 0x00030036); //pdts_cmd_delay_3
267 m_device_interface->SetRegister(0x80000950, 0x00030036); //pdts_cmd_delay_4
268 m_device_interface->SetRegister(0x80000954, 0x00030036); //pdts_cmd_delay_5
269 m_device_interface->SetRegister(0x80000958, 0x00030036); //pdts_cmd_delay_6
270 m_device_interface->SetRegister(0x8000095C, 0x00030036); //pdts_cmd_delay_7
271 m_device_interface->SetRegister(0x80000960, 0x00030036); //pdts_cmd_delay_8
272 m_device_interface->SetRegister(0x80000964, 0x00030036); //pdts_cmd_delay_9
273 m_device_interface->SetRegister(0x80000968, 0x00030036); //pdts_cmd_delay_10
274 m_device_interface->SetRegister(0x8000096C, 0x00030036); //pdts_cmd_delay_11
275 m_device_interface->SetRegister(0x80000970, 0x00030036); //pdts_cmd_delay_12
276 m_device_interface->SetRegister(0x80000974, 0x00030036); //pdts_cmd_delay_13
277 m_device_interface->SetRegister(0x80000978, 0x00030036); //pdts_cmd_delay_14
278 m_device_interface->SetRegister(0x8000097C, 0x00030036); //pdts_cmd_delay_15
279 m_device_interface->SetRegister(0x80000468, 0x80000000); //pdts_cmd_control_2
280 m_device_interface->SetRegister(0x80000520, 0x00000011); //pulser_mode_control
281 m_device_interface->SetRegister(0x80000448, m_burst_count); //cal_count
282
283 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureBurstMode completed.";
284}
void SetRegister(unsigned int address, unsigned int value, unsigned int mask=0xFFFFFFFF)

◆ configure_single_pulse()

void dunedaq::sspmodules::SSPLEDCalibWrapper::configure_single_pulse ( )
private

Definition at line 229 of file SSPLEDCalibWrapper.cpp.

230{
231 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureSinglePulse called.";
232
233 m_device_interface->SetRegister(0x80000464, 0x000002E7); //pdts_cmd_control_1
234 m_device_interface->SetRegister(0x80000940, 0x00030036); //pdts_cmd_delay_0
235 m_device_interface->SetRegister(0x80000944, 0x00030036); //pdts_cmd_delay_1
236 m_device_interface->SetRegister(0x80000948, 0x00030036); //pdts_cmd_delay_2
237 m_device_interface->SetRegister(0x8000094C, 0x00030036); //pdts_cmd_delay_3
238 m_device_interface->SetRegister(0x80000950, 0x00030036); //pdts_cmd_delay_4
239 m_device_interface->SetRegister(0x80000954, 0x00030036); //pdts_cmd_delay_5
240 m_device_interface->SetRegister(0x80000958, 0x00030036); //pdts_cmd_delay_6
241 m_device_interface->SetRegister(0x8000095C, 0x00030036); //pdts_cmd_delay_7
242 m_device_interface->SetRegister(0x80000960, 0x00030036); //pdts_cmd_delay_8
243 m_device_interface->SetRegister(0x80000964, 0x00030036); //pdts_cmd_delay_9
244 m_device_interface->SetRegister(0x80000968, 0x00030036); //pdts_cmd_delay_10
245 m_device_interface->SetRegister(0x8000096C, 0x00030036); //pdts_cmd_delay_11
246 m_device_interface->SetRegister(0x80000970, 0x00030036); //pdts_cmd_delay_12
247 m_device_interface->SetRegister(0x80000974, 0x00030036); //pdts_cmd_delay_13
248 m_device_interface->SetRegister(0x80000978, 0x00030036); //pdts_cmd_delay_14
249 m_device_interface->SetRegister(0x8000097C, 0x00030036); //pdts_cmd_delay_15
250 m_device_interface->SetRegister(0x80000468, 0x80000000); //pdts_cmd_control_2
251 m_device_interface->SetRegister(0x80000520, 0x00000011); //pulser_mode_control
252 m_device_interface->SetRegister(0x80000448, 0x00000001); //cal_count
253
254 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureSinglePulse completed.";
255}

◆ init()

void dunedaq::sspmodules::SSPLEDCalibWrapper::init ( const appmodel::SSPLEDCalibModule * mcfg)

Definition at line 40 of file SSPLEDCalibWrapper.cpp.

41{
42 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::init called." << std::endl;
43
44 m_number_channels = conf->get_number_channels();
45 m_channel_mask = conf->get_channel_mask();
46 m_burst_count = conf->get_burst_count();
47 m_double_pulse_delay_ticks = conf->get_double_pulse_delay_ticks();
48 m_pulse1_width_ticks = conf->get_pulse1_width_ticks();
49 m_pulse2_width_ticks = conf->get_pulse2_width_ticks();
50 m_pulse_bias_percent_270nm = conf->get_pulse_bias_percent_270nm();
51 m_pulse_bias_percent_367nm = conf->get_pulse_bias_percent_367nm();
52
53 m_board_id = conf->get_board_id();
54 m_module_id = conf->get_module_id();
55 m_instance_name_for_metrics = "SSP LED Calib " + std::to_string(m_board_id);
56 m_partition_number =conf->get_partition_number(); // this should be 0-3
57
58 m_timing_address = conf->get_timing_address(); // 0x20 is default for 101, 0x2B for 304, and 0x36 for 603
59 if (m_timing_address > 0xff) {
60 std::stringstream ss;
61 ss << "Error: Incorrect timing address set (" << m_timing_address << ")!" << std::endl;
62 TLOG() << ss.str();
63 throw ConfigurationError(ERS_HERE, ss.str());
64 }
65
66 TLOG_DEBUG(TLVL_WORK_STEPS) << "Board ID is listed as: " << m_board_id << std::endl
67 << "Partition Number is: " << m_partition_number << std::endl
68 << "Timing Address is: " << m_timing_address << std::endl
69 << "Module ID is: " << m_module_id << std::endl;
70
71 try {
75 } catch (const std::exception & e) {
77 }
78
79 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::init complete.";
80}
FailedLEDCalibrationInit
Definition SSPIssues.hpp:21

◆ manual_configure_device()

void dunedaq::sspmodules::SSPLEDCalibWrapper::manual_configure_device ( const std::vector< const appmodel::SSPRegister * > & hw_conf)
private

Definition at line 287 of file SSPLEDCalibWrapper.cpp.

288{
289 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureDevice called.";
290 TLOG(TLVL_FULL_DEBUG) << "SSPLEDCalibWrapper: Processing the Hardware Configuration list..." << std::endl;
291 for (auto regValuesIter : hw_conf) {
292 std::string m_name = regValuesIter->get_name();
293 unsigned int regAddr = regValuesIter->get_address();
294 unsigned int regVal = regValuesIter->get_value();
295 unsigned int regMask = regValuesIter->get_mask();
296 m_device_interface->SetRegister(regAddr, regVal, regMask);
297 }
298 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::ConfigureDevice complete.";
299} // NOLINT(readability/fn_size)

◆ operator=() [1/2]

SSPLEDCalibWrapper & dunedaq::sspmodules::SSPLEDCalibWrapper::operator= ( const SSPLEDCalibWrapper & )
delete

SSPLEDCalibWrapper is not copy-assignable.

◆ operator=() [2/2]

SSPLEDCalibWrapper & dunedaq::sspmodules::SSPLEDCalibWrapper::operator= ( SSPLEDCalibWrapper && )
delete

SSPLEDCalibWrapper is not move-assignable.

◆ start()

void dunedaq::sspmodules::SSPLEDCalibWrapper::start ( const data_t & args)

Definition at line 132 of file SSPLEDCalibWrapper.cpp.

133{
134 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Start pulsing SSPLEDCalibWrapper of card " << m_board_id << "...";
135
136 if (m_run_marker.load()) {
137 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Run Marker says that SSPLEDCalibWrapper card " << m_board_id << " is already pulsing...";
138 return;
139 }
140
141 unsigned int base_bias_regAddress = 0x40000340;
142 unsigned int base_timing_regAddress = 0x800003C0;
143
144 if (m_number_channels == 5) {
145 base_bias_regAddress = 0x4000035C;
146 base_timing_regAddress = 0x800003DC;
147 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Configuring board with 5 channels..." ;
148 } else if (m_number_channels == 12) {
149 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Configuring board with 12 channels..." ;
150 } else {
151 std::stringstream ss;
152 ss << "ERROR: SOMEHOW ENDED UP WITHOUT NUMBER OF CHANNELS SET!!!!" << std::endl;
153 TLOG() << ss.str();
154 throw ConfigurationError(ERS_HERE, ss.str());
155 }
156
157 unsigned int pulse_bias_setting_270nm = ( m_pulse_bias_percent_270nm);
158 unsigned int pulse_bias_setting_367nm = ( m_pulse_bias_percent_367nm/2);
159
160 for (unsigned int counter = 0; counter < m_number_channels ; counter++) {
161 unsigned int bias_regAddress = base_bias_regAddress + 0x4*(counter); //0x40000340 - 0x4000036C
162 unsigned int bias_regVal = 0x00040000;
163 unsigned int timing_regAddress = base_timing_regAddress + 0x4*(counter); //0x80003C0 - 0x800003EC
164 unsigned int timing_regVal = 0x0; //the highest byte sets 8 (pdts trigger) + 1 (953.5 Hz) for burst mode, but 8 (pdts trigger) + 7 (single shot) for single
165 if (m_single_pulse) {
166 timing_regVal = 0xF0000000;
167 } else if (m_burst_mode) {
168 timing_regVal = 0x90000000;
169 }
170
171 TLOG(TLVL_FULL_DEBUG) << "Channel map is 0x" << std::hex << m_channel_mask << " and the comparison is 0x" << (1 << counter ) << std::endl;
172 if ( (m_channel_mask & ( (unsigned int)1 << counter)) == ((unsigned int)1 << counter) ) {
173 if ( counter < 6) {
174 bias_regVal = bias_regVal + pulse_bias_setting_270nm;
175 } else {
176 bias_regVal = bias_regVal + pulse_bias_setting_367nm;
177 }
178 timing_regVal = timing_regVal + m_pulse1_width_ticks;
179 timing_regVal = timing_regVal + (m_pulse2_width_ticks << 8);
180 timing_regVal = timing_regVal + (m_double_pulse_delay_ticks << 16);
181 TLOG(TLVL_FULL_DEBUG) << "Will turn on " << std::dec << counter << " channel at bias register 0x" << std::hex << bias_regAddress << " with bias value 0x" << bias_regVal << std::endl;
182 TLOG(TLVL_FULL_DEBUG) << " and set the width regsiter 0x" << std::hex << timing_regAddress << " to value of 0x" << timing_regVal << std::dec << std::endl;
183 m_device_interface->SetRegister(bias_regAddress, bias_regVal); //BIAS_DAC_CONFIG_N
184 if ( (counter == 7) && ! ( (m_channel_mask & ( (unsigned int)1 << counter)) == ((unsigned int)1 << (counter-1) ) ) ) {
185 //this is a really convoluted situation where for the very specific 12 channel board that arrived at CERN in June 2022
186 //the bias for channel 7 was not working and so the bias is taken from channel 6
187 //which means that if channel 7 is to be turned on while channel 6 is masked off
188 //you still have to bias channel 6 in order for the led on channel 7 to emmit light
189 m_device_interface->SetRegister((bias_regAddress - 0x4), bias_regVal); //BIAS_DAC_CONFIG_N
190 }
191
192 m_device_interface->SetRegister(timing_regAddress, timing_regVal); //cal_CONFIG_N
193 } else {
194 TLOG(TLVL_FULL_DEBUG) << "Will turn off channel " << std::dec << counter << " at timing register 0x" << std::hex << timing_regAddress << std::dec << std::endl;
195 m_device_interface->SetRegister(bias_regAddress, 0x0); //BIAS_DAC_CONFIG_N
196 m_device_interface->SetRegister(timing_regAddress, 0x0); //cal_CONFIG_N
197 }
198 }
199
200 m_device_interface->SetRegister(0x40000300, 0x1); //writing 0x1 to this register applies the bias voltage settings
201
202 m_run_marker = true;
203 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Start pulsing SSPLEDCalibWrapper of card " << m_board_id << " complete.";
204}

◆ stop()

void dunedaq::sspmodules::SSPLEDCalibWrapper::stop ( const data_t & args)

Definition at line 207 of file SSPLEDCalibWrapper.cpp.

208{
209
210 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Stop pulsing SSPLEDCalibWrapper of card " << m_board_id << "...";
211 if (!m_run_marker.load()) {
212 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "The run_marker says that SSPLEDCalibWrapper card " << m_board_id << " is already stopped, but stopping anyways...";
213 }
214
215 for (unsigned int counter = 0; counter < 12; counter++) { //switch this to 12 for a 12 channel SSP
216 unsigned int bias_regAddress = 0x40000340 + 0x4*(counter);
217 unsigned int timing_regAddress = 0x800003c0 + 0x4*(counter);
218 m_device_interface->SetRegister(bias_regAddress, 0x00000000); //BIAS_DAC_CONFIG_N
219 m_device_interface->SetRegister(timing_regAddress, 0x00000000); //cal_CONFIG_N
220 }
221
222 m_device_interface->SetRegister(0x40000300, 0x1); //writing 0x1 to this register applies the bias voltage settings
223
224 m_run_marker = false;
225 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "Stop pulsing SSPLEDCalibWrapper of card " << m_board_id << " complete.";
226}

◆ validate_config()

void dunedaq::sspmodules::SSPLEDCalibWrapper::validate_config ( const data_t & args)
private

Definition at line 302 of file SSPLEDCalibWrapper.cpp.

303{
304 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::validate_config called.";
305
306 if ( ! ( (m_number_channels == 5) || (m_number_channels == 12) ) ) {
307 std::stringstream ss;
308 ss << "ERROR: Incorrect number_channels value " << m_number_channels << " is not equal to 5 or 12!!!" << std::endl;
309 TLOG() << ss.str();
310 throw ConfigurationError(ERS_HERE, ss.str());
311 }
312
313 if (m_channel_mask > 4095) {
314 std::stringstream ss;
315 ss << "ERROR: Incorrect channel_maks value " << m_channel_mask << " is higher than the limit of 4095!!!" << std::endl;
316 TLOG() << ss.str();
317 throw ConfigurationError(ERS_HERE, ss.str());
318 }
319
320 if (!( m_single_pulse || m_burst_mode ) ) {
321 std::stringstream ss;
322 ss << "ERROR: Incorrect pulse_mode value. Neither single or burst."
323 << std::endl;
324 TLOG() << ss.str();
325 throw ConfigurationError(ERS_HERE, ss.str());
326 }
327
328 if (m_double_pulse_delay_ticks > 4095) {
329 std::stringstream ss;
330 ss << "ERROR: Strange!! double_pulse_delay_ticks value is " << m_double_pulse_delay_ticks << ", which is greater than the limit of 4095"
331 << std::endl;
332 TLOG() << ss.str();
333 //throw ConfigurationError(ERS_HERE, ss.str());
334 }
335
336 if (m_burst_count > 10000) {
337 std::stringstream ss;
338 ss << "ERROR: Strange!! burst_count value is " << m_burst_count << ", which is more time than in a drift readout window"
339 << std::endl;
340 TLOG() << ss.str();
341 //throw ConfigurationError(ERS_HERE, ss.str());
342 }
343
344 if (m_pulse1_width_ticks > 255) {
345 std::stringstream ss;
346 ss << "ERROR: Incorrect pulse1_width_ticks value is " << m_pulse1_width_ticks << ", which is greater than the limit of 255!!!"
347 << std::endl;
348 TLOG() << ss.str();
349 throw ConfigurationError(ERS_HERE, ss.str());
350 }
351
352 if (m_pulse2_width_ticks > 255) {
353 std::stringstream ss;
354 ss << "ERROR: Incorrect pulse2_width_ticks value is " << m_pulse2_width_ticks << ", which is greater than the limit of 255!!!"
355 << std::endl;
356 TLOG() << ss.str();
357 throw ConfigurationError(ERS_HERE, ss.str());
358 }
359
360 if (m_pulse_bias_percent_270nm > 4095) {
361 std::stringstream ss;
362 ss << "ERROR: Incorrect pulse_bias_percent_270nm value is " << m_pulse_bias_percent_270nm << ", which is greater than 100 percent!!!"
363 << std::endl;
364 TLOG() << ss.str();
365 throw ConfigurationError(ERS_HERE, ss.str());
366 }
367
368 if (m_pulse_bias_percent_367nm > 4095) {
369 std::stringstream ss;
370 ss << "ERROR: Incorrect pulse_bias_percent_367nm value is " << m_pulse_bias_percent_367nm << ", which is greater than 100 percent!!!"
371 << std::endl;
372 TLOG() << ss.str();
373 throw ConfigurationError(ERS_HERE, ss.str());
374 }
375
376 TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << "SSPLEDCalibWrapper::validate_config complete.";
377}

Member Data Documentation

◆ m_board_id

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_board_id {0}
private

Definition at line 55 of file SSPLEDCalibWrapper.hpp.

55{0}; // this is the ID of the SSP board

◆ m_board_ip

unsigned long dunedaq::sspmodules::SSPLEDCalibWrapper::m_board_ip
private

Definition at line 56 of file SSPLEDCalibWrapper.hpp.

◆ m_burst_count

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_burst_count {1}
private

Definition at line 65 of file SSPLEDCalibWrapper.hpp.

65{1};

◆ m_burst_mode

bool dunedaq::sspmodules::SSPLEDCalibWrapper::m_burst_mode = false
private

Definition at line 60 of file SSPLEDCalibWrapper.hpp.

◆ m_channel_mask

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_channel_mask {4095}
private

Definition at line 64 of file SSPLEDCalibWrapper.hpp.

64{4095};

◆ m_configure

std::atomic<bool> dunedaq::sspmodules::SSPLEDCalibWrapper::m_configure
private

Definition at line 52 of file SSPLEDCalibWrapper.hpp.

◆ m_device_interface

dunedaq::sspmodules::DeviceInterface* dunedaq::sspmodules::SSPLEDCalibWrapper::m_device_interface
private

Definition at line 48 of file SSPLEDCalibWrapper.hpp.

◆ m_double_pulse

bool dunedaq::sspmodules::SSPLEDCalibWrapper::m_double_pulse = false
private

Definition at line 61 of file SSPLEDCalibWrapper.hpp.

◆ m_double_pulse_delay_ticks

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_double_pulse_delay_ticks {0}
private

Definition at line 66 of file SSPLEDCalibWrapper.hpp.

66{0};

◆ m_instance_name_for_metrics

std::string dunedaq::sspmodules::SSPLEDCalibWrapper::m_instance_name_for_metrics
private

Definition at line 72 of file SSPLEDCalibWrapper.hpp.

◆ m_module_id

unsigned long dunedaq::sspmodules::SSPLEDCalibWrapper::m_module_id
private

Definition at line 59 of file SSPLEDCalibWrapper.hpp.

◆ m_number_channels

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_number_channels {12}
private

Definition at line 63 of file SSPLEDCalibWrapper.hpp.

63{12};

◆ m_partition_number

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_partition_number {0}
private

Definition at line 57 of file SSPLEDCalibWrapper.hpp.

57{0};

◆ m_pulse1_width_ticks

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_pulse1_width_ticks {0}
private

Definition at line 67 of file SSPLEDCalibWrapper.hpp.

67{0};

◆ m_pulse2_width_ticks

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_pulse2_width_ticks {0}
private

Definition at line 68 of file SSPLEDCalibWrapper.hpp.

68{0};

◆ m_pulse_bias_percent_270nm

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_pulse_bias_percent_270nm {0}
private

Definition at line 69 of file SSPLEDCalibWrapper.hpp.

69{0};

◆ m_pulse_bias_percent_367nm

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_pulse_bias_percent_367nm {0}
private

Definition at line 70 of file SSPLEDCalibWrapper.hpp.

70{0};

◆ m_run_marker

std::atomic<bool> dunedaq::sspmodules::SSPLEDCalibWrapper::m_run_marker
private

Definition at line 51 of file SSPLEDCalibWrapper.hpp.

◆ m_single_pulse

bool dunedaq::sspmodules::SSPLEDCalibWrapper::m_single_pulse = false
private

Definition at line 62 of file SSPLEDCalibWrapper.hpp.

◆ m_timing_address

unsigned int dunedaq::sspmodules::SSPLEDCalibWrapper::m_timing_address {0}
private

Definition at line 58 of file SSPLEDCalibWrapper.hpp.

58{0};

The documentation for this class was generated from the following files: