2 #ifndef DataFormats_Phase2ITPixelCluster_Phase2ITPixelClusterShapeData_h 3 #define DataFormats_Phase2ITPixelCluster_Phase2ITPixelClusterShapeData_h 22 typedef std::pair<const_iterator, const_iterator>
Range;
46 Field(
unsigned off,
unsigned siz,
bool s,
bool c,
bool h):
47 offset(off),
size(siz), straight(s), complete(c), has(h), filled(
true) {}
63 sizeData_.reserve(size);
67 data_.swap(other.
data_);
72 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) 74 data_.shrink_to_fit();
75 sizeData_.shrink_to_fit();
80 static_assert(
T::ArrayType::capacity() <= 16,
"T::ArrayType::capacity() more than 16, bit field too narrow");
83 data_[cluster.
index()] =
Field(sizeData_.size(), data.size.size(), data.isStraight, data.isComplete, data.hasBigPixelsOnlyInside);
84 std::copy(data.size.begin(), data.size.end(), std::back_inserter(sizeData_));
87 bool isFilled(
const ClusterRef& cluster)
const {
89 return data_[cluster.
index()].filled;
94 Field f = data_[cluster.index()];
97 auto beg = sizeData_.begin()+f.
offset;
105 void checkRef(
const ClusterRef& cluster)
const;
edm::Ref< edmNew::DetSetVector< Phase2ITPixelCluster >, Phase2ITPixelCluster > ClusterRef
void insert(const ClusterRef &cluster, const T &data)
Field(unsigned off, unsigned siz, bool s, bool c, bool h)
const bool hasBigPixelsOnlyInside_
Phase2ITPixelClusterShapeData(const_iterator begin, const_iterator end, bool isStraight, bool isComplete, bool hasBigPixelsOnlyInside)
bool hasBigPixelsOnlyInside() const
std::vector< Field > data_
std::vector< std::pair< int, int > >::const_iterator const_iterator
Phase2ITPixelClusterShapeCache()
bool isFilled(const ClusterRef &cluster) const
Phase2ITPixelClusterShapeCache(const edm::HandleBase &handle)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Phase2ITPixelClusterShapeCache(const edm::ProductID &id)
std::pair< const_iterator, const_iterator > Range
edm::ProductID productId_
Pixel cluster – collection of neighboring pixels above threshold.
std::vector< std::pair< int, int > > sizeData_
~Phase2ITPixelClusterShapeData()
char data[epos_bytes_allocation]
void checkRef(const RP &rp, const R &r)
throw if r hasn't the same id as rp
void swap(Phase2ITPixelClusterShapeCache &other)