Belle II Software  release-05-01-25
PedeApplication.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Tadeas Bilka *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <alignment/dataobjects/PedeSteering.h>
14 #include <alignment/PedeResult.h>
15 
16 #include <string>
17 
18 namespace Belle2 {
23  namespace alignment {
25  class PedeApplication {
26  public:
28  PedeApplication() : exitCode(-1), exitMessage("") {}
31  bool run(PedeSteering& steering);
34  PedeResult calibrate(PedeSteering& steering);
36  bool success() {return warnings() <= 1;}
38  int warnings() const;
40  bool aborted() const {return exitCode >= 10 || exitCode == -1;}
42  int getExitCode() const {return exitCode;}
44  std::string getExitMessage() const {return exitMessage;}
46  void readEndFile(std::string filename = "millepede.end");
48  int revision();
49 
50  private:
52  int exitCode;
54  std::string exitMessage;
55  };
56  }
58 }
Belle2::alignment::PedeApplication::readEndFile
void readEndFile(std::string filename="millepede.end")
Reads the millepede.end file and sets this object retrieved state.
Definition: PedeApplication.cc:45
Belle2::alignment::PedeApplication::getExitCode
int getExitCode() const
Returns the Pede exit code (from millepede.end file)
Definition: PedeApplication.h:50
Belle2::alignment::PedeApplication::PedeApplication
PedeApplication()
Constructor.
Definition: PedeApplication.h:36
Belle2::alignment::PedeApplication::exitMessage
std::string exitMessage
Pede exit message.
Definition: PedeApplication.h:62
Belle2::alignment::PedeApplication::aborted
bool aborted() const
True if Pede was aborted (parameters not calculated)
Definition: PedeApplication.h:48
Belle2::alignment::PedeApplication::run
bool run(PedeSteering &steering)
Run Pede with given steering.
Definition: PedeApplication.cc:62
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::alignment::PedeApplication::revision
int revision()
Return Pede revision number.
Definition: PedeApplication.cc:27
Belle2::alignment::PedeApplication::success
bool success()
Was Pede successfull (can the result be used)?
Definition: PedeApplication.h:44
Belle2::alignment::PedeApplication::calibrate
PedeResult calibrate(PedeSteering &steering)
Run Pede and return full result with parameter corrections.
Definition: PedeApplication.cc:53
Belle2::alignment::PedeApplication::exitCode
int exitCode
Pede exit code.
Definition: PedeApplication.h:60
Belle2::alignment::PedeApplication::warnings
int warnings() const
Level of warnings converted to int.
Definition: PedeApplication.cc:72
Belle2::alignment::PedeApplication::getExitMessage
std::string getExitMessage() const
Returns the Pede exit message (from millepede.end file)
Definition: PedeApplication.h:52