Belle II Software development
TestDBAccessAlgorithm.h
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#pragma once
10#include <calibration/CalibrationAlgorithm.h>
11#include <framework/database/DBObjPtr.h>
12#include <calibration/dbobjects/TestCalibMean.h>
13
14namespace Belle2 {
23 public:
24
27
31 void setGeneratePayloads(const bool& value) {m_generatePayloads = value;}
34 void saveSameMeans();
35
36 protected:
37
39 virtual EResult calibrate() override;
40
41 private:
48 bool m_generatePayloads = true;
50 };
52} // namespace Belle2
Base class for calibration algorithms.
EResult
The result of calibration.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Test class implementing calibration algorithm.
bool getGeneratePayloads() const
Getter for m_generatePayloads.
virtual ~TestDBAccessAlgorithm()
Destructor.
void setGeneratePayloads(const bool &value)
Setter for m_generatePayloads.
TestDBAccessAlgorithm()
Constructor set the prefix to TestCalibration.
void saveSameMeans()
Saves the same DB values for each run into a new localdb, otherwise we aren't creating a DB this iter...
float getAverageDistanceFromAnswer()
Grabs DBObjects from the Database and finds out the average distance from 42.
void generateNewPayloads()
Generates new payloads.
virtual EResult calibrate() override
Run algo on data.
DBObjPtr< TestCalibMean > m_dbMean
dbMean
void reduceDistancesAndSave()
Saves new DB values for each run where they are a little closer to 42.
bool m_generatePayloads
generatePayloads
Abstract base class for different kinds of events.