Belle II Software development
BKLMDatabaseImporter.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/bklm/calibration/BKLMDatabaseImporter.h>
11
12/* KLM headers. */
13#include <klm/dbobjects/bklm/BKLMGeometryPar.h>
14#include <klm/dbobjects/bklm/BKLMSimulationPar.h>
15
16/* Basf2 headers. */
17#include <framework/database/Database.h>
18#include <framework/database/DBImportObjPtr.h>
19#include <framework/database/IntervalOfValidity.h>
20#include <framework/gearbox/GearDir.h>
21
22using namespace Belle2;
23
25{
26}
27
28void BKLMDatabaseImporter::setIOV(int experimentLow, int runLow,
29 int experimentHigh, int runHigh)
30{
31 m_ExperimentLow = experimentLow;
32 m_RunLow = runLow;
33 m_ExperimentHigh = experimentHigh;
34 m_RunHigh = runHigh;
35}
36
38{
39 GearDir content(Gearbox::getInstance().getDetectorComponent("KLM"), "BKLM/SimulationParameters");
40 BKLMSimulationPar bklmSimulationPar(content);
43 Database::Instance().storeData("BKLMSimulationPar", &bklmSimulationPar, iov);
44}
void importSimulationPar()
Import BKLM simulation parameters into the database.
int m_ExperimentHigh
High experiment.
void setIOV(int experimentLow, int runLow, int experimentHigh, int runHigh)
Set interval of validity.
Provides BKLM simulation parameters.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
A class that describes the interval of experiments/runs for which an object in the database is valid.
static Gearbox & getInstance()
Return reference to the Gearbox instance.
Definition: Gearbox.cc:81
static Database & Instance()
Instance of a singleton Database.
Definition: Database.cc:42
bool storeData(const std::string &name, TObject *object, const IntervalOfValidity &iov)
Store an object in the database.
Definition: Database.cc:141
Abstract base class for different kinds of events.