9 #include <alignment/dataobjects/PedeSteering.h>
21 ofstream file(filename.c_str());
22 file <<
"! Steerig file for Pede generated by PedeSteering class !" << endl;
23 file <<
"Cfiles" << endl;
24 for (
string& cfile : files)
25 file << cfile << endl;
29 for (
string& command : commands)
30 file << command << endl;
37 commands.push_back(line);
42 ifstream file(filename);
47 while (getline(file, commandLine))
53 command(
"Parameters");
54 bool useValues = (labels.size() == values.size());
55 bool usePresigmas = (labels.size() == presigmas.size());
57 for (
unsigned int i = 0; i < labels.size(); i++) {
59 double presigma = -1.;
63 presigma = presigmas[i];
65 command(to_string(labels[i]) +
" " + to_string(value) +
" " + to_string(presigma));
72 filename = filename +
" -- " + std::to_string(weight);
74 for (
auto file : files)
78 files.push_back(filename);
std::string make(std::string filename="")
Compose and write out steering file.
void fixParameters(std::vector< int > labels, std::vector< double > values={}, std::vector< double > presigmas={})
Fix parameter values and set presigmas.
void import(std::string filename)
Load commands from existing text file.
void command(std::string line)
Add command to the steering.
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.