JANA2
JEvent Class Reference
Inheritance diagram for JEvent:
Collaboration diagram for JEvent:

Public Member Functions

 JEvent (JApplication *aApplication=nullptr)
 
void SetFactorySet (JFactorySet *aFactorySet)
 
template<class T >
JFactoryT< T > * GetFactory (const std::string &tag="", bool throw_on_missing=false) const
 GetFactory() should be used with extreme care because it subverts the JEvent abstraction. More...
 
template<class T >
std::vector< JFactoryT< T > * > GetFactoryAll (bool throw_on_missing=false) const
 GetFactoryAll returns all JFactoryT's for type T (each corresponds to a different tag). More...
 
template<class T >
JMetadata< T > GetMetadata (const std::string &tag="") const
 GetMetadata() provides access to any metadata generated by the underlying JFactory during Process()
 
template<class T >
JFactoryT< T > * Get (const T **item, const std::string &tag="") const
 C-style getters.
 
template<class T >
JFactoryT< T > * Get (std::vector< const T * > &vec, const std::string &tag="") const
 
template<class T >
void GetAll (std::vector< const T * > &vec) const
 GetAll returns all JObjects of (child) type T, regardless of tag.
 
template<class T >
const T * GetSingle (const std::string &tag="") const
 C++ style getters.
 
template<class T >
std::vector< const T * > Get (const std::string &tag="") const
 
template<class T >
JFactoryT< T >::PairType GetIterators (const std::string &aTag="") const
 
template<class T >
std::vector< const T * > GetAll () const
 GetAll returns all JObjects of (child) type T, regardless of tag.
 
template<class T >
std::map< std::pair< std::string, std::string >, std::vector< T * > > GetAllChildren () const
 
template<class T >
JFactoryT< T > * Insert (T *item, const std::string &aTag="") const
 Insert() allows an EventSource to insert items directly into the JEvent, removing the need for user-extended JEvents and/or JEventSource::GetObjects(...) Repeated calls to Insert() will append to the previous data rather than overwrite it, which saves the user from having to allocate a throwaway vector and requires less error handling. More...
 
template<class T >
JFactoryT< T > * Insert (const std::vector< T * > &items, const std::string &tag="") const
 
void SetRunNumber (uint32_t aRunNumber)
 
void SetEventNumber (uint64_t aEventNumber)
 
void SetJApplication (JApplication *app)
 
void SetJEventSource (JEventSource *aSource)
 
uint32_t GetRunNumber () const
 
uint64_t GetEventNumber () const
 
JApplicationGetJApplication () const
 
JEventSourceGetJEventSource () const
 
template<class S >
std::map< std::pair< std::string, std::string >, std::vector< S * > > GetAllChildren () const
 
- Public Member Functions inherited from JResettable
virtual void Release (void)
 
virtual void Reset (void)
 

Protected Attributes

JFactorySetmFactorySet = nullptr
 
JEventSourcemEventSource = nullptr
 
bool mIsBarrierEvent = false
 

Friends

class JEventPool
 

Member Function Documentation

template<class T >
JFactoryT< T > * JEvent::GetFactory ( const std::string &  tag = "",
bool  throw_on_missing = false 
) const
inline

GetFactory() should be used with extreme care because it subverts the JEvent abstraction.

Most historical uses of GetFactory are far better served by GetMetadata.

template<class T >
std::vector< JFactoryT< T > * > JEvent::GetFactoryAll ( bool  throw_on_missing = false) const
inline

GetFactoryAll returns all JFactoryT's for type T (each corresponds to a different tag).

This is useful when there are many different tags, or the tags are unknown, and the user wishes to examine them all together.

template<class T >
JFactoryT< T > * JEvent::Insert ( T *  item,
const std::string &  tag = "" 
) const
inline

Insert() allows an EventSource to insert items directly into the JEvent, removing the need for user-extended JEvents and/or JEventSource::GetObjects(...) Repeated calls to Insert() will append to the previous data rather than overwrite it, which saves the user from having to allocate a throwaway vector and requires less error handling.

References JFactorySet::Add().

Here is the call graph for this function:


The documentation for this class was generated from the following file: