The Gaudi Framework  master (37c0b60a)
Symbols.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
13 #include <Gaudi/Decays/Nodes.h>
14 #include <GaudiKernel/Kernel.h>
15 #include <GaudiKernel/VectorMap.h>
16 #include <map>
17 #include <string>
18 #include <vector>
19 
20 namespace Gaudi {
21  class IParticlePropertySvc;
22 }
23 
33 namespace Gaudi::Decays {
46  public:
47  enum { InvalidService = 400, InvalidSymbol, NoParticles, NoSymbols };
48 
52 
54  const CCMap& cc() const;
55 
60  bool valid( std::string sym ) const;
65  const std::string& symbol( std::string sym ) const;
71  StatusCode symbol( std::string sym, Decays::Node& node ) const;
72 
77  size_t symbols( Names& names ) const;
83  StatusCode particles( const Gaudi::Interfaces::IParticlePropertySvc* svc, Names& parts ) const;
84 
92  bool addSymbol( std::string sym, const Decays::iNode& node, const std::string& help,
93  const std::string& ccsym = "" );
94 
99  void addCC( std::string sym, std::string ccsym = "" );
100 
102  static Symbols& instance();
103 
104  protected:
106  Symbols();
108  virtual ~Symbols() = default;
109 
110  private:
112  Symbols( const Symbols& );
115 
118 
125  };
126 } // namespace Gaudi::Decays
Gaudi::Decays::Symbols::m_help
HelpMap m_help
the actual help-map
Definition: Symbols.h:122
Gaudi::Decays::Node
Definition: iNode.h:74
std::string
STL class.
Gaudi::Decays::Symbols::Names
std::vector< std::string > Names
the actual type for the list of names
Definition: Symbols.h:50
std::vector< std::string >
Gaudi::Interfaces::IParticlePropertySvc
Definition: IParticlePropertySvc.h:29
GaudiUtils::VectorMap< std::string, Decays::Nodes::_Node >
Nodes.h
help
void help(const std::string &argv0)
Definition: listcomponents.cpp:28
Gaudi::Decays::Symbols::HelpMap
std::map< std::string, std::string > HelpMap
Definition: Symbols.h:117
VectorMap.h
StatusCode
Definition: StatusCode.h:65
Gaudi::Decays::Symbols::Symbols
Symbols(const Symbols &)
copy constructor is private
Gaudi::Decays::Symbols::m_cc
CCMap m_cc
the map of cc-symbols
Definition: Symbols.h:124
Gaudi::Decays::Symbols::operator=
Symbols & operator=(const Symbols &)
assignment operator is private
Gaudi::Decays::Symbols
Definition: Symbols.h:45
std::map< std::string, std::string >
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Decays
Definition: CC.h:17
Gaudi::Decays::Symbols::NodeMap
GaudiUtils::VectorMap< std::string, Decays::Nodes::_Node > NodeMap
Definition: Symbols.h:116
Gaudi::Decays::Symbols::CCMap
std::map< std::string, std::string > CCMap
Definition: Symbols.h:51
GaudiPartProp.decorators.Symbols
Symbols
instance:
Definition: decorators.py:366
Gaudi::Decays::CC::cc
std::string cc(const std::string &decay, const MapCC &map_)
simple function to make charge conjugated inside the original string.
Gaudi::Decays::valid
bool valid(Iterator begin, Iterator end)
check the validness of the trees or nodes
Definition: Nodes.h:36
Kernel.h
Gaudi::Decays::iNode
Definition: iNode.h:35
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81
Gaudi::Decays::Symbols::~Symbols
virtual ~Symbols()=default
the destructor is protected
Gaudi::Decays::Symbols::m_nodes
NodeMap m_nodes
the actual map of symbols
Definition: Symbols.h:120