readWDpp
Read binary files from DRS and WDB
Loading...
Searching...
No Matches
Private Member Functions | Private Attributes | Friends | List of all members
DAQConfig Class Reference

Main class to hold various settings for the channels. More...

#include <readWD.hh>

Private Member Functions

 DAQConfig ()
 Construct a new DAQConfig::DAQConfig object.
 
void MakeConfig (DAQFile &)
 Initialise the configuration class with the default values for any board and any channel.
 
void ShowConfig ()
 Simple method to print on stream the current settings of the class.
 
void SetIntWindow (std::pair< int, int >, int, int)
 
void SetIntWindow (std::pair< int, int >)
 
void SetPedInterval (std::pair< int, int >, int, int)
 
void SetPedInterval (std::pair< int, int >)
 
void SetPeakThr (float, int, int)
 Method to set the peak threshold given the peak threshold in Volts and the board/channel IDs.
 
void SetPeakThr (float)
 Method to set peak threshold given the peak threshold in Volts.
 

Private Attributes

std::map< int, std::map< int, std::pair< int, int > > > intWindow_
 Data member to hold integration windows intervals of various channels.
 
std::map< int, std::map< int, std::pair< int, int > > > pedInterval_
 Data member to hold pedestal intervals of various channels.
 
std::map< int, std::map< int, float > > peakThr_
 Data member to hold peak threshold values of various channels.
 
std::map< int, std::map< int, bool > > user_iw_
 Data member to hold which integration windows were set by the user.
 
bool is_makeconfig_
 Flag to check if the method DAQConfig::MakeConfig() has been called at least once.
 

Friends

class DAQEvent
 
class DAQFile
 

Detailed Description

Main class to hold various settings for the channels.

This class offers a more customizable setup for the file to be read. For each event, for each board and channel, it is possible to set a different value of trigger threshold, integration window or pedestal interval.

Definition at line 80 of file readWD.hh.

Constructor & Destructor Documentation

◆ DAQConfig()

DAQConfig::DAQConfig ( )
private

Construct a new DAQConfig::DAQConfig object.

This class is a data member of DAQEvent, when an istance of that class is constructed, also this constructor is called. The value of DAQConfig::is_makeconfig_ is set to false.

Definition at line 788 of file readWD.cc.

Member Function Documentation

◆ MakeConfig()

void DAQConfig::MakeConfig ( DAQFile file)
private

Initialise the configuration class with the default values for any board and any channel.

The data members inside this class are initialised. The default values are the following:

  • integration window: [0, SAMPLES_PER_WAVEFORM - 1]
  • pedestal interval: [0, 100]
  • peak threshold: +0.5V
Parameters
fileThe file to be read. It is requested to know how many boards and channels there are.

Definition at line 803 of file readWD.cc.

◆ SetPeakThr() [1/2]

void DAQConfig::SetPeakThr ( float  thr)
private

Method to set peak threshold given the peak threshold in Volts.

This method changes the peak threshold for all boards and channels.

Parameters
thr

Definition at line 1023 of file readWD.cc.

◆ SetPeakThr() [2/2]

void DAQConfig::SetPeakThr ( float  thr,
int  b,
int  c 
)
private

Method to set the peak threshold given the peak threshold in Volts and the board/channel IDs.

This method changes only the peak threshold of the requested board/channel ID.

Parameters
thrThe peak threshold in Volts.
bThe board.
cThe channel.

Definition at line 989 of file readWD.cc.

◆ ShowConfig()

void DAQConfig::ShowConfig ( )
private

Simple method to print on stream the current settings of the class.

Definition at line 828 of file readWD.cc.

Friends And Related Symbol Documentation

◆ DAQEvent

friend class DAQEvent
friend

Definition at line 102 of file readWD.hh.

◆ DAQFile

friend class DAQFile
friend

Definition at line 103 of file readWD.hh.

Member Data Documentation

◆ intWindow_

std::map<int, std::map<int, std::pair<int, int> > > DAQConfig::intWindow_
private

Data member to hold integration windows intervals of various channels.

Definition at line 88 of file readWD.hh.

◆ is_makeconfig_

bool DAQConfig::is_makeconfig_
private

Flag to check if the method DAQConfig::MakeConfig() has been called at least once.

Definition at line 100 of file readWD.hh.

◆ peakThr_

std::map<int, std::map<int, float> > DAQConfig::peakThr_
private

Data member to hold peak threshold values of various channels.

Definition at line 90 of file readWD.hh.

◆ pedInterval_

std::map<int, std::map<int, std::pair<int, int> > > DAQConfig::pedInterval_
private

Data member to hold pedestal intervals of various channels.

Definition at line 89 of file readWD.hh.

◆ user_iw_

std::map<int, std::map<int, bool> > DAQConfig::user_iw_
private

Data member to hold which integration windows were set by the user.

Definition at line 91 of file readWD.hh.


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