Belle II Software  release-08-01-10
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 More...
 
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.

Member Function Documentation

◆ 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  }

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