Belle II Software development
InfoObserver Class Reference

this observer does simply print the name of the SelectionVariable and the result of its value-function as a Warning More...

Inheritance diagram for InfoObserver:
VoidObserver

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 notify (const types &...)
 static method used by the observed object to notify the observer.
 
template<typename ... types>
static bool initialize (const types &...)
 static method used by the observed object to initialize the observer it is called once usually from the user.
 
template<typename ... types>
static void prepare (const types &...)
 static method used by the observed object to prepare the observer it is called by the boolean filter operator.
 
template<typename ... types>
static void collect (const types &...)
 static method used by the observed object to prepare the observer it is called by the boolean filter operator.
 
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

Definition at line 454 of file observers.cc.

Member Function Documentation

◆ collect()

static void collect ( const types &  ...)
inlinestaticinherited

static method used by the observed object to prepare the observer it is called by the boolean filter operator.

Definition at line 55 of file VoidObserver.h.

55{};

◆ initialize()

static bool initialize ( const types &  ...)
inlinestaticinherited

static method used by the observed object to initialize the observer it is called once usually from the user.

Definition at line 43 of file VoidObserver.h.

43{ return true; };

◆ notify() [1/2]

static void notify ( const types &  ...)
inlinestaticinherited

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

it is called at each accept.

Definition at line 37 of file VoidObserver.h.

37{};

◆ notify() [2/2]

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

Definition at line 458 of file observers.cc.

463 {
464
465 stringstream outputStream;
466 outputStream << filterType.name()
467 << " with outer-/innerhit: "
468 << outerHit.getPosition().PrintStringXYZ()
469 << "/"
470 << innerHit.getPosition().PrintStringXYZ()
471 << " having indices "
472 << outerHit.getArrayIndex()
473 << "/"
474 << innerHit.getArrayIndex()
475 << " and VxdIDs "
476 << outerHit.getVxdID()
477 << "/"
478 << innerHit.getVxdID()
479 << " results in "
480 << fResult
481 << " & accepted: "
482 << (range.contains(fResult) ? string("true") : string("false"))
483 << " in range "
484 << range.getInf()
485 << "/"
486 << range.getSup();
487
488 if (range.contains(fResult)) {
489 B2INFO(outputStream.str());
490 } else {
491 B2WARNING(outputStream.str());
492 }
493 }
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

◆ prepare()

static void prepare ( const types &  ...)
inlinestaticinherited

static method used by the observed object to prepare the observer it is called by the boolean filter operator.

Definition at line 49 of file VoidObserver.h.

49{};

◆ terminate()

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

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

Definition at line 67 of file VoidObserver.h.

67{};

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