9 #ifndef SBNOBJ_COMMON_PMT_DATA_V1730CONFIGURATION_H
10 #define SBNOBJ_COMMON_PMT_DATA_V1730CONFIGURATION_H
24 struct V1730Configuration;
27 std::ostream&
operator<<
55 unsigned int boardID = std::numeric_limits<unsigned int>::max();
58 unsigned int fragmentID = std::numeric_limits<unsigned int>::max();
73 std::vector<sbn::V1730channelConfiguration>
channels;
100 #if __cplusplus < 202004L
108 # error "With C++20 support, enable the default comparison operators"
144 void dump(std::ostream& out,
145 std::string
const& indent, std::string
const& firstIndent,
158 void dump(std::ostream& out, std::string
const& indent =
"")
const
159 {
dump(out, indent, indent); }
171 unsigned int verbosity,
172 std::string
const& indent =
""
174 {
dump(out, indent, indent, verbosity); }
195 {
return static_cast<unsigned int>(postTriggerFrac * bufferLength); }
200 {
return ticks2us(bufferLength); }
205 {
return ticks2us(preTriggerTicks()); }
210 {
return ticks2us(postTriggerTicks()); }
214 inline bool sbn::V1730Configuration::operator==
218 if (boardName != other.boardName )
return false;
219 if (boardID != other.boardID )
return false;
220 if (fragmentID != other.fragmentID )
return false;
221 if (bufferLength != other.bufferLength )
return false;
222 if (postTriggerFrac != other.postTriggerFrac )
return false;
223 if (useTimeTagForTimeStamp != other.useTimeTagForTimeStamp)
return false;
224 if (nChannels != other.nChannels )
return false;
225 if (channels != other.channels )
return false;
232 inline std::ostream& sbn::operator<<
234 { config.dump(out);
return out; }
239 #endif // SBNOBJ_COMMON_PMT_DATA_V1730CONFIGURATION_H
std::string boardName
Name (mnemonic) of the board.
void dump(std::ostream &out, std::string const &indent, std::string const &firstIndent, unsigned int verbosity=MaxDumpVerbosity) const
Dumps the content of the configuration into out stream.
unsigned int preTriggerTicks() const
Ticks in the waveform before the trigger.
bool operator==(V1730Configuration const &other) const
Comparison: all fields need to have the same values.
unsigned int nChannels
Number of channels (nChannels).
unsigned int boardID
Numeric ID of the board (board_id).
bool operator!=(V1730Configuration const &other) const
unsigned int postTriggerTicks() const
Ticks in the waveform after the trigger.
tick ticks
Alias for common language habits.
unsigned int fragmentID
DAQ fragment ID.
unsigned int bufferLength
Ticks in each buffer (recordLength).
static float ticks2us(int ticks)
Convert a number of ticks into a time interval in microseconds.
float bufferTime() const
Duration of the waveform [us].
Information from the configuration of a V1730 PMT readout board.
void dump(std::ostream &out, std::string const &indent="") const
Dumps the content of the configuration into out stream.
static constexpr unsigned int MaxDumpVerbosity
Maximum supported verbosity level supported by dump().
bool useTimeTagForTimeStamp
Whether fragment timestamp is synchronised with server NTP and with TTT.
static constexpr unsigned int MaxDumpVerbosity
Maximum supported verbosity level supported by dump().
float postTriggerFrac
Fraction of the waveform after the trigger signal (postPercent).
float postTriggerTime() const
Time in the waveform after the trigger [us].
static constexpr unsigned int DefaultDumpVerbosity
Default verbosity level for dump().
std::vector< sbn::V1730channelConfiguration > channels
Configuration of each channel.
void dump(std::ostream &out, unsigned int verbosity, std::string const &indent="") const
Dumps the content of the configuration into out stream.
float preTriggerTime() const
Time in the waveform before the trigger [us].
Class containing configuration for a V1730 board.