Detects the presence of a new event or data product. More...
#include <ChangeTrackers.h>
Classes | |
struct | LocalState_t |
Public Member Functions | |
DataProductChangeTracker_t ()=default | |
Default constructor: no current data product. More... | |
DataProductChangeTracker_t (art::Event const &evt, art::InputTag const &label) | |
Constructor: specifies current event and data product label. More... | |
DataProductChangeTracker_t (art::EventID const &evt_id, art::InputTag const &label) | |
Constructor: specifies current event ID and data product label. More... | |
operator std::string () const | |
Returns a string representation of event and data product label. More... | |
State query | |
Returns the current input label | |
art::InputTag const & | inputLabel () const |
bool | sameEvent (DataProductChangeTracker_t const &as) const |
Returns whether we are in the same event (the rest could differ) More... | |
bool | same (DataProductChangeTracker_t const &as) const |
Returns whether we have same data product as in "as". More... | |
bool | isValid () const |
Returns whether there is a current event and data product. More... | |
bool | operator== (DataProductChangeTracker_t const &as) const |
Returns whether the event and input label are the same as in "as". More... | |
bool | operator!= (DataProductChangeTracker_t const &than) const |
Returns whether the event or input label are different than in "than". More... | |
State change | |
Forget the current data product | |
void | clear () |
void | set (art::Event const &evt, art::InputTag const &label) |
Set a new event and data product label as current. More... | |
bool | update (DataProductChangeTracker_t const &new_prod) |
Update to a new data product, return true if it has changed. More... | |
Private Member Functions | |
void | SetInputLabel (art::InputTag const &label) |
Private Member Functions inherited from util::EventChangeTracker_t | |
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... | |
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... | |
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... | |
art::EventID const & | eventID () const |
Returns the current event ID (it might be made public...) More... | |
Private Attributes | |
LocalState_t | state |
Detects the presence of a new event or data product.
The state of this class describes the current data product input as the event it belongs to (by its ID) and the input tag.
Definition at line 116 of file ChangeTrackers.h.
|
default |
Default constructor: no current data product.
|
inline |
Constructor: specifies current event and data product label.
Definition at line 124 of file ChangeTrackers.h.
|
inline |
Constructor: specifies current event ID and data product label.
Definition at line 130 of file ChangeTrackers.h.
|
inline |
Definition at line 168 of file ChangeTrackers.h.
|
inline |
Definition at line 138 of file ChangeTrackers.h.
|
inline |
Returns whether there is a current event and data product.
Definition at line 149 of file ChangeTrackers.h.
|
inline |
Returns a string representation of event and data product label.
Definition at line 186 of file ChangeTrackers.h.
|
inline |
Returns whether the event or input label are different than in "than".
Definition at line 160 of file ChangeTrackers.h.
|
inline |
Returns whether the event and input label are the same as in "as".
Definition at line 156 of file ChangeTrackers.h.
|
inline |
Returns whether we have same data product as in "as".
Definition at line 145 of file ChangeTrackers.h.
|
inline |
Returns whether we are in the same event (the rest could differ)
Definition at line 141 of file ChangeTrackers.h.
|
inline |
Set a new event and data product label as current.
Definition at line 172 of file ChangeTrackers.h.
|
inlineprivate |
Definition at line 199 of file ChangeTrackers.h.
|
inline |
Update to a new data product, return true if it has changed.
Definition at line 176 of file ChangeTrackers.h.
|
private |
Definition at line 197 of file ChangeTrackers.h.