Belle II Software  release-06-00-14
EKLMDatabaseImporter.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 /* Own header. */
10 #include <klm/eklm/calibration/EKLMDatabaseImporter.h>
11 
12 /* KLM headers. */
13 #include <klm/dbobjects/eklm/EKLMSimulationParameters.h>
14 
15 /* Belle 2 headers. */
16 #include <framework/database/IntervalOfValidity.h>
17 #include <framework/database/DBImportObjPtr.h>
18 #include <framework/gearbox/GearDir.h>
19 #include <framework/gearbox/Unit.h>
20 
21 using namespace Belle2;
22 
24 {
25 }
26 
28 {
29 }
30 
31 void EKLMDatabaseImporter::setIOV(int experimentLow, int runLow,
32  int experimentHigh, int runHigh)
33 {
34  m_ExperimentLow = experimentLow;
35  m_RunLow = runLow;
36  m_ExperimentHigh = experimentHigh;
37  m_RunHigh = runHigh;
38 }
39 
41 {
43  simPar.construct();
44  GearDir gd(Gearbox::getInstance().getDetectorComponent("KLM"));
45  gd.append("/EKLM/SensitiveDetector");
46  simPar->setHitTimeThreshold(
47  Unit::convertValue(gd.getDouble("HitTimeThreshold") , "ns"));
50  simPar.import(iov);
51 }
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.
int m_ExperimentHigh
High experiment.
void importSimulationParameters()
Import simulation parameters.
void setIOV(int experimentLow, int runLow, int experimentHigh, int runHigh)
Set interval of validity.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
void append(const std::string &path)
Append something to the current path, modifying the GearDir in place.
Definition: GearDir.h:52
A class that describes the interval of experiments/runs for which an object in the database is valid.
double getDouble(const std::string &path="") const noexcept(false)
Get the parameter path as a double.
Definition: Interface.cc:41
static Gearbox & getInstance()
Return reference to the Gearbox instance.
Definition: Gearbox.cc:81
static double convertValue(double value, const std::string &unitString)
Converts a floating point value to the standard framework unit.
Definition: UnitConst.cc:129
Abstract base class for different kinds of events.