Detects the presence of a new event, data product or wire plane. More...
#include <ChangeTrackers.h>
Classes | |
struct | LocalState_t |
Public Member Functions | |
PlaneDataChangeTracker_t ()=default | |
Default constructor: no current plane data. More... | |
PlaneDataChangeTracker_t (art::Event const &evt, art::InputTag const &label, geo::PlaneID const &pid) | |
Constructor: specifies current data product and TPC plane. More... | |
PlaneDataChangeTracker_t (art::EventID const &evt_id, art::InputTag const &label, geo::PlaneID const &pid) | |
Constructor: specifies current data product and TPC plane. More... | |
operator std::string () const | |
Returns a string representation of event and data product label. More... | |
State query | |
Returns the current input label | |
geo::PlaneID const & | planeID () const |
Returns the current plane ID. More... | |
bool | sameProduct (PlaneDataChangeTracker_t const &as) const |
Returns whether we are in the same event (the rest could differ) More... | |
bool | sameTPC (PlaneDataChangeTracker_t const &as) const |
Returns whether we have the same data product and TPC as "as". More... | |
bool | same (PlaneDataChangeTracker_t const &as) const |
Returns whether we have the same plane data as "as". More... | |
bool | isValid () const |
Returns whether there is a data product and plane. More... | |
bool | operator== (PlaneDataChangeTracker_t const &as) const |
Returns whether data product and TPC plane are the same as in "as". More... | |
bool | operator!= (PlaneDataChangeTracker_t const &than) const |
Returns whether data product or TPC plane 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, geo::PlaneID const &pid) |
Set a new event and data product label as current. More... | |
bool | update (PlaneDataChangeTracker_t const &new_prod) |
Update to a new data product, return true if it has changed. More... | |
Private Member Functions | |
void | SetPlaneID (geo::PlaneID const &pid) |
Private Member Functions inherited from util::DataProductChangeTracker_t | |
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... | |
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... | |
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 Attributes | |
LocalState_t | state |
Detects the presence of a new event, data product or wire plane.
The state of this class describes the current data product input as the event it belongs to (by its ID) and the input tag, and the current wire plane in the TPC.
Definition at line 218 of file ChangeTrackers.h.
|
default |
Default constructor: no current plane data.
|
inline |
Constructor: specifies current data product and TPC plane.
Definition at line 225 of file ChangeTrackers.h.
|
inline |
Constructor: specifies current data product and TPC plane.
Definition at line 232 of file ChangeTrackers.h.
|
inline |
Definition at line 280 of file ChangeTrackers.h.
|
inline |
Returns whether there is a data product and plane.
Definition at line 264 of file ChangeTrackers.h.
|
inline |
Returns a string representation of event and data product label.
Definition at line 300 of file ChangeTrackers.h.
|
inline |
Returns whether data product or TPC plane are different than in "than".
Definition at line 272 of file ChangeTrackers.h.
|
inline |
Returns whether data product and TPC plane are the same as in "as".
Definition at line 268 of file ChangeTrackers.h.
|
inline |
Returns the current plane ID.
Definition at line 246 of file ChangeTrackers.h.
|
inline |
Returns whether we have the same plane data as "as".
Definition at line 260 of file ChangeTrackers.h.
|
inline |
Returns whether we are in the same event (the rest could differ)
Definition at line 249 of file ChangeTrackers.h.
|
inline |
Returns whether we have the same data product and TPC as "as".
Definition at line 253 of file ChangeTrackers.h.
|
inline |
Set a new event and data product label as current.
Definition at line 284 of file ChangeTrackers.h.
|
inlineprivate |
Definition at line 313 of file ChangeTrackers.h.
|
inline |
Update to a new data product, return true if it has changed.
Definition at line 290 of file ChangeTrackers.h.
|
private |
Definition at line 311 of file ChangeTrackers.h.