Belle II Software  release-06-00-14
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 
14 namespace Belle2 {
23  public:
24 
27 
30  void setGeneratePayloads(const bool& value) {m_generatePayloads = value;}
31  bool getGeneratePayloads() const {return m_generatePayloads;}
32  void saveSameMeans();
33 
34  protected:
35 
37  virtual EResult calibrate() override;
38 
39  private:
41  void generateNewPayloads();
43  bool m_generatePayloads = true;
44  DBObjPtr<TestCalibMean> m_dbMean;
45  };
47 } // namespace Belle2
Base class for calibration algorithms.
EResult
The result of calibration.
Test class implementing calibration algorithm.
virtual ~TestDBAccessAlgorithm()
Destructor.
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.
virtual EResult calibrate() override
Run algo on data.
void reduceDistancesAndSave()
Saves new DB values for each run where they are a little closer to 42.
Abstract base class for different kinds of events.