1 #ifndef DataFormats_Common_RefGetter_h
2 #define DataFormats_Common_RefGetter_h
7 #include "boost/concept_check.hpp"
8 #include "boost/iterator/indirect_iterator.hpp"
25 typedef boost::indirect_iterator<typename collection_type::const_iterator>
const_iterator;
27 typedef std::pair<typename record_type::const_iterator, typename record_type::const_iterator>
record_pair;
48 uint32_t
size()
const;
64 bool find(uint32_t)
const;
84 sets_.reserve(interest.size());
103 sets_.swap(other.
sets_);
112 sets_.push_back(
region_ref(getter, index,
false));
113 regions_[index/32] = regions_[index/32]|(1<<index%32);
121 return sets_.empty();
148 return (*
this)[
size()-1];
156 return sets_.begin();
172 return (regions_[index/32]>>(index%32))&1;
std::vector< uint32_t > regions_
void push_back(const edm::Handle< LazyGetter< T > > &, const uint32_t &)
Add a new region to the end of the collection.
RefGetter(uint32_t=50000)
Default constructor. Default maximum region number 50,000.
std::vector< T > record_type
uint32_t size() const
Return the number of contained 'region_ref's (one per Region).
std::pair< typename record_type::const_iterator, typename record_type::const_iterator > record_pair
const_iterator end() const
Return the off-the-end iterator.
const_iterator begin() const
Return an iterator to the first RegionIndex<T>.
const RegionIndex< T > & back() const
#define CMS_CLASS_VERSION(_version_)
void swap(Association< C > &lhs, Association< C > &rhs)
void reserve(uint32_t)
Reserve memory for sets_ collection.
std::vector< region_ref > collection_type
void _throw_range(uint32_t region)
BOOST_CLASS_REQUIRE(T, boost, LessThanComparableConcept)
Ref< LazyGetter< T >, RegionIndex< T >, FindRegion< T > > region_ref
const RegionIndex< T > & operator[](uint32_t) const
Return a reference to the RegionIndex<T> for a given region.
boost::indirect_iterator< typename collection_type::const_iterator > const_iterator
bool find(uint32_t) const
Returns true if region already defined.
void swap(RefGetter &other)
Swap contents of class.
bool empty() const
Return true if we contain no 'region_ref's (one per Region).
tuple size
Write out results.