PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
|
#include <EventStore.h>
Public Types | |
typedef std::pair< std::string, CollectionBase * > | CollPair |
Collection entry. Each collection is identified by a name. | |
typedef std::vector< CollPair > | CollContainer |
Public Member Functions | |
EventStore (const EventStore &)=delete | |
Make non-copyable. | |
EventStore & | operator= (const EventStore &)=delete |
EventStore () | |
~EventStore () | |
template<typename T > | |
T & | create (const std::string &name) |
create a new collection | |
void | registerCollection (const std::string &name, podio::CollectionBase *coll) |
register an existing collection | |
template<typename T > | |
bool | get (const std::string &name, const T *&collection) |
access a collection by name. returns true if successful | |
CollectionBase * | getFast (int id) const |
fast access to cached collections | |
bool | get (int id, CollectionBase *&coll) const final |
access a collection by ID. returns true if successful | |
template<typename T > | |
const T & | get (const std::string &name) |
void | clearCollections () |
empties collections. | |
void | clear () |
clears itself; deletes collections (use at end of event processing) | |
void | clearCaches () |
Clears only the cache containers (use at end of event if ownership of read objects is transferred) | |
void | setReader (IReader *reader) |
set the reader | |
CollectionIDTable * | getCollectionIDTable () const |
virtual bool | isValid () const final |
GenericParameters & | getEventMetaData () override |
return the event meta data for the current event | |
GenericParameters & | getRunMetaData (int runID) override |
return the run meta data for the given runID | |
GenericParameters & | getCollectionMetaData (int colID) override |
return the collection meta data for the given colID | |
RunMDMap * | getRunMetaDataMap () |
ColMDMap * | getColMetaDataMap () |
GenericParameters * | eventMetaDataPtr () |
Public Member Functions inherited from podio::ICollectionProvider | |
virtual | ~ICollectionProvider ()=default |
destructor | |
virtual bool | get (int collectionID, CollectionBase *&collection) const =0 |
access a collection by ID. returns true if successful | |
Public Member Functions inherited from podio::IMetaDataProvider | |
virtual | ~IMetaDataProvider ()=default |
destructor | |
virtual GenericParameters & | getEventMetaData ()=0 |
return the event meta data for the current event | |
virtual GenericParameters & | getRunMetaData (int runID)=0 |
return the run meta data for the given runID | |
virtual GenericParameters & | getCollectionMetaData (int colID)=0 |
return the collection meta data for the given colID | |
Definition at line 37 of file EventStore.h.
typedef std::vector<CollPair> podio::EventStore::CollContainer |
Definition at line 45 of file EventStore.h.
typedef std::pair<std::string, CollectionBase*> podio::EventStore::CollPair |
Collection entry. Each collection is identified by a name.
Definition at line 44 of file EventStore.h.
|
delete |
Make non-copyable.
podio::EventStore::EventStore | ( | ) |
Definition at line 9 of file EventStore.cc.
podio::EventStore::~EventStore | ( | ) |
Definition at line 13 of file EventStore.cc.
void podio::EventStore::clear | ( | ) |
clears itself; deletes collections (use at end of event processing)
Definition at line 126 of file EventStore.cc.
Referenced by testWithIO().
void podio::EventStore::clearCaches | ( | ) |
Clears only the cache containers (use at end of event if ownership of read objects is transferred)
Definition at line 136 of file EventStore.cc.
Referenced by clear().
void podio::EventStore::clearCollections | ( | ) |
empties collections.
Definition at line 119 of file EventStore.cc.
Referenced by testWithIO(), and write().
T & podio::EventStore::create | ( | const std::string & | name | ) |
create a new collection
Definition at line 133 of file EventStore.h.
Referenced by testWithIO(), and write().
|
inline |
Definition at line 107 of file EventStore.h.
Referenced by podio::ROOTWriter::ROOTWriter(), and podio::SIOWriter::SIOWriter().
const T & podio::EventStore::get | ( | const std::string & | name | ) |
access a collection by name returns a collection w/ setting isValid to true if successful
Definition at line 156 of file EventStore.h.
bool podio::EventStore::get | ( | const std::string & | name, |
const T *& | collection | ||
) |
access a collection by name. returns true if successful
Definition at line 143 of file EventStore.h.
Referenced by podio::ROOTWriter::finish(), get(), podio::ASCIIWriter::registerForWrite(), podio::ROOTWriter::registerForWrite(), podio::SIOWriter::registerForWrite(), podio::SIOCollectionIDTableBlock::SIOCollectionIDTableBlock(), testWithIO(), and podio::ROOTWriter::writeEvent().
|
finalvirtual |
access a collection by ID. returns true if successful
Implements podio::ICollectionProvider.
Definition at line 19 of file EventStore.cc.
|
inline |
Definition at line 86 of file EventStore.h.
Referenced by podio::ROOTWriter::finish(), and podio::SIOCollectionIDTableBlock::SIOCollectionIDTableBlock().
|
overridevirtual |
return the collection meta data for the given colID
Implements podio::IMetaDataProvider.
Definition at line 109 of file EventStore.cc.
Referenced by write().
|
inline |
Definition at line 104 of file EventStore.h.
Referenced by podio::ROOTWriter::finish(), and podio::SIOWriter::SIOWriter().
|
overridevirtual |
return the event meta data for the current event
Implements podio::IMetaDataProvider.
Definition at line 89 of file EventStore.cc.
Referenced by write().
|
inline |
fast access to cached collections
Definition at line 62 of file EventStore.h.
Referenced by get().
|
overridevirtual |
return the run meta data for the given runID
Implements podio::IMetaDataProvider.
Definition at line 99 of file EventStore.cc.
|
inline |
Definition at line 101 of file EventStore.h.
Referenced by podio::ROOTWriter::finish(), and podio::SIOWriter::SIOWriter().
|
finalvirtual |
Definition at line 54 of file EventStore.cc.
|
delete |
void podio::EventStore::registerCollection | ( | const std::string & | name, |
podio::CollectionBase * | coll | ||
) |
register an existing collection
Definition at line 48 of file EventStore.cc.
Referenced by create().
void podio::EventStore::setReader | ( | IReader * | reader | ) |
set the reader
Definition at line 149 of file EventStore.cc.
Referenced by podio::PythonEventStore::PythonEventStore(), and testWithIO().