Bartender LYSO
Digitizer simulation for the LYSO calorimeter prototype
Loading...
Searching...
No Matches
configure.hh File Reference

Declaration of the function Bartender_Configure() (and the auxiliary function extract_value()) More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cfloat>
#include <regex>
#include "bar.hh"
#include "SiPM.hh"
Include dependency graph for configure.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string extract_value (const std::string &line, const std::string &keyword)
 Extracts a value from a line using a specific keyword.
 
void Bartender_Configure (const char *filename, BarLYSO *bar, SiPM *sipm)
 Reads and processes a specific file to populate members of the BarLYSO class and SiPM struct.
 

Detailed Description

Declaration of the function Bartender_Configure() (and the auxiliary function extract_value())

Definition in file configure.hh.

Function Documentation

◆ Bartender_Configure()

void Bartender_Configure ( const char * filename,
BarLYSO * bar,
SiPM * sipm )

Reads and processes a specific file to populate members of the BarLYSO class and SiPM struct.

Reads the given file (filename) and loads relevant information into the members of BarLYSO and SiPM, such as Brand, Type Number, Supply Voltage (V), Temperature (T), Resistance (R_shaper), Gain, the name of the input file for best-fit waveform parameters and the @hPars settings.

Parameters
filenameThe name of the file (mac file) to be processed.
barBarLYSO class pointer
sipmSiPM struct pointer

Definition at line 44 of file configure.cc.

◆ extract_value()

std::string extract_value ( const std::string & line,
const std::string & keyword )

Extracts a value from a line using a specific keyword.

Parameters
lineThe line from which to extract the value.
keywordThe keyword indicating where the value is located in the line.
Returns
The extracted value as a string.