Belle II Software development
PedeSteering.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#pragma once
9
10#include <TObject.h>
11
12#include <string>
13#include <vector>
14
15namespace Belle2 {
23 class PedeSteering : public TObject {
24 public:
26 PedeSteering() : commands(), files(), name("PedeSteering.txt") {}
29 explicit PedeSteering(const std::string& filename) : commands(), files(), name(filename) {}
31 virtual ~PedeSteering() {}
34 void import(std::string filename);
37 void command(const std::string& line);
40 std::string make(std::string filename = "");
45 void fixParameters(const std::vector<int>& labels,
46 const std::vector<double>& values = {},
47 const std::vector<double>& presigmas = {});
48
49 //void addConstraint(double constraint, vector<int> labels, vector<double> coefficients);
50
52 void addFile(std::string filename, double weight = 1.);
53
55 void clearFiles() {files.clear();}
56
57 private:
59 std::vector<std::string> commands;
61 std::vector<std::string> files;
63 std::string name;
64
65 ClassDef(PedeSteering, 1)
66
67 };
68
70}
std::string make(std::string filename="")
Compose and write out steering file.
std::vector< std::string > files
list of binary files
PedeSteering()
Default constructor.
virtual ~PedeSteering()
Destructor.
void fixParameters(const std::vector< int > &labels, const std::vector< double > &values={}, const std::vector< double > &presigmas={})
Fix parameter values and set presigmas.
std::string name
Name of steering (used as default filename)
void command(const std::string &line)
Add command to the steering.
PedeSteering(const std::string &filename)
Constructor to directly import command from file.
void clearFiles()
Clear list of files.
std::vector< std::string > commands
list command lines
void addFile(std::string filename, double weight=1.)
Add a file (optionally with weight) to list of binary files.
Abstract base class for different kinds of events.