Simple class, which represents the local storage of N-tuple items of the given type.
More...
#include <GaudiAlg/TuplePut.h>
template<class VALUE>
class Tuples::ItemStore< VALUE >
Simple class, which represents the local storage of N-tuple items of the given type.
Essentially it is a restricted GaudiUtils::HashMap with the ownership of the newly created entries
- Author
- Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
- Date
- 2007-04-08
Definition at line 38 of file TuplePut.h.
constructor : create empty map
the only one method:
Definition at line 51 of file TuplePut.h.
56 if (
m_map.
end() != ifound )
return ifound->second.get();
58 if ( !tuple )
return nullptr;
61 tuple->
Error(
"ItemStore::getItem('" + key +
"') item name is not unique" ).
ignore();
67 tuple->
Error(
"ItemStore::getItem('" + key +
"') invalid NTuple::Tuple*" ).
ignore();
73 if ( !stored.second ) {
74 tuple->
Warning(
"ItemStore::getItem('" + key +
"') item already exists, new one not inserted!" ).
ignore();
77 auto& item = stored.first->second;
81 tuple->
Error(
"ItemStore::getItem('" + key +
"') cannot addItem", sc ).
ignore();
87 tuple->
Warning(
"ItemStore::getItem('" + key +
"') the item not unique " ).
ignore();
const NTuple::Tuple * tuple() const
provide the access to underlying Gaudi N-tuple
bool goodItem(const std::string &name) const
check the uniqueness of the name
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
virtual StatusCode Warning(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
bool addItem(std::string name, std::string type)
add the item name into the list of known items
This class is used for returning status codes from appropriate routines.
Store m_map
the underlying map
iterator find(const key_type &key)
std::pair< iterator, bool > emplace(Args &&...args)
Abstract base class which allows the user to interact with the actual N tuple implementation.
iterator erase(const_iterator pos)
virtual StatusCode Error(const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const =0
const StatusCode & ignore() const
Ignore/check StatusCode.
StatusCode addItem(const std::string &name, Item< TYPE > &itm)
Add a scalar data item a N tuple.
the underlying map
the underlying map
Definition at line 101 of file TuplePut.h.
The documentation for this class was generated from the following file: