Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
art::EventID Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/canvas/v3_06_01/source/canvas/Persistency/Provenance/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 EventID::EventID ( )
inline

Definition at line 79 of file EventID.h.

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

Definition at line 83 of file EventID.h.

85 {}
EventNumber_t inRangeOrInvalid(EventNumber_t e)
Definition: EventID.h:297
caf::StandardRecord * sr
SubRunID subRun_
Definition: EventID.h:75
TRandom3 r(0)
Float_t e
Definition: plot.C:35
EventNumber_t event_
Definition: EventID.h:76
EventID::EventID ( SubRunID const &  sID,
EventNumber_t  e 
)
inline

Definition at line 87 of file EventID.h.

89 {}
EventNumber_t inRangeOrInvalid(EventNumber_t e)
Definition: EventID.h:297
SubRunID subRun_
Definition: EventID.h:75
Float_t e
Definition: plot.C:35
EventNumber_t event_
Definition: EventID.h:76
constexpr EventID::EventID ( FlushFlag  )
inlineexplicitprivate

Definition at line 282 of file EventID.h.

285 {}
static constexpr SubRunID flushSubRun()
Definition: SubRunID.h:169
static constexpr type flush_value()
Definition: IDNumber.h:26
SubRunID subRun_
Definition: EventID.h:75
EventNumber_t event_
Definition: EventID.h:76
EventID::EventID ( RunID  rID,
FlushFlag   
)
inlineprivate

Definition at line 287 of file EventID.h.

290 {}
static constexpr SubRunID flushSubRun()
Definition: SubRunID.h:169
static constexpr type flush_value()
Definition: IDNumber.h:26
SubRunID subRun_
Definition: EventID.h:75
EventNumber_t event_
Definition: EventID.h:76
EventID::EventID ( SubRunID  srID,
FlushFlag   
)
inlineprivate

Definition at line 292 of file EventID.h.

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

Member Function Documentation

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

Definition at line 116 of file EventID.h.

References event_.

Referenced by caf::CAFMaker::AddMCTruthToVec(), novaddt::SingletonRejectionAna::analyze(), jmshower::RecoJMShowerAna::analyze(), novaddt::RateMonitor::analyze(), align::AlignInspect::analyze(), G4MismatchAna::analyze(), zcl::SMMTriggerAna::analyze(), supernova::SnovaAna::analyze(), dprf::TrackPlots::analyze(), mcchk::CosmicAna::analyze(), murem::MuonRemoveAna::analyze(), sn::SNSlicerAna::analyze(), sn::SupernovaAna::analyze(), pa::ClusterEva::analyze(), calib::EnergyStandardCandles::analyze(), zcl::FmmTriggerAna::analyze(), comi::NumiFilteringAna::analyze(), comi::Leana::analyze(), ddt::DataSliceEva::analyze(), zcl::FmmTrackerAna::analyze(), ddt::SlicerEva::analyze(), trigmon::LongReadoutAnalyzer::analyze(), hough::HoughValidate::analyze(), novaddt::UpMuAna::analyze(), slicer::SlicerAna::analyze(), comi::NearlineAna::analyze(), fuzz::FuzzyKValidate::analyze(), skim::SkimmerAna::analyze(), bpf::BPFCVNAna::analyze(), skim::CosmicBeamComparison::analyze(), ncs::Xeff::analyze(), calib::CalibAna::analyze(), ncs::ROCKMRE::analyze(), ddt::SuperDDTEva::analyze(), slid::LIDTraining::analyze(), ncs::NCAna::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), nnbar::RecoAnalysis::analyze(), beamlinereco::ToFPositionRecoAnalysis::analyze(), trk::CosmicTrackAna::analyze(), red::EWCosmics::analyze(), comi::FEBFlash::analyze(), skim::CellHitSkimmer::CheckEvent(), evd::TZProjPad::Draw(), art::EventAuxiliary::event(), art::EventPrincipal::event(), skim::CosmicBeamComparison::FillNumuHistograms(), caf::CAFMaker::FillSpillVars(), highe::HighEnergyFilt::filter(), EventFilter::filter(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::filter(), showere::ShowerEnergyFilterMC::filter(), novaddt::UpMuTrigger::filter(), skim::EvaluatorNue::Initialize(), makeTraj(), evdb::DisplayWindow::OpenWindow(), novaddt::UpMuAna::populateFLSmap(), evdb::EventDisplay::preProcessEvent(), novaddt::TrackFit::produce(), calib::FiberCalibration::produce(), earms::ElasticArmsHS::produce(), calib::TimingCalibration::produce(), comi::Cana::produce(), zcl::SMMCluster::produce(), sn::SupernovaMCCluster::produce(), vdt::VertexDT::produce(), zcl::FmmTriggerEvd::produce(), jmshower::NueSel::produce(), jmshower::NueSelLID::produce(), fuzz::FuzzyKVertex::produce(), bpfit::DimuonFitter::produce(), bpfit::BreakPoint::produce(), evdb::ScanFrame::Record(), art::EmptyEvent::setRunAndEventInfo(), and evd::HeaderDrawer::Text().

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

Definition at line 190 of file EventID.h.

References art::SubRunID::firstSubRun().

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

191 {
193 }
static SubRunID firstSubRun()
Definition: SubRunID.h:151
static constexpr type first()
Definition: IDNumber.h:36
art::EventID EventID::firstEvent ( SubRunID const &  srID)
inlinestatic

Definition at line 196 of file EventID.h.

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

Definition at line 221 of file EventID.h.

222 {
223  return EventID{FlushFlag()};
224 }
art::EventID EventID::flushEvent ( RunID  rID)
inlinestatic

Definition at line 227 of file EventID.h.

228 {
229  return EventID{rID, FlushFlag()};
230 }
art::EventID EventID::flushEvent ( SubRunID  srID)
inlinestatic

Definition at line 233 of file EventID.h.

234 {
235  return EventID{srID, FlushFlag()};
236 }
art::EventNumber_t EventID::inRangeOrInvalid ( EventNumber_t  e)
inlineprivate

Definition at line 297 of file EventID.h.

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

298 {
301  return e;
302  } else {
304  << "Attempt to construct an EventID with an invalid number.\n"
305  << "Maybe you want EventID::flushEvent()?\n";
306  }
307 }
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:35
constexpr art::EventID EventID::invalidEvent ( )
inlinestatic

Definition at line 202 of file EventID.h.

Referenced by art::TimeTracker::preEventReading().

203 {
204  return EventID{};
205 }
art::EventID EventID::invalidEvent ( RunID  rID)
inlinestatic
art::EventID EventID::invalidEvent ( SubRunID const &  srID)
inlinestatic
bool EventID::isFlush ( ) const
inline

Definition at line 128 of file EventID.h.

References event_.

129 {
131 }
static constexpr type flush_value()
Definition: IDNumber.h:26
EventNumber_t event_
Definition: EventID.h:76
bool EventID::isValid ( ) const
inline

Definition at line 122 of file EventID.h.

References event_, art::SubRunID::isValid(), and subRun_.

Referenced by art::FileIndex::Element::getEntryType(), next(), previous(), art::RootInput::seekToEvent(), and art::Source< T >::throwIfInsane_().

123 {
125 }
static constexpr type invalid()
Definition: IDNumber.h:16
bool isValid() const
Definition: SubRunID.h:95
SubRunID subRun_
Definition: EventID.h:75
EventNumber_t event_
Definition: EventID.h:76
art::EventID EventID::maxEvent ( )
inlinestatic

Definition at line 184 of file EventID.h.

References art::SubRunID::maxSubRun().

185 {
187 }
static constexpr type max_natural()
Definition: IDNumber.h:31
static SubRunID maxSubRun()
Definition: SubRunID.h:145
art::EventID EventID::next ( ) const
inline

Definition at line 134 of file EventID.h.

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

Referenced by art::SamplingInput::readEvent(), art::EmptyEvent::setRunAndEventInfo(), and art::EmptyEvent::skip().

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

Definition at line 153 of file EventID.h.

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

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

154 {
156 }
SubRunID nextRun() const
Definition: SubRunID.h:121
SubRunID subRun_
Definition: EventID.h:75
static constexpr type first()
Definition: IDNumber.h:36
art::EventID EventID::nextSubRun ( EventNumber_t  first = IDNumber<Level::Event>::first()) const
inline

Definition at line 147 of file EventID.h.

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

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

148 {
149  return EventID{subRun_.next(), first};
150 }
SubRunID next() const
Definition: SubRunID.h:109
SubRunID subRun_
Definition: EventID.h:75
bool EventID::operator!= ( EventID const &  other) const
inline

Definition at line 246 of file EventID.h.

References fhicl::other.

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

Definition at line 254 of file EventID.h.

References event_, and subRun_.

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

Definition at line 271 of file EventID.h.

References fhicl::other.

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

Definition at line 240 of file EventID.h.

References event_, and subRun_.

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

Definition at line 265 of file EventID.h.

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

Definition at line 277 of file EventID.h.

References fhicl::other.

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

Definition at line 159 of file EventID.h.

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

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

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

Definition at line 178 of file EventID.h.

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

179 {
181 }
SubRunID previousRun() const
Definition: SubRunID.h:139
static constexpr type max_natural()
Definition: IDNumber.h:31
SubRunID subRun_
Definition: EventID.h:75
art::EventID EventID::previousSubRun ( ) const
inline

Definition at line 172 of file EventID.h.

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

Referenced by previous().

173 {
175 }
static constexpr type max_natural()
Definition: IDNumber.h:31
SubRunID subRun_
Definition: EventID.h:75
SubRunID previous() const
Definition: SubRunID.h:127
art::RunNumber_t EventID::run ( ) const
inline
art::RunID const & EventID::runID ( ) const
inline
art::SubRunNumber_t EventID::subRun ( ) const
inline
art::SubRunID const & EventID::subRunID ( ) const
inline

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 76 of file EventID.h.

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

SubRunID art::EventID::subRun_
private

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