LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::EventID Class Reference

#include "EventID.h"

Classes

struct  FlushFlag
 

Public Member Functions

constexpr EventID ()
 
 EventID (RunNumber_t r, SubRunNumber_t sr, EventNumber_t e)
 
 EventID (SubRunID const &sID, EventNumber_t e)
 
RunID const & runID () const
 
RunNumber_t run () const
 
SubRunID const & subRunID () const
 
SubRunNumber_t subRun () const
 
EventNumber_t event () const
 
bool isValid () const
 
bool isFlush () const
 
EventID next () const
 
EventID nextSubRun (EventNumber_t first=IDNumber< Level::Event >::first()) const
 
EventID nextRun () const
 
EventID previous () const
 
EventID previousSubRun () const
 
EventID previousRun () const
 
bool operator== (EventID const &other) const
 
bool operator!= (EventID const &other) const
 
bool operator< (EventID const &other) const
 
bool operator> (EventID const &other) const
 
bool operator<= (EventID const &other) const
 
bool operator>= (EventID const &other) const
 

Static Public Member Functions

static EventID maxEvent ()
 
static EventID firstEvent ()
 
static EventID firstEvent (SubRunID const &srID)
 
static constexpr EventID invalidEvent ()
 
static EventID invalidEvent (RunID rID)
 
static EventID invalidEvent (SubRunID const &srID)
 
static constexpr EventID flushEvent ()
 
static EventID flushEvent (RunID rID)
 
static EventID flushEvent (SubRunID srID)
 

Private Member Functions

constexpr EventID (FlushFlag)
 
 EventID (RunID rID, FlushFlag)
 
 EventID (SubRunID srID, FlushFlag)
 
EventNumber_t inRangeOrInvalid (EventNumber_t e)
 

Private Attributes

SubRunID subRun_
 
EventNumber_t event_
 

Friends

std::ostream & operator<< (std::ostream &os, EventID const &iID)
 

Detailed Description

Definition at line 20 of file EventID.h.

Constructor & Destructor Documentation

constexpr art::EventID::EventID ( )
inline

Definition at line 80 of file EventID.h.

82 {}
static constexpr type invalid()
Definition: IDNumber.h:16
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77
art::EventID::EventID ( RunNumber_t  r,
SubRunNumber_t  sr,
EventNumber_t  e 
)
inline

Definition at line 84 of file EventID.h.

85  : subRun_(r, sr), event_(inRangeOrInvalid(e))
86 {}
EventNumber_t inRangeOrInvalid(EventNumber_t e)
Definition: EventID.h:298
SubRunID subRun_
Definition: EventID.h:76
Float_t e
Definition: plot.C:34
EventNumber_t event_
Definition: EventID.h:77
art::EventID::EventID ( SubRunID const &  sID,
EventNumber_t  e 
)
inline

Definition at line 88 of file EventID.h.

90 {}
EventNumber_t inRangeOrInvalid(EventNumber_t e)
Definition: EventID.h:298
SubRunID subRun_
Definition: EventID.h:76
Float_t e
Definition: plot.C:34
EventNumber_t event_
Definition: EventID.h:77
constexpr art::EventID::EventID ( FlushFlag  )
inlineexplicitprivate

Definition at line 283 of file EventID.h.

286 {}
static constexpr SubRunID flushSubRun()
Definition: SubRunID.h:170
static constexpr type flush_value()
Definition: IDNumber.h:26
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77
art::EventID::EventID ( RunID  rID,
FlushFlag   
)
inlineprivate

Definition at line 288 of file EventID.h.

291 {}
static constexpr SubRunID flushSubRun()
Definition: SubRunID.h:170
static constexpr type flush_value()
Definition: IDNumber.h:26
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77
art::EventID::EventID ( SubRunID  srID,
FlushFlag   
)
inlineprivate

Definition at line 293 of file EventID.h.

294  : subRun_(std::move(srID)), event_(IDNumber<Level::Event>::flush_value())
295 {}
static constexpr type flush_value()
Definition: IDNumber.h:26
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77

Member Function Documentation

art::EventNumber_t art::EventID::event ( ) const
inline

Definition at line 117 of file EventID.h.

References event_.

Referenced by lar_pandora::PFParticleTrackAna::analyze(), opdet::OpHitAna::analyze(), opdet::OpFlashMCTruthAna::analyze(), lar_pandora::PFParticleCosmicAna::analyze(), lar_pandora::PFParticleMonitoring::analyze(), lar_pandora::PFParticleAnalysis::analyze(), lar_pandora::PFParticleHitDumper::analyze(), opdet::FlashHypothesisAna::analyze(), cheat::RecoCheckAna::analyze(), opreco::OpticalRecoAna::analyze(), hit::HitAnaModule::analyze(), opdet::TrackTimeAssocAna::analyze(), opdet::OpDigiAna::analyze(), opdet::OpFlashAna::analyze(), larg4::LArG4Ana::analyze(), opdet::FlashPurityCheckAna::analyze(), cluster::ClusterAna::analyze(), pfpf::PFPAna::analyze(), cluster::DBclusterAna::analyze(), hit::GausHitFinderAna::analyze(), hit::HitFinderAna::analyze(), cluster::HoughLineFinderAna::analyze(), opdet::SimPhotonCounter::analyze(), vertex::FeatureVertexFinderAna::analyze(), ems::MultiEMShowers::analyze(), evd::HitSelector::ChangeHit(), evd::GraphClusterAlg::CheckValidity(), t0::IndirectHitParticleAssns::CreateHitParticleAssociations(), art::ClosedRangeSetHandler::do_maybeSplitRange(), recob::DumpPFParticles::DotFileName(), art::EventAuxiliary::event(), art::EventPrincipal::event(), filter::EventFilter::filter(), filt::EmptyFilter::filter(), art::FileIndex::findEventForUnspecifiedSubRun(), rndm::NuRandomServiceHelper::ArtState::getEventSeedInputData(), evd::HeaderDrawer::Header(), recob::DumpPFParticles::MakePFParticleGraph(), art::EventIDMatcher::match(), evdb::DisplayWindow::OpenWindow(), lar_cluster3d::Cluster3D::PrepareEvent(), evdb::EventDisplay::preProcessEvent(), opdet::BoDataFrameInput::produce(), mvapid::MVAPID::produce(), wc::MergeWireCell::produce(), evgen::NUANCEGen::produce(), evgen::NDKGen::produce(), vertex::PrimaryVertexFinder::produce(), vertex::HarrisVertexFinder::produce(), shwf::ShowerReco::produce(), trkf::Track3DKalman::produce(), trkf::Track3DKalmanSPS::produce(), lar_cluster3d::Cluster3D::produce(), ems::MergeEMShower3D::produce(), evd::InfoTransfer::Rebuild(), evdb::ScanFrame::Record(), evd::HitSelector::SaveHits(), evd::HitSelector::SaveSeedLines(), and art::EmptyEvent::setRunAndEventInfo().

118 {
119  return event_;
120 }
EventNumber_t event_
Definition: EventID.h:77
art::EventID art::EventID::firstEvent ( )
inlinestatic

Definition at line 191 of file EventID.h.

References art::SubRunID::firstSubRun().

Referenced by art::EmptyEvent::EmptyEvent(), and art::RootInputFileSequence::RootInputFileSequence().

192 {
194 }
static SubRunID firstSubRun()
Definition: SubRunID.h:152
static constexpr type first()
Definition: IDNumber.h:36
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::firstEvent ( SubRunID const &  srID)
inlinestatic

Definition at line 197 of file EventID.h.

198 {
199  return EventID{srID, IDNumber<Level::Event>::first()};
200 }
static constexpr type first()
Definition: IDNumber.h:36
constexpr EventID()
Definition: EventID.h:80
constexpr art::EventID art::EventID::flushEvent ( )
inlinestatic

Definition at line 222 of file EventID.h.

223 {
224  return EventID{FlushFlag()};
225 }
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::flushEvent ( RunID  rID)
inlinestatic

Definition at line 228 of file EventID.h.

229 {
230  return EventID{rID, FlushFlag()};
231 }
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::flushEvent ( SubRunID  srID)
inlinestatic

Definition at line 234 of file EventID.h.

235 {
236  return EventID{srID, FlushFlag()};
237 }
constexpr EventID()
Definition: EventID.h:80
art::EventNumber_t art::EventID::inRangeOrInvalid ( EventNumber_t  e)
inlineprivate

Definition at line 298 of file EventID.h.

References e, and art::errors::InvalidNumber.

299 {
302  return e;
303  } else {
305  << "Attempt to construct an EventID with an invalid number.\n"
306  << "Maybe you want EventID::flushEvent()?\n";
307  }
308 }
static constexpr type invalid()
Definition: IDNumber.h:16
static constexpr type max_natural()
Definition: IDNumber.h:31
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
Float_t e
Definition: plot.C:34
constexpr art::EventID art::EventID::invalidEvent ( )
inlinestatic

Definition at line 203 of file EventID.h.

Referenced by art::TimeTracker::preEventReading(), art::RootOutputFile::writeRun(), and art::RootOutputFile::writeSubRun().

204 {
205  return EventID{};
206 }
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::invalidEvent ( RunID  rID)
inlinestatic

Definition at line 209 of file EventID.h.

References art::SubRunID::invalidSubRun().

210 {
211  return EventID{SubRunID::invalidSubRun(rID),
213 }
static constexpr type invalid()
Definition: IDNumber.h:16
static SubRunID invalidSubRun(RunID const &rID)
Definition: SubRunID.h:164
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::invalidEvent ( SubRunID const &  srID)
inlinestatic

Definition at line 216 of file EventID.h.

217 {
219 }
static constexpr type invalid()
Definition: IDNumber.h:16
constexpr EventID()
Definition: EventID.h:80
bool art::EventID::isFlush ( ) const
inline

Definition at line 129 of file EventID.h.

References event_.

Referenced by art::EventIDMatcher::match(), and art::operator<<().

130 {
132 }
static constexpr type flush_value()
Definition: IDNumber.h:26
EventNumber_t event_
Definition: EventID.h:77
art::EventID art::EventID::maxEvent ( )
inlinestatic

Definition at line 185 of file EventID.h.

References art::SubRunID::maxSubRun().

186 {
188 }
static constexpr type max_natural()
Definition: IDNumber.h:31
constexpr EventID()
Definition: EventID.h:80
static SubRunID maxSubRun()
Definition: SubRunID.h:146
art::EventID art::EventID::next ( ) const
inline

Definition at line 135 of file EventID.h.

References event_, art::errors::InvalidNumber, isValid(), nextSubRun(), and subRun_.

Referenced by art::ClosedRangeSetHandler::do_maybeSplitRange(), art::EmptyEvent::setRunAndEventInfo(), and art::EmptyEvent::skip().

136 {
137  if (!isValid()) {
139  << "Cannot increment invalid event number.\n";
141  return nextSubRun();
142  } else {
143  return EventID{subRun_, event_ + 1u};
144  }
145 }
bool isValid() const
Definition: EventID.h:123
static constexpr type max_natural()
Definition: IDNumber.h:31
EventID nextSubRun(EventNumber_t first=IDNumber< Level::Event >::first()) const
Definition: EventID.h:148
SubRunID subRun_
Definition: EventID.h:76
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr EventID()
Definition: EventID.h:80
EventNumber_t event_
Definition: EventID.h:77
art::EventID art::EventID::nextRun ( ) const
inline

Definition at line 154 of file EventID.h.

References art::SubRunID::nextRun(), and subRun_.

Referenced by art::EmptyEvent::setRunAndEventInfo().

155 {
157 }
SubRunID nextRun() const
Definition: SubRunID.h:122
SubRunID subRun_
Definition: EventID.h:76
static constexpr type first()
Definition: IDNumber.h:36
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::nextSubRun ( EventNumber_t  first = IDNumber<Level::Event>::first()) const
inline

Definition at line 148 of file EventID.h.

References art::SubRunID::next(), and subRun_.

Referenced by next(), and art::EmptyEvent::setRunAndEventInfo().

149 {
150  return EventID{subRun_.next(), first};
151 }
SubRunID next() const
Definition: SubRunID.h:110
SubRunID subRun_
Definition: EventID.h:76
constexpr EventID()
Definition: EventID.h:80
bool art::EventID::operator!= ( EventID const &  other) const
inline

Definition at line 247 of file EventID.h.

References fhicl::other.

248 {
249  return !(*this == other);
250 }
bool art::EventID::operator< ( EventID const &  other) const
inline

Definition at line 255 of file EventID.h.

References event_, and subRun_.

256 {
257  static SortInvalidFirst<EventNumber_t> op(IDNumber<Level::Event>::invalid());
258  if (subRun_ == other.subRun_) {
259  return op(event_, other.event_);
260  } else {
261  return subRun_ < other.subRun_;
262  }
263 }
static constexpr type invalid()
Definition: IDNumber.h:16
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77
bool art::EventID::operator<= ( EventID const &  other) const
inline

Definition at line 272 of file EventID.h.

References fhicl::other.

273 {
274  return (*this < other) || (*this == other);
275 }
bool art::EventID::operator== ( EventID const &  other) const
inline

Definition at line 241 of file EventID.h.

References event_, and subRun_.

242 {
243  return other.subRun_ == subRun_ && other.event_ == event_;
244 }
SubRunID subRun_
Definition: EventID.h:76
EventNumber_t event_
Definition: EventID.h:77
bool art::EventID::operator> ( EventID const &  other) const
inline

Definition at line 266 of file EventID.h.

267 {
268  return (other < *this);
269 }
bool art::EventID::operator>= ( EventID const &  other) const
inline

Definition at line 278 of file EventID.h.

References fhicl::other.

279 {
280  return !(*this < other);
281 }
art::EventID art::EventID::previous ( ) const
inline

Definition at line 160 of file EventID.h.

References event_, art::errors::InvalidNumber, isValid(), previousSubRun(), and subRun_.

Referenced by art::EmptyEvent::skip().

161 {
162  if (!isValid()) {
164  << "cannot decrement invalid event number.";
165  } else if (event_ == IDNumber<Level::Event>::first()) {
166  return previousSubRun();
167  } else {
168  return EventID{subRun_, event_ - 1u};
169  }
170 }
bool isValid() const
Definition: EventID.h:123
SubRunID subRun_
Definition: EventID.h:76
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
static constexpr type first()
Definition: IDNumber.h:36
constexpr EventID()
Definition: EventID.h:80
EventID previousSubRun() const
Definition: EventID.h:173
EventNumber_t event_
Definition: EventID.h:77
art::EventID art::EventID::previousRun ( ) const
inline

Definition at line 179 of file EventID.h.

References art::SubRunID::previousRun(), and subRun_.

180 {
182 }
SubRunID previousRun() const
Definition: SubRunID.h:140
static constexpr type max_natural()
Definition: IDNumber.h:31
SubRunID subRun_
Definition: EventID.h:76
constexpr EventID()
Definition: EventID.h:80
art::EventID art::EventID::previousSubRun ( ) const
inline

Definition at line 173 of file EventID.h.

References art::SubRunID::previous(), and subRun_.

Referenced by previous().

174 {
176 }
static constexpr type max_natural()
Definition: IDNumber.h:31
SubRunID subRun_
Definition: EventID.h:76
SubRunID previous() const
Definition: SubRunID.h:128
constexpr EventID()
Definition: EventID.h:80

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
EventID const &  iID 
)
friend

Member Data Documentation

EventNumber_t art::EventID::event_
private

Definition at line 77 of file EventID.h.

Referenced by event(), isFlush(), isValid(), next(), operator<(), art::operator<<(), operator==(), and previous().


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