Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
art::FileIndex Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/canvas/v3_06_01/source/canvas/Persistency/Provenance/FileIndex.h"

Classes

class  Element
 
struct  Transients
 

Public Types

enum  EntryType { kRun, kSubRun, kEvent, kEnd }
 
enum  SortState { kNotSorted, kSorted_Run_SubRun_Event, kSorted_Run_SubRun_EventEntry }
 
using EntryNumber_t = long long
 
using const_iterator = std::vector< Element >::const_iterator
 
using iterator = std::vector< Element >::iterator
 

Public Member Functions

 FileIndex ()=default
 
void addEntry (EventID const &eID, EntryNumber_t entry)
 
void addEntryOnLoad (EventID const &eID, EntryNumber_t entry)
 
void sortBy_Run_SubRun_Event ()
 
void sortBy_Run_SubRun_EventEntry ()
 
const_iterator findPosition (EventID const &eID) const
 
template<typename ID >
const_iterator findPosition (ID const &id, bool exact) const
 
const_iterator findSubRunOrRunPosition (SubRunID const &srID) const
 
template<typename ID >
bool contains (ID const &id, bool exact) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
std::vector< Element >::size_type size () const
 
bool empty () const
 
bool allEventsInEntryOrder () const
 
bool eventsUniqueAndOrdered () const
 
void print_event_list (std::ostream &os) const
 

Private Member Functions

bool & allInEntryOrder () const
 
bool & resultCached () const
 
SortStatesortState () const
 
const_iterator findEventForUnspecifiedSubRun (EventID const &eID, bool exact) const
 

Private Attributes

std::vector< Elemententries_ {}
 
Transient< Transientstransients_ {}
 

Detailed Description

Definition at line 40 of file FileIndex.h.

Member Typedef Documentation

Definition at line 76 of file FileIndex.h.

using art::FileIndex::EntryNumber_t = long long

Definition at line 43 of file FileIndex.h.

using art::FileIndex::iterator = std::vector<Element>::iterator

Definition at line 77 of file FileIndex.h.

Member Enumeration Documentation

Enumerator
kRun 
kSubRun 
kEvent 
kEnd 

Definition at line 51 of file FileIndex.h.

Enumerator
kNotSorted 
kSorted_Run_SubRun_Event 
kSorted_Run_SubRun_EventEntry 

Definition at line 146 of file FileIndex.h.

Constructor & Destructor Documentation

art::FileIndex::FileIndex ( )
default

Member Function Documentation

void art::FileIndex::addEntry ( EventID const &  eID,
EntryNumber_t  entry 
)
void art::FileIndex::addEntryOnLoad ( EventID const &  eID,
EntryNumber_t  entry 
)
bool art::FileIndex::allEventsInEntryOrder ( ) const

Referenced by empty().

bool& art::FileIndex::allInEntryOrder ( ) const
inlineprivate

Definition at line 165 of file FileIndex.h.

References transients_.

166  {
167  return transients_.get().allInEntryOrder_;
168  }
Transient< Transients > transients_
Definition: FileIndex.h:184
iterator art::FileIndex::begin ( )
inline

Definition at line 97 of file FileIndex.h.

References entries_.

98  {
99  return entries_.begin();
100  }
std::vector< Element > entries_
Definition: FileIndex.h:183
const_iterator art::FileIndex::begin ( ) const
inline

Definition at line 102 of file FileIndex.h.

References entries_.

103  {
104  return entries_.begin();
105  }
std::vector< Element > entries_
Definition: FileIndex.h:183
const_iterator art::FileIndex::cbegin ( ) const
inline

Definition at line 107 of file FileIndex.h.

References entries_.

108  {
109  return entries_.begin();
110  }
std::vector< Element > entries_
Definition: FileIndex.h:183
const_iterator art::FileIndex::cend ( ) const
inline

Definition at line 123 of file FileIndex.h.

References entries_.

124  {
125  return entries_.end();
126  }
std::vector< Element > entries_
Definition: FileIndex.h:183
template<typename ID >
bool art::FileIndex::contains ( ID const &  id,
bool  exact 
) const
inline

Definition at line 91 of file FileIndex.h.

References entries_, and findPosition().

92  {
93  return findPosition(id, exact) != entries_.end();
94  }
const_iterator findPosition(EventID const &eID) const
std::vector< Element > entries_
Definition: FileIndex.h:183
bool art::FileIndex::empty ( ) const
inline

Definition at line 135 of file FileIndex.h.

References allEventsInEntryOrder(), entries_, eventsUniqueAndOrdered(), and print_event_list().

136  {
137  return entries_.empty();
138  }
std::vector< Element > entries_
Definition: FileIndex.h:183
iterator art::FileIndex::end ( )
inline

Definition at line 113 of file FileIndex.h.

References entries_.

114  {
115  return entries_.end();
116  }
std::vector< Element > entries_
Definition: FileIndex.h:183
const_iterator art::FileIndex::end ( ) const
inline

Definition at line 118 of file FileIndex.h.

References entries_.

119  {
120  return entries_.end();
121  }
std::vector< Element > entries_
Definition: FileIndex.h:183
bool art::FileIndex::eventsUniqueAndOrdered ( ) const

Referenced by empty().

const_iterator art::FileIndex::findEventForUnspecifiedSubRun ( EventID const &  eID,
bool  exact 
) const
private

Referenced by sortState().

const_iterator art::FileIndex::findPosition ( EventID const &  eID) const
template<typename ID >
const_iterator art::FileIndex::findPosition ( ID const &  id,
bool  exact 
) const
const_iterator art::FileIndex::findSubRunOrRunPosition ( SubRunID const &  srID) const
void art::FileIndex::print_event_list ( std::ostream &  os) const

Referenced by empty().

bool& art::FileIndex::resultCached ( ) const
inlineprivate

Definition at line 170 of file FileIndex.h.

References transients_.

171  {
172  return transients_.get().resultCached_;
173  }
Transient< Transients > transients_
Definition: FileIndex.h:184
std::vector<Element>::size_type art::FileIndex::size ( void  ) const
inline

Definition at line 129 of file FileIndex.h.

References entries_.

130  {
131  return entries_.size();
132  }
std::vector< Element > entries_
Definition: FileIndex.h:183
void art::FileIndex::sortBy_Run_SubRun_Event ( )
void art::FileIndex::sortBy_Run_SubRun_EventEntry ( )
SortState& art::FileIndex::sortState ( ) const
inlineprivate

Definition at line 175 of file FileIndex.h.

References findEventForUnspecifiedSubRun(), and transients_.

176  {
177  return transients_.get().sortState_;
178  }
Transient< Transients > transients_
Definition: FileIndex.h:184

Member Data Documentation

std::vector<Element> art::FileIndex::entries_ {}
private

Definition at line 183 of file FileIndex.h.

Referenced by begin(), cbegin(), cend(), contains(), empty(), end(), and size().

Transient<Transients> art::FileIndex::transients_ {}
mutableprivate

Definition at line 184 of file FileIndex.h.

Referenced by allInEntryOrder(), resultCached(), and sortState().


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