Detects the presence of a new event. More...
#include <ChangeTrackers.h>
Classes | |
struct | LocalState_t |
Public Member Functions | |
EventChangeTracker_t ()=default | |
Default constructor: no current event, next event is a new one. More... | |
EventChangeTracker_t (art::Event const &evt) | |
Constructor: current event as specified. More... | |
EventChangeTracker_t (art::EventID const &evt_id) | |
Constructor: current event as specified by the event ID. More... | |
operator std::string () const | |
Returns a string representing the current state. More... | |
State query | |
Returns whether this tracker is in the same state as another | |
bool | same (EventChangeTracker_t const &as) const |
bool | isValid () const |
Returns whether there is a current event. More... | |
bool | operator== (EventChangeTracker_t const &as) const |
Returns whether this tracker is in the same state as another. More... | |
bool | operator!= (EventChangeTracker_t const &than) const |
Returns whether this tracker is in a different state than another. More... | |
State change | |
Forgets the current event | |
void | clear () |
void | set (art::EventID const &evt_id) |
Sets the current event ID. More... | |
void | set (art::Event const &evt) |
Sets the current event ID from the given event. More... | |
bool | update (EventChangeTracker_t const &trk) |
Sets the current event, and returns true if it is changed. More... | |
Protected Member Functions | |
art::EventID const & | eventID () const |
Returns the current event ID (it might be made public...) More... | |
Private Attributes | |
LocalState_t | state |
local state of the tracker (may inherit some more) More... | |
Detects the presence of a new event.
The state of this class describes the current event by its ID.
Definition at line 32 of file ChangeTrackers.h.
|
default |
Default constructor: no current event, next event is a new one.
|
inline |
Constructor: current event as specified.
Definition at line 38 of file ChangeTrackers.h.
|
inline |
Constructor: current event as specified by the event ID.
Definition at line 41 of file ChangeTrackers.h.
|
inline |
Definition at line 63 of file ChangeTrackers.h.
|
inlineprotected |
Returns the current event ID (it might be made public...)
Definition at line 91 of file ChangeTrackers.h.
|
inline |
Returns whether there is a current event.
Definition at line 50 of file ChangeTrackers.h.
|
inline |
Returns a string representing the current state.
Definition at line 81 of file ChangeTrackers.h.
|
inline |
Returns whether this tracker is in a different state than another.
Definition at line 56 of file ChangeTrackers.h.
|
inline |
Returns whether this tracker is in the same state as another.
Definition at line 53 of file ChangeTrackers.h.
|
inline |
Definition at line 46 of file ChangeTrackers.h.
|
inline |
Sets the current event ID.
Definition at line 66 of file ChangeTrackers.h.
|
inline |
Sets the current event ID from the given event.
Definition at line 69 of file ChangeTrackers.h.
|
inline |
Sets the current event, and returns true if it is changed.
Definition at line 72 of file ChangeTrackers.h.
|
private |
local state of the tracker (may inherit some more)
Definition at line 99 of file ChangeTrackers.h.