ATLAS Offline Software
|
#include <TrigComposite.h>
Public Member Functions | |
TrigComposite (const std::string &name) | |
Constructs empty composite, no objects no details. More... | |
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. More... | |
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). More... | |
bool | isValid () const |
Checks the validity of the format, i.e. More... | |
void | lockFormat () |
makes further addition of the details impossible More... | |
bool | isFormatLocked () const |
return true if the format can not be further changed (no addDetail can be called) More... | |
void | unlockFormat () |
makes addition of further details possible again More... | |
void | addObject (const std::string &key, TrigFeatureLink link) |
adds the link More... | |
void | setObject (const std::string &key, TrigFeatureLink link) |
sets the link More... | |
bool | hasObject (const std::string &key) const |
checks if the object has link to the object under the key More... | |
const TrigFeatureLink & | getObject (const std::string &key) const |
returns More... | |
template<typename T > | |
std::vector< TrigFeatureLink > | getObjectsByType (const std::string &keypart="") const |
get all links which point to objects of given type More... | |
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 More... | |
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 More... | |
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. More... | |
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 More... | |
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. More... | |
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. More... | |
TrigComposite () | |
Deafault constructor, should not be normally used, needed by the persistency layer. More... | |
~TrigComposite () | |
Destructor, does nothing special in fact, no links are touched. More... | |
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 |
bool | m_locked |
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 26 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 176 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
TrigComposite::TrigComposite | ( | const std::string & | name | ) |
Constructs empty composite, no objects no details.
Definition at line 19 of file TrigComposite.cxx.
TrigComposite::TrigComposite | ( | const std::string & | name, |
std::string & | label1, | ||
TrigFeatureLink | t1, | ||
std::string & | label2, | ||
TrigFeatureLink | t2 | ||
) |
TrigComposite::TrigComposite | ( | ) |
Deafault constructor, should not be normally used, needed by the persistency layer.
Definition at line 13 of file TrigComposite.cxx.
TrigComposite::~TrigComposite | ( | ) |
Destructor, does nothing special in fact, no links are touched.
Definition at line 83 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 89 of file TrigComposite.cxx.
void TrigComposite::addObject | ( | const std::string & | key, |
TrigFeatureLink | link | ||
) |
adds the link
Definition at line 54 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 149 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 135 of file TrigComposite.cxx.
|
private |
Definition at line 144 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 129 of file TrigComposite.cxx.
return the value of the detail, if the key is absent the default is returned
Definition at line 121 of file TrigComposite.cxx.
const TrigFeatureLink & TrigComposite::getObject | ( | const std::string & | key | ) | const |
returns
Definition at line 67 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 225 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 112 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 63 of file TrigComposite.cxx.
|
inline |
return true if the format can not be further changed (no addDetail can be called)
Definition at line 71 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 71 of file TrigComposite.cxx.
|
inline |
makes further addition of the details impossible
Definition at line 66 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 47 of file TrigComposite.cxx.
|
inline |
Definition at line 42 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
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 101 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 37 of file TrigComposite.cxx.
void TrigComposite::setObject | ( | const std::string & | key, |
TrigFeatureLink | link | ||
) |
sets the link
Definition at line 58 of file TrigComposite.cxx.
|
private |
|
inline |
makes addition of further details possible again
Definition at line 77 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 181 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 184 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 178 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 214 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 213 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 187 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 190 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 193 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 196 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.
|
private |
Definition at line 197 of file Trigger/TrigEvent/TrigCombinedEvent/TrigCombinedEvent/TrigComposite.h.