1 #ifndef DataFormats_L1Scouting_OrbitCollection_h 2 #define DataFormats_L1Scouting_OrbitCollection_h 14 typedef typename std::vector<T>::iterator
iterator;
43 <<
"Trying to fill the collection by passing an orbit buffer with incorrect size. " 44 <<
"Passed " << orbitBuffer.size() <<
", expected 3565";
45 data_.reserve(nObjects);
48 for (
auto& bxVec : orbitBuffer) {
54 if (bxVec.size() > 0) {
55 data_.insert(
data_.end(), bxVec.begin(), bxVec.end());
71 throw cms::Exception(
"OrbitCollection::bxIterator") <<
"Trying to access and object outside the orbit range. " 83 cms::Exception(
"OrbitCollection") <<
"Called getBxSize() of a bx out of the orbit range." 93 throw cms::Exception(
"OrbitCollection::getBxObject") <<
"Trying to access and object outside the orbit range. " 97 <<
"Trying to get element " <<
i <<
" but for" 98 <<
" BX = " <<
bx <<
" there are " <<
getBxSize(
bx) <<
" elements.";
105 std::vector<unsigned> filledBxVec;
106 if (!
data_.empty()) {
109 filledBxVec.push_back(
bx);
135 #endif // DataFormats_L1Scouting_OrbitCollection_h std::vector< unsigned > getFilledBxs() const
const_iterator begin() const
T & operator[](std::size_t i)
int getBxSize(unsigned bx) const
const_iterator end() const
void fillAndClear(std::vector< std::vector< T >> &orbitBuffer, unsigned nObjects=0)
std::vector< T >::const_iterator const_iterator
std::vector< unsigned > bxOffsets_
#define CMS_CLASS_VERSION(_version_)
const T & getBxObject(unsigned bx, unsigned i) const
const T & operator[](std::size_t i) const
OrbitCollection & operator=(const OrbitCollection &other)=default
edm::Span< const_iterator > bxIterator(unsigned bx) const
OrbitCollection(std::vector< std::vector< T >> &orbitBuffer, unsigned nObjects=0)
std::vector< T >::size_type size_type
std::vector< T >::iterator iterator
static constexpr int orbitBufferSize_