![]() |
ATLAS Offline Software
|
The class is meant to store links (of type TrigFeatureLink) to trigger objects and arbitrary details (of type, float, int, string, or vectors of those) More...
#include <TrigComposite.h>
Public Member Functions | |
| TrigComposite (const std::string &name) | |
| Constructs empty composite, no objects no details. | |
| TrigComposite ()=default | |
| Default constructor should not be normally used, needed by the persistency layer. | |
| TrigComposite (TrigComposite &&) noexcept=default | |
| TrigComposite & | operator= (TrigComposite &&) noexcept=default |
| ~TrigComposite ()=default | |
| TrigComposite (const std::string &name, std::string &label1, TrigFeatureLink t1, std::string &label2, TrigFeatureLink t2) | |
| Constructs composite with the links to two trigger objects/links to them The validity of the links is not checked during the construction. | |
| const std::string & | name () const |
| template<typename T> | |
| void | setFormat (const std::vector< std::string > &keys, bool mustBeSet=false) |
| defines the content (details which must to be stored) The method can be used to enforce certain content of the object (set the demand that the deail are set). | |
| bool | isValid () const |
| Checks the validity of the format, i.e. | |
| void | lockFormat () |
| makes further addition of the details impossible | |
| bool | isFormatLocked () const |
| return true if the format can not be further changed (no addDetail can be called) | |
| void | unlockFormat () |
| makes addition of further details possible again | |
| void | addObject (const std::string &key, TrigFeatureLink link) |
| adds the link | |
| void | setObject (const std::string &key, TrigFeatureLink link) |
| sets the link | |
| bool | hasObject (const std::string &key) const |
| checks if the object has link to the object under the key | |
| const TrigFeatureLink & | getObject (const std::string &key) const |
| returns | |
| template<typename T> | |
| std::vector< TrigFeatureLink > | getObjectsByType (const std::string &keypart="") const |
| get all links which point to objects of given type | |
| template<typename T> | |
| void | addDetail (const std::string &key, const T &value=T()) |
| adds the value user the key, if they detail under that key already exists the exception is thrown If the format is locked the exception is thrown each time | |
| template<typename T> | |
| void | setDetail (const std::string &key, const T &value) |
| sets the value user the key, if they detail under that key already exists it's value is overwritten, If the key does not exists, the exception is thrown | |
| template<typename T> | |
| bool | hasDetail (const std::string &key) const |
| Checks if the object contains detail of the type T No verification is made if it is set. | |
| template<typename T> | |
| const T & | getDetail (const std::string &key) const |
| return the value of the detail, if the key is absent the default is returned | |
| template<class T> | |
| const std::map< std::string, T > & | allDetails () const |
| return the map of all the details Notie that the non-const version is not provided because it would allow to circumvent format fixing whcih may be defined for this object. | |
| template<typename T> | |
| void | eraseDetail (const std::string &key) |
| erases the detail if it existed If the details inder that key did not exist, no action is performed. | |
Private Types | |
| typedef std::set< std::string > | MustSetList |
Private Member Functions | |
| template<class T> | |
| void | mustSet (const std::string &key) |
| template<typename T> | |
| std::map< std::string, T > & | detailsMap () |
| template<typename T> | |
| const std::map< std::string, T > & | detailsMap () const |
| template<typename T> | |
| MustSetList & | detailsMustSetList () |
| template<typename T> | |
| const T & | specimen () const |
Private Attributes | |
| std::map< std::string, TrigFeatureLink > | m_links |
| MustSetList | m_linksToBeSet |
| std::map< std::string, float > | m_floats |
| MustSetList | m_floatsToBeSet |
| std::map< std::string, int > | m_ints |
| MustSetList | m_intsToBeSet |
| std::map< std::string, std::string > | m_strings |
| MustSetList | m_stringsToBeSet |
| std::map< std::string, std::vector< float > > | m_v_floats |
| MustSetList | m_v_floatsToBeSet |
| std::map< std::string, std::vector< int > > | m_v_ints |
| MustSetList | m_v_intsToBeSet |
| std::map< std::string, std::vector< std::string > > | m_v_strings |
| MustSetList | m_v_stringsToBeSet |
| std::string | m_name {"dummy"} |
| bool | m_locked {false} |
The class is meant to store links (of type TrigFeatureLink) to trigger objects and arbitrary details (of type, float, int, string, or vectors of those)
Definition at line 27 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 177 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
| TrigComposite::TrigComposite | ( | const std::string & | name | ) |
Constructs empty composite, no objects no details.
Definition at line 12 of file TrigComposite.cxx.
|
default |
Default constructor should not be normally used, needed by the persistency layer.
|
defaultnoexcept |
|
default |
| TrigComposite::TrigComposite | ( | const std::string & | name, |
| std::string & | label1, | ||
| TrigFeatureLink | t1, | ||
| std::string & | label2, | ||
| TrigFeatureLink | t2 ) |
Constructs composite with the links to two trigger objects/links to them The validity of the links is not checked during the construction.
Definition at line 19 of file TrigComposite.cxx.
| void TrigComposite::addDetail | ( | const std::string & | key, |
| const T & | value = T() ) |
adds the value user the key, if they detail under that key already exists the exception is thrown If the format is locked the exception is thrown each time
Definition at line 80 of file TrigComposite.cxx.
| void TrigComposite::addObject | ( | const std::string & | key, |
| TrigFeatureLink | link ) |
adds the link
Definition at line 47 of file TrigComposite.cxx.
|
inline |
return the map of all the details Notie that the non-const version is not provided because it would allow to circumvent format fixing whcih may be defined for this object.
Definition at line 159 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 126 of file TrigComposite.cxx.
|
private |
Definition at line 135 of file TrigComposite.cxx.
|
private |
| void TrigComposite::eraseDetail | ( | const std::string & | key | ) |
erases the detail if it existed If the details inder that key did not exist, no action is performed.
Definition at line 120 of file TrigComposite.cxx.
| const T & TrigComposite::getDetail | ( | const std::string & | key | ) | const |
return the value of the detail, if the key is absent the default is returned
Definition at line 112 of file TrigComposite.cxx.
| const TrigFeatureLink & TrigComposite::getObject | ( | const std::string & | key | ) | const |
returns
Definition at line 60 of file TrigComposite.cxx.
| std::vector< TrigFeatureLink > TrigComposite::getObjectsByType | ( | const std::string & | keypart = "" | ) | const |
get all links which point to objects of given type
Definition at line 226 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
| bool TrigComposite::hasDetail | ( | const std::string & | key | ) | const |
Checks if the object contains detail of the type T No verification is made if it is set.
Definition at line 103 of file TrigComposite.cxx.
| bool TrigComposite::hasObject | ( | const std::string & | key | ) | const |
checks if the object has link to the object under the key
Definition at line 56 of file TrigComposite.cxx.
|
inline |
return true if the format can not be further changed (no addDetail can be called)
Definition at line 81 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
| bool TrigComposite::isValid | ( | ) | const |
Checks the validity of the format, i.e.
if all the details which were meant to be added are added
Definition at line 64 of file TrigComposite.cxx.
|
inline |
makes further addition of the details impossible
Definition at line 76 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 40 of file TrigComposite.cxx.
|
inline |
Definition at line 52 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
defaultnoexcept |
| void TrigComposite::setDetail | ( | const std::string & | key, |
| const T & | value ) |
sets the value user the key, if they detail under that key already exists it's value is overwritten, If the key does not exists, the exception is thrown
Definition at line 92 of file TrigComposite.cxx.
| void TrigComposite::setFormat | ( | const std::vector< std::string > & | keys, |
| bool | mustBeSet = false ) |
defines the content (details which must to be stored) The method can be used to enforce certain content of the object (set the demand that the deail are set).
Each type of the details can be fixed independently. Also the links can be demanded to be set this way.
This functionality can be used in some sort factories producing TrigComposite of fixed content/contract for the numer of algorithms which they will be "forced" to fill. The enforcement is weak, the isValid method can be then called and so the fulfillment of the contract.
Definition at line 30 of file TrigComposite.cxx.
| void TrigComposite::setObject | ( | const std::string & | key, |
| TrigFeatureLink | link ) |
sets the link
Definition at line 51 of file TrigComposite.cxx.
|
private |
|
inline |
makes addition of further details possible again
Definition at line 87 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 182 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 183 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 185 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 186 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 179 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 180 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 215 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 214 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 188 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 189 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 191 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 192 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 194 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 195 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 197 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 198 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.