The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
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>
16#include <map>
17#include <string>
18#include <vector>
19
20namespace Gaudi {
21 class IParticlePropertySvc;
22}
23
33namespace Gaudi::Decays {
46 public:
48
50 typedef std::vector<std::string> Names;
51 typedef std::map<std::string, std::string> CCMap;
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;
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
117 typedef std::map<std::string, std::string> HelpMap;
118
125 };
126} // namespace Gaudi::Decays
#define GAUDI_API
Definition Kernel.h:49
Helper general purpose utilities to deal with decay nodes.
The generic class to hold the pointer to other node.
Definition iNode.h:74
GaudiUtils::VectorMap< std::string, Decays::Nodes::_Node > NodeMap
Definition Symbols.h:116
bool addSymbol(std::string sym, const Decays::iNode &node, const std::string &help, const std::string &ccsym="")
add new symbol to the internal structure
Definition Symbols.cpp:129
const CCMap & cc() const
get CC-map
Definition Symbols.cpp:121
CCMap m_cc
the map of cc-symbols
Definition Symbols.h:124
static Symbols & instance()
static accessor to teh singleton
Definition Symbols.cpp:39
void addCC(std::string sym, std::string ccsym="")
add cc-pair to the internal map
Definition Symbols.cpp:148
std::vector< std::string > Names
the actual type for the list of names
Definition Symbols.h:50
virtual ~Symbols()=default
the destructor is protected
std::map< std::string, std::string > CCMap
Definition Symbols.h:51
const std::string & symbol(std::string sym) const
help for the basic primitive special symbol
Definition Symbols.cpp:163
StatusCode particles(const Gaudi::Interfaces::IParticlePropertySvc *svc, Names &parts) const
get all known particle names
Definition Symbols.cpp:202
bool valid(std::string sym) const
valid basic/primitive symbol?
Definition Symbols.cpp:157
size_t symbols(Names &names) const
get all known basic primitive special symbols
Definition Symbols.cpp:189
HelpMap m_help
the actual help-map
Definition Symbols.h:122
std::map< std::string, std::string > HelpMap
Definition Symbols.h:117
Symbols(const Symbols &)
copy constructor is private
Symbols()
the default constructor is protected:
Definition Symbols.cpp:44
NodeMap m_nodes
the actual map of symbols
Definition Symbols.h:120
Symbols & operator=(const Symbols &)
assignment operator is private
The abstract class which represents the single "node" of decay tree.
Definition iNode.h:35
The abstract interface to Particle Property Service.
A bit modified version of 'Loki::AssocVector' associative vector from Loki library by Andrei Alexandr...
Definition VectorMap.h:100
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
void help(const std::string &argv0)
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1