Belle II Software  release-08-01-10
CDCDatabaseImporter Class Reference

CDC database importer. More...

#include <CDCDatabaseImporter.h>

Public Member Functions

 CDCDatabaseImporter ()
 Default constructor.
 
 CDCDatabaseImporter (int fexp, int frun, int lexp, int lrun)
 Constructor.
 
virtual ~CDCDatabaseImporter ()
 Destructor.
 
void importChannelMap (std::string fileName)
 Import channel map to the data base.
 
void printChannelMap ()
 Get the channel map from the database and print it.
 
void importFEElectronics (std::string fileName)
 Import FEE params. More...
 
void printFEElectronics ()
 Get FEE params. More...
 
void importEDepToADC (std::string fileName)
 Import edep-to-adc params. More...
 
void printEDepToADC ()
 Get edep-to-adc params. More...
 
void importCorrToThreshold (std::string fileName)
 Import corrtothreshold to the data base.
 
void printCorrToThreshold ()
 Get corrtothreshold from the database and print.
 
void importTimeZero (std::string fileName)
 Import t0 table to the data base.
 
void printTimeZero ()
 Get the t0 table from the database and print it.
 
void importADCDeltaPedestal (std::string fileName)
 Import ADC delta pedestal table to the data base specifying the text data.
 
void importADCDeltaPedestal ()
 Import ADC delta pedestal with all 0.
 
void printADCDeltaPedestal ()
 Get the ADC delta pedestal table from the database and print it.
 
void importBadWire (std::string fileName)
 Import badwire table to the data base.
 
void printBadWire ()
 Get the badwire table from the database and print it.
 
void importPropSpeed (std::string fileName)
 Import propspeed table to the database.
 
void printPropSpeed ()
 Get the propspeed table from the database and print it.
 
void importTimeWalk (std::string fileName)
 Import time-walk coeff. More...
 
void printTimeWalk ()
 Get the time-walk coeff. More...
 
void importXT (std::string fileName)
 Import xt table to the database.
 
void printXT ()
 Get the xt table from the database and print it.
 
void importSigma (std::string fileName)
 Import sigma table to the database.
 
void printSigma ()
 Get the sigma table from the database and print it.
 
void importFFactor (std::string fileName)
 Import fudge factor table to the database.
 
void printFFactor ()
 Get the fudge factor table from the database and print it.
 
void importDisplacement (std::string fileName)
 Import displacement of wire position to the database.
 
void printDisplacement ()
 Get the displacement of wire position from the database and print it.
 
void importWirPosAlign (std::string fileName)
 Import wire alignment table to the database.
 
void printWirPosAlign ()
 Get the wire alignment table from the database and print it.
 
void importWirPosMisalign (std::string fileName)
 Import wire misalignment table to the database.
 
void printWirPosMisalign ()
 Get the wire misalignment table from the database and print it.
 
void importCDCWireHitRequirements (const std::string &jsonFileName) const
 Import CDCWireHits cut values to the database. More...
 
void printCDCWireHitRequirements () const
 Get CDCWireHits cut values from the database and print them.
 
void importCDCCrossTalkLibrary (const std::string &rootFileName) const
 Import crosstalk library prepared in rootFileName.
 
void printCDCCrossTalkLibrary () const
 Print the content of the crosstalk library.
 
void testCDCCrossTalkLibrary (bool spotChecks=false) const
 Do some basic testing of the CDCCrossTalkLibrary.
 
void importCDClayerTimeCut (const std::string &jsonFileName) const
 import CDClayerTimeCut
 
void printCDClayerTimeCut () const
 Print content of CDClayerTimeCut.
 

Private Attributes

int m_firstExperiment
 CDC geometory parameter. More...
 
int m_firstRun
 First run.
 
int m_lastExperiment
 Last experiment.
 
int m_lastRun
 Last run.
 
ushort m_firstLayerOffset = 0
 Offset of first layer in case some CDC layers are removed.
 
ushort m_superLayerOffset = 0
 Offset of first super layer in case some CDC super layers are removed.
 
ushort m_nSenseWires = 14336
 Number of sense wires in the CDC.
 

Detailed Description

CDC database importer.

Definition at line 22 of file CDCDatabaseImporter.h.

Member Function Documentation

◆ importCDCWireHitRequirements()

void importCDCWireHitRequirements ( const std::string &  jsonFileName) const

Import CDCWireHits cut values to the database.

The cut values are read from a json file. An example of legal json file can be found at cdc/data/CDCWireHitRequirements_example.json In the json file, upper values of -1 stand for unbounded.

Definition at line 999 of file CDCDatabaseImporter.cc.

1000 {
1001 
1002  // Create a property tree
1003  boost::property_tree::ptree tree;
1004 
1005  try {
1006 
1007  // Load the json file in this property tree.
1008  B2INFO("Loading json file: " << jsonFileName);
1009  boost::property_tree::read_json(jsonFileName, tree);
1010 
1011  } catch (boost::property_tree::ptree_error& e) {
1012  B2FATAL("Error when loading json file: " << e.what());
1013  }
1014 
1016  dbWireHitReq.construct(tree);
1017 
1020  dbWireHitReq.import(iov);
1021 
1022  B2INFO("CDCWireHit requirements imported to database.");
1023 }
int m_lastExperiment
Last experiment.
int m_firstExperiment
CDC geometory parameter.
bool import(const IntervalOfValidity &iov)
Import the object to database.
Definition: DBImportBase.cc:36
Class for importing a single object to the database.
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
A class that describes the interval of experiments/runs for which an object in the database is valid.

◆ importEDepToADC()

void importEDepToADC ( std::string  fileName)

Import edep-to-adc params.

to the data base.

Definition at line 190 of file CDCDatabaseImporter.cc.

◆ importFEElectronics()

void importFEElectronics ( std::string  fileName)

Import FEE params.

to the data base.

Definition at line 155 of file CDCDatabaseImporter.cc.

◆ importTimeWalk()

void importTimeWalk ( std::string  fileName)

Import time-walk coeff.

table to the database.

Definition at line 373 of file CDCDatabaseImporter.cc.

◆ printEDepToADC()

void printEDepToADC ( )

Get edep-to-adc params.

from the database and print.

Definition at line 854 of file CDCDatabaseImporter.cc.

◆ printFEElectronics()

void printFEElectronics ( )

Get FEE params.

from the database and print.

Definition at line 842 of file CDCDatabaseImporter.cc.

◆ printTimeWalk()

void printTimeWalk ( )

Get the time-walk coeff.

table from the database and print it.

Definition at line 886 of file CDCDatabaseImporter.cc.

Member Data Documentation

◆ m_firstExperiment

int m_firstExperiment
private

CDC geometory parameter.

First experiment.

Definition at line 235 of file CDCDatabaseImporter.h.


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