Belle II Software development
ObserverPrintResults Class Reference

this observer does simply print the name of the SelectionVariable and the result of its value-function as a Warning(if failed) or as an Info (if succeeded) More...

#include <ObserverPrintResults.h>

Public Member Functions

 ObserverPrintResults ()
 empty constructor:
 

Static Public Member Functions

template<class Var , class RangeType >
static void notify (const Var &filterType, typename Var::variableType fResult, const RangeType &range, const typename Var::argumentType &outerHit, const typename Var::argumentType &innerHit)
 notifier producing a info message if SelectionVariable was accepted and a Warning if otherwise
 
template<typename ... types>
static void initialize (const types &...)
 static method used by the observed object to initialize the observer.
 
template<typename ... types>
static void terminate (const types &...)
 static method used by the observed object to terminate the observer.
 

Detailed Description

this observer does simply print the name of the SelectionVariable and the result of its value-function as a Warning(if failed) or as an Info (if succeeded)

Definition at line 25 of file ObserverPrintResults.h.

Constructor & Destructor Documentation

◆ ObserverPrintResults()

empty constructor:

Definition at line 71 of file ObserverPrintResults.h.

71{};

Member Function Documentation

◆ initialize()

static void initialize ( const types &  ...)
inlinestatic

static method used by the observed object to initialize the observer.

Definition at line 77 of file ObserverPrintResults.h.

77{};

◆ notify()

static void notify ( const Var &  filterType,
typename Var::variableType  fResult,
const RangeType &  range,
const typename Var::argumentType &  outerHit,
const typename Var::argumentType &  innerHit 
)
inlinestatic

notifier producing a info message if SelectionVariable was accepted and a Warning if otherwise

for debugging:

Definition at line 29 of file ObserverPrintResults.h.

34 {
35
36 std::stringstream outputStream;
37 outputStream << filterType.name()
38 << " with outer-/innerhit: "
39 << outerHit.getPosition().PrintStringXYZ()
40 << "/"
41 << innerHit.getPosition().PrintStringXYZ()
42 << " having indices "
43 << outerHit.getArrayIndex()
44 << "/"
45 << innerHit.getArrayIndex()
46 << " and VxdIDs "
47 << outerHit.getVxdID()
48 << "/"
49 << innerHit.getVxdID()
50 << " results in "
51 << (range.contains(fResult) ? std::setprecision(6) : std::setprecision(18))
52 << fResult
53 << " & accepted: "
54 << (range.contains(fResult) ? std::string(">true<") : std::string(">false<"))
55 << " in range "
56 << range.getInf()
57 << "/"
58 << range.getSup();
59
60 B2DEBUG(5, outputStream.str());
62// if (range.contains(fResult)) {
63// B2INFO(outputStream.str())
64// } else {
65// B2WARNING(outputStream.str())
66// }
67 }
std::string PrintStringXYZ(unsigned precision=4) const
create a string containing vector in cartesian coordinates
Definition: B2Vector3.h:487
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior
STL namespace.

◆ terminate()

static void terminate ( const types &  ...)
inlinestatic

static method used by the observed object to terminate the observer.

Definition at line 83 of file ObserverPrintResults.h.

83{};

The documentation for this class was generated from the following file: