LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::OpenRangeSetHandler Class Referencefinal

#include "OpenRangeSetHandler.h"

Inheritance diagram for art::OpenRangeSetHandler:
art::RangeSetHandler

Public Types

enum  HandlerType { HandlerType::Open = 1, HandlerType::Closed = 2 }
 

Public Member Functions

virtual ~OpenRangeSetHandler ()
 
 OpenRangeSetHandler (RunNumber_t r)
 
 OpenRangeSetHandler (RangeSet const &)
 
 OpenRangeSetHandler (OpenRangeSetHandler const &)
 
 OpenRangeSetHandler (OpenRangeSetHandler &&)
 
OpenRangeSetHandleroperator= (OpenRangeSetHandler const &)
 
OpenRangeSetHandleroperator= (OpenRangeSetHandler &&)
 
HandlerType type () const
 
RangeSet seenRanges () const
 
void update (EventID const &id, bool const lastInSubRun)
 
void flushRanges ()
 
void maybeSplitRange ()
 
void rebase ()
 
RangeSetHandlerclone () const
 

Private Member Functions

HandlerType do_type () const override
 
RangeSet do_getSeenRanges () const override
 
void do_update (EventID const &, bool lastInSubRun) override
 
void do_flushRanges () override
 
void do_maybeSplitRange () override
 
void do_rebase () override
 
RangeSetHandlerdo_clone () const override
 

Private Attributes

RangeSet ranges_ {RangeSet::invalid()}
 
std::size_t idx_ {0}
 

Detailed Description

Definition at line 39 of file OpenRangeSetHandler.h.

Member Enumeration Documentation

enum art::RangeSetHandler::HandlerType
stronginherited
Enumerator
Open 
Closed 

Definition at line 14 of file RangeSetHandler.h.

Constructor & Destructor Documentation

art::OpenRangeSetHandler::~OpenRangeSetHandler ( )
virtualdefault
art::OpenRangeSetHandler::OpenRangeSetHandler ( RunNumber_t  r)
explicit

Definition at line 15 of file OpenRangeSetHandler.cc.

Referenced by OpenRangeSetHandler().

15 : ranges_{r} {}
TRandom r
Definition: spectrum.C:23
art::OpenRangeSetHandler::OpenRangeSetHandler ( RangeSet const &  ranges)
explicit

Definition at line 19 of file OpenRangeSetHandler.cc.

References idx_, OpenRangeSetHandler(), and operator=().

art::OpenRangeSetHandler::OpenRangeSetHandler ( OpenRangeSetHandler const &  )
default
art::OpenRangeSetHandler::OpenRangeSetHandler ( OpenRangeSetHandler &&  )
default

Member Function Documentation

RangeSetHandler * art::RangeSetHandler::clone ( ) const
inherited
RangeSetHandler * art::OpenRangeSetHandler::do_clone ( ) const
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 77 of file OpenRangeSetHandler.cc.

78  {
79  return new OpenRangeSetHandler{*this};
80  }
void art::OpenRangeSetHandler::do_flushRanges ( )
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 62 of file OpenRangeSetHandler.cc.

63  {}
RangeSet art::OpenRangeSetHandler::do_getSeenRanges ( ) const
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 47 of file OpenRangeSetHandler.cc.

References art::RangeSet::begin_idx(), idx_, ranges_, art::RangeSet::run(), and tmp.

48  {
49  RangeSet tmp{ranges_.run()};
50  tmp.assign_ranges(ranges_, ranges_.begin_idx(), idx_);
51  return tmp;
52  }
Float_t tmp
Definition: plot.C:35
RunNumber_t run() const
Definition: RangeSet.cc:89
std::size_t begin_idx() const
Definition: RangeSet.cc:189
void art::OpenRangeSetHandler::do_maybeSplitRange ( )
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 66 of file OpenRangeSetHandler.cc.

67  {}
void art::OpenRangeSetHandler::do_rebase ( )
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 70 of file OpenRangeSetHandler.cc.

References art::RangeSet::clear(), art::RangeSet::end_idx(), idx_, and ranges_.

71  {
72  ranges_.clear();
73  idx_ = ranges_.end_idx();
74  }
void clear()
Definition: RangeSet.cc:384
std::size_t end_idx() const
Definition: RangeSet.cc:195
RangeSetHandler::HandlerType art::OpenRangeSetHandler::do_type ( ) const
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 41 of file OpenRangeSetHandler.cc.

References art::RangeSetHandler::Open.

void art::OpenRangeSetHandler::do_update ( EventID const &  id,
bool  lastInSubRun 
)
overrideprivatevirtual

Implements art::RangeSetHandler.

Definition at line 55 of file OpenRangeSetHandler.cc.

References art::RangeSet::end_idx(), idx_, ranges_, and art::RangeSet::update().

56  {
57  ranges_.update(id);
58  idx_ = ranges_.end_idx();
59  }
std::size_t end_idx() const
Definition: RangeSet.cc:195
void update(EventID const &)
Definition: RangeSet.cc:326
void art::RangeSetHandler::flushRanges ( )
inherited

Definition at line 27 of file RangeSetHandler.cc.

References art::RangeSetHandler::do_flushRanges().

Referenced by art::EventProcessor::setRunAuxiliaryRangeSetID().

28  {
30  }
virtual void do_flushRanges()=0
void art::RangeSetHandler::maybeSplitRange ( )
inherited

Definition at line 33 of file RangeSetHandler.cc.

References art::RangeSetHandler::do_maybeSplitRange().

Referenced by art::EventProcessor::setSubRunAuxiliaryRangeSetID().

34  {
36  }
virtual void do_maybeSplitRange()=0
OpenRangeSetHandler & art::OpenRangeSetHandler::operator= ( OpenRangeSetHandler const &  )
default

Referenced by OpenRangeSetHandler().

OpenRangeSetHandler & art::OpenRangeSetHandler::operator= ( OpenRangeSetHandler &&  )
default
void art::RangeSetHandler::rebase ( )
inherited

Definition at line 39 of file RangeSetHandler.cc.

References art::RangeSetHandler::do_rebase().

40  {
41  do_rebase();
42  }
virtual void do_rebase()=0
RangeSet art::RangeSetHandler::seenRanges ( ) const
inherited
RangeSetHandler::HandlerType art::RangeSetHandler::type ( ) const
inherited

Definition at line 9 of file RangeSetHandler.cc.

References art::RangeSetHandler::do_type().

10  {
11  return do_type();
12  }
virtual HandlerType do_type() const =0
void art::RangeSetHandler::update ( EventID const &  id,
bool const  lastInSubRun 
)
inherited

Definition at line 21 of file RangeSetHandler.cc.

References art::RangeSetHandler::do_update().

22  {
23  do_update(id, lastInSubRun);
24  }
virtual void do_update(EventID const &, bool lastInSubRun)=0

Member Data Documentation

std::size_t art::OpenRangeSetHandler::idx_ {0}
private

Definition at line 63 of file OpenRangeSetHandler.h.

Referenced by do_getSeenRanges(), do_rebase(), do_update(), and OpenRangeSetHandler().

RangeSet art::OpenRangeSetHandler::ranges_ {RangeSet::invalid()}
private

Definition at line 62 of file OpenRangeSetHandler.h.

Referenced by do_getSeenRanges(), do_rebase(), and do_update().


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