The Gaudi Framework  master (594c33fa)
Gaudi::Decays::Node Class Reference

#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/Decays/iNode.h>

Inheritance diagram for Gaudi::Decays::Node:
Collaboration diagram for Gaudi::Decays::Node:

Public Member Functions

 Node (const Decays::iNode &node)
 constructor from the node More...
 
 Node (const Decays::Node &right)
 copy constructor More...
 
Nodeclone () const override
 MANDATORY: clone method ("virtual constructor") More...
 
bool operator() (const Gaudi::ParticleID &p) const override
 MANDATORY: the only one essential method. More...
 
std::ostreamfillStream (std::ostream &s) const override
 MANDATORY: the specific printout. More...
 
bool valid () const override
 MANDATORY: check the validity of the node. More...
 
StatusCode validate (const Gaudi::Interfaces::IParticlePropertySvc *svc) const override
 MANDATORY: the proper validation of the node. More...
 
Nodeoperator&= (const iNode &right)
 
Nodeoperator|= (const iNode &right)
 
const iNodenode () const
 
bool node (const Gaudi::ParticleID &pid) const
 
Nodeoperator= (const Node &right)
 assignment operator: More...
 
Nodeoperator= (const iNode &right)
 assignment from arbitrary node More...
 
- Public Member Functions inherited from Gaudi::Decays::iNode
virtual bool operator! () const
 invalid node? More...
 
virtual std::string toString () const
 the string representation of the node More...
 
virtual ~iNode ()=default
 virtual destructor More...
 

Private Member Functions

Nodeop_and (const iNode &right)
 
Nodeop_or (const iNode &right)
 

Private Attributes

std::unique_ptr< iNodem_node
 the node itself: More...
 

Detailed Description

The generic class to hold the pointer to other node

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2008-04-12

Definition at line 74 of file iNode.h.

Constructor & Destructor Documentation

◆ Node() [1/2]

Gaudi::Decays::Node::Node ( const Decays::iNode node)

constructor from the node

Definition at line 32 of file iNode.cpp.

32  {
33  if ( typeid( Decays::Node ) == typeid( node ) ) {
34  const Node& _node = dynamic_cast<const Node&>( node );
35  m_node.reset( _node.m_node->clone() );
36  } else {
37  m_node.reset( node.clone() );
38  }
39 }

◆ Node() [2/2]

Gaudi::Decays::Node::Node ( const Decays::Node right)

copy constructor

Definition at line 41 of file iNode.cpp.

41 : Decays::iNode( right ), m_node( right.m_node->clone() ) {}

Member Function Documentation

◆ clone()

Decays::Node * Gaudi::Decays::Node::clone ( ) const
overridevirtual

MANDATORY: clone method ("virtual constructor")

Implements Gaudi::Decays::iNode.

Definition at line 72 of file iNode.cpp.

72 { return new Decays::Node( *this ); }

◆ fillStream()

std::ostream & Gaudi::Decays::Node::fillStream ( std::ostream s) const
overridevirtual

MANDATORY: the specific printout.

Implements Gaudi::Decays::iNode.

Definition at line 45 of file iNode.cpp.

45 { return m_node->fillStream( s ); }

◆ node() [1/2]

const iNode& Gaudi::Decays::Node::node ( ) const
inline

Definition at line 96 of file iNode.h.

96 { return *m_node; }

◆ node() [2/2]

bool Gaudi::Decays::Node::node ( const Gaudi::ParticleID pid) const
inline

Definition at line 99 of file iNode.h.

99 { return node()( pid ); }

◆ op_and()

Decays::Node & Gaudi::Decays::Node::op_and ( const iNode right)
private

Definition at line 74 of file iNode.cpp.

74 { return ( *this = ( *m_node && right ) ); }

◆ op_or()

Decays::Node & Gaudi::Decays::Node::op_or ( const iNode right)
private

Definition at line 76 of file iNode.cpp.

76 { return ( *this = ( *m_node || right ) ); }

◆ operator&=()

Node& Gaudi::Decays::Node::operator&= ( const iNode right)
inline

Definition at line 92 of file iNode.h.

92 { return op_and( right ); }

◆ operator()()

bool Gaudi::Decays::Node::operator() ( const Gaudi::ParticleID p) const
overridevirtual

MANDATORY: the only one essential method.

Implements Gaudi::Decays::iNode.

Definition at line 43 of file iNode.cpp.

43 { return node( pid ); }

◆ operator=() [1/2]

Decays::Node & Gaudi::Decays::Node::operator= ( const iNode right)

assignment from arbitrary node

Definition at line 59 of file iNode.cpp.

59  {
60  if ( &right == this ) { return *this; }
61  Decays::iNode* node = nullptr;
62  if ( typeid( Decays::Node ) == typeid( right ) ) {
63  const Node& _node = dynamic_cast<const Node&>( right );
64  node = _node.m_node->clone();
65  } else {
66  node = right.clone();
67  }
68  m_node.reset( node );
69  return *this;
70 }

◆ operator=() [2/2]

Decays::Node & Gaudi::Decays::Node::operator= ( const Node right)

assignment operator:

Definition at line 53 of file iNode.cpp.

53  {
54  if ( &right == this ) { return *this; }
55  m_node.reset( right.m_node->clone() );
56  return *this;
57 }

◆ operator|=()

Node& Gaudi::Decays::Node::operator|= ( const iNode right)
inline

Definition at line 93 of file iNode.h.

93 { return op_or( right ); }

◆ valid()

bool Gaudi::Decays::Node::valid ( ) const
overridevirtual

MANDATORY: check the validity of the node.

Implements Gaudi::Decays::iNode.

Definition at line 47 of file iNode.cpp.

47 { return m_node->valid(); }

◆ validate()

StatusCode Gaudi::Decays::Node::validate ( const Gaudi::Interfaces::IParticlePropertySvc svc) const
overridevirtual

MANDATORY: the proper validation of the node.

Implements Gaudi::Decays::iNode.

Definition at line 49 of file iNode.cpp.

49  {
50  return m_node->validate( svc );
51 }

Member Data Documentation

◆ m_node

std::unique_ptr<iNode> Gaudi::Decays::Node::m_node
private

the node itself:

Definition at line 111 of file iNode.h.


The documentation for this class was generated from the following files:
Gaudi::Decays::Node
Definition: iNode.h:74
Gaudi::Decays::iNode::clone
virtual iNode * clone() const =0
clone method ("virtual constructor")
GaudiPartProp.Nodes.iNode
iNode
full list of known nodes
Definition: Nodes.py:246
gaudirun.s
string s
Definition: gaudirun.py:346
Gaudi::Decays::Node::op_and
Node & op_and(const iNode &right)
Definition: iNode.cpp:74
GaudiPartProp.Nodes.Node
Node
Definition: Nodes.py:247
Gaudi::Decays::Node::node
const iNode & node() const
Definition: iNode.h:96
std::right
T right(T... args)
Gaudi::Decays::Node::op_or
Node & op_or(const iNode &right)
Definition: iNode.cpp:76
Gaudi::Decays::iNode
Definition: iNode.h:35
Gaudi::Decays::Node::m_node
std::unique_ptr< iNode > m_node
the node itself:
Definition: iNode.h:111
Gaudi::Decays::Node::Node
Node(const Decays::iNode &node)
constructor from the node
Definition: iNode.cpp:32