Belle II Software  release-08-01-10
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 
15 namespace 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(std::string line);
40  std::string make(std::string filename = "");
45  void fixParameters(std::vector<int> labels, std::vector<double> values = {}, std::vector<double> presigmas = {});
46 
47  //void addConstraint(double constraint, vector<int> labels, vector<double> coefficients);
48 
50  void addFile(std::string filename, double weight = 1.);
51 
53  void clearFiles() {files.clear();}
54 
55  private:
57  std::vector<std::string> commands;
59  std::vector<std::string> files;
61  std::string name;
62 
63  ClassDef(PedeSteering, 1)
65  };
66 
68 }
Class representing Millepede steering.
Definition: PedeSteering.h:23
std::string make(std::string filename="")
Compose and write out steering file.
Definition: PedeSteering.cc:16
std::vector< std::string > files
list of binary files
Definition: PedeSteering.h:59
PedeSteering()
Default constructor.
Definition: PedeSteering.h:26
void fixParameters(std::vector< int > labels, std::vector< double > values={}, std::vector< double > presigmas={})
Fix parameter values and set presigmas.
Definition: PedeSteering.cc:51
virtual ~PedeSteering()
Destructor.
Definition: PedeSteering.h:31
std::string name
Name of steering (used as default filename)
Definition: PedeSteering.h:61
void command(std::string line)
Add command to the steering.
Definition: PedeSteering.cc:35
PedeSteering(const std::string &filename)
Constructor to directly import command from file.
Definition: PedeSteering.h:29
void clearFiles()
Clear list of files.
Definition: PedeSteering.h:53
std::vector< std::string > commands
list command lines
Definition: PedeSteering.h:57
void addFile(std::string filename, double weight=1.)
Add a file (optionally with weight) to list of binary files.
Definition: PedeSteering.cc:69
Abstract base class for different kinds of events.