Belle II Software development
SVDDatabaseImporter Class Reference

This class import to the database the dbobjects SVDNoiseCalibrations and SVDPulseShapeCalibrations. More...

#include <SVDDatabaseImporter.h>

Public Member Functions

 SVDDatabaseImporter ()
 Default constructor.
 
 SVDDatabaseImporter (int fexp, int frun, int lexp, int lrun)
 A constructor accepting as arguments the interval of validity coordinates.
 
virtual ~SVDDatabaseImporter ()
 Destructor.
 
void importSVDHitTimeNeuralNetwork (std::string fileName, bool threeSamples=false)
 This method import to the database the neural network for hit time determination.
 

Private Attributes

int m_firstExperiment
 The interval of validity coordinates are defined as private members.
 
int m_firstRun
 First run.
 
int m_lastExperiment
 Last experiment.
 
int m_lastRun
 Last run.
 

Detailed Description

This class import to the database the dbobjects SVDNoiseCalibrations and SVDPulseShapeCalibrations.

Currently, no input file is read to fill them, default values are written on the dbobjects for the needed calibrations constants as noise, charge, ADC pulse, peaking time and pulse width.

Definition at line 28 of file SVDDatabaseImporter.h.

Constructor & Destructor Documentation

◆ SVDDatabaseImporter() [1/2]

SVDDatabaseImporter ( )
inline

Default constructor.

Definition at line 35 of file SVDDatabaseImporter.h.

35 :
38 {
39 }
int m_lastExperiment
Last experiment.
int m_firstExperiment
The interval of validity coordinates are defined as private members.

◆ SVDDatabaseImporter() [2/2]

SVDDatabaseImporter ( int  fexp,
int  frun,
int  lexp,
int  lrun 
)
inline

A constructor accepting as arguments the interval of validity coordinates.

Definition at line 45 of file SVDDatabaseImporter.h.

45 :
46 m_firstExperiment(fexp), m_firstRun(frun),
47 m_lastExperiment(lexp), m_lastRun(lrun)
48 {
49 }

◆ ~SVDDatabaseImporter()

virtual ~SVDDatabaseImporter ( )
inlinevirtual

Destructor.

Definition at line 55 of file SVDDatabaseImporter.h.

56 {}

Member Function Documentation

◆ importSVDHitTimeNeuralNetwork()

void importSVDHitTimeNeuralNetwork ( std::string  fileName,
bool  threeSamples = false 
)

This method import to the database the neural network for hit time determination.

Parameters
fileNameis the file name of the xml file
threeSamplesif true, calibrate with 3 samples?

Definition at line 32 of file SVDDatabaseImporter.cc.

33{
34 std::ifstream xml(fileName);
35 if (!xml.good()) {
36 B2RESULT("ERROR: File not found.\nNeural network from " << fileName << " could not be imported.");
37 return;
38 }
39 std::string label("SVDTimeNet_6samples");
40 if (threeSamples)
41 label = "SVDTimeNet_3samples";
42 std::stringstream buffer;
43 buffer << xml.rdbuf();
45 importObj.construct();
46 importObj->m_data = buffer.str();
47
50 importObj.import(iov);
51 B2RESULT("Neural network from " << fileName << " successfully imported.");
52}
Class for importing a single object to the database.
A class that describes the interval of experiments/runs for which an object in the database is valid.

Member Data Documentation

◆ m_firstExperiment

int m_firstExperiment
private

The interval of validity coordinates are defined as private members.

First experiment.

Definition at line 74 of file SVDDatabaseImporter.h.

◆ m_firstRun

int m_firstRun
private

First run.

Definition at line 75 of file SVDDatabaseImporter.h.

◆ m_lastExperiment

int m_lastExperiment
private

Last experiment.

Definition at line 76 of file SVDDatabaseImporter.h.

◆ m_lastRun

int m_lastRun
private

Last run.

Definition at line 77 of file SVDDatabaseImporter.h.


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