LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
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 |
Returns whether we are in the same event (the rest could differ) More... | |
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 () |
Set a new event and data product label as current. More... | |
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) |
art::EventID const & | eventID () const |
Returns the current event ID (it might be made public...) More... | |
State query | |
Returns whether this tracker is in the same state as another | |
bool | same (EventChangeTracker_t const &as) const |
Returns whether this tracker is in the same state as another. 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 | 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... | |
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 |
Set a new event and data product label as current.
Definition at line 168 of file ChangeTrackers.h.
References util::EventChangeTracker_t::clear().
Referenced by util::PlaneDataChangeTracker_t::clear(), and evd::TWQProjectionView::OnNewEvent().
|
inlineprotectedinherited |
Returns the current event ID (it might be made public...)
Definition at line 91 of file ChangeTrackers.h.
References util::EventChangeTracker_t::LocalState_t::event_id, and util::EventChangeTracker_t::state.
Referenced by util::EventChangeTracker_t::isValid(), util::EventChangeTracker_t::operator std::string(), and util::EventChangeTracker_t::same().
|
inline |
Returns whether we are in the same event (the rest could differ)
Definition at line 138 of file ChangeTrackers.h.
References util::EventChangeTracker_t::state.
Referenced by evd::details::RawDigitCacheDataClass::CheckUpToDate(), util::PlaneDataChangeTracker_t::PlaneDataChangeTracker_t(), same(), and evd::details::RawDigitCacheDataClass::Update().
|
inline |
Returns whether there is a current event and data product.
Definition at line 149 of file ChangeTrackers.h.
References util::EventChangeTracker_t::isValid().
Referenced by util::PlaneDataChangeTracker_t::isValid(), and evd::TWQProjectionView::OnNewEvent().
|
inline |
Returns a string representation of event and data product label.
Definition at line 186 of file ChangeTrackers.h.
|
inlineinherited |
Returns whether this tracker is in a different state than another.
Definition at line 56 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inline |
Returns whether the event or input label are different than in "than".
Definition at line 160 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inlineinherited |
Returns whether this tracker is in the same state as another.
Definition at line 53 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inline |
Returns whether the event and input label are the same as in "as".
Definition at line 156 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inlineinherited |
Returns whether this tracker is in the same state as another.
Definition at line 46 of file ChangeTrackers.h.
References util::EventChangeTracker_t::eventID().
Referenced by util::EventChangeTracker_t::operator!=(), operator!=(), util::PlaneDataChangeTracker_t::operator!=(), util::EventChangeTracker_t::operator==(), operator==(), util::PlaneDataChangeTracker_t::operator==(), sameEvent(), util::EventChangeTracker_t::update(), update(), and util::PlaneDataChangeTracker_t::update().
|
inline |
Returns whether we have same data product as in "as".
Definition at line 145 of file ChangeTrackers.h.
References inputLabel().
Referenced by util::PlaneDataChangeTracker_t::sameProduct().
|
inline |
Returns whether we are in the same event (the rest could differ)
Definition at line 141 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inlineinherited |
Sets the current event ID.
Definition at line 66 of file ChangeTrackers.h.
References util::EventChangeTracker_t::LocalState_t::event_id, and util::EventChangeTracker_t::state.
Referenced by set().
|
inlineinherited |
Sets the current event ID from the given event.
Definition at line 69 of file ChangeTrackers.h.
|
inline |
Set a new event and data product label as current.
Definition at line 172 of file ChangeTrackers.h.
References util::EventChangeTracker_t::set().
Referenced by util::PlaneDataChangeTracker_t::set().
|
inlineprivate |
Definition at line 199 of file ChangeTrackers.h.
References util::DataProductChangeTracker_t::LocalState_t::input_label, and label.
|
inlineinherited |
Sets the current event, and returns true if it is changed.
Definition at line 72 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
|
inline |
Update to a new data product, return true if it has changed.
Definition at line 176 of file ChangeTrackers.h.
References util::EventChangeTracker_t::same().
Referenced by evd::TWQProjectionView::OnNewEvent().
|
private |
Definition at line 197 of file ChangeTrackers.h.