2 #ifndef DataFormats_SiPixelCluster_SiPixelClusterShapeData_h 3 #define DataFormats_SiPixelCluster_SiPixelClusterShapeData_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() <= 15,
"T::ArrayType::capacity() more than 15, 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;
bool isFilled(const ClusterRef &cluster) const
void insert(const ClusterRef &cluster, const T &data)
std::vector< std::pair< int, int > > sizeData_
Field(unsigned off, unsigned siz, bool s, bool c, bool h)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool hasBigPixelsOnlyInside() const
~SiPixelClusterShapeData()
SiPixelClusterShapeCache(const edm::HandleBase &handle)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::pair< const_iterator, const_iterator > Range
std::vector< Field > data_
std::vector< std::pair< int, int > >::const_iterator const_iterator
edm::ProductID productId_
Pixel cluster – collection of neighboring pixels above threshold.
char data[epos_bytes_allocation]
const bool hasBigPixelsOnlyInside_
SiPixelClusterShapeCache()
void checkRef(const RP &rp, const R &r)
throw if r hasn't the same id as rp
SiPixelClusterShapeData(const_iterator begin, const_iterator end, bool isStraight, bool isComplete, bool hasBigPixelsOnlyInside)
void swap(SiPixelClusterShapeCache &other)
edm::Ref< edmNew::DetSetVector< SiPixelCluster >, SiPixelCluster > ClusterRef
SiPixelClusterShapeCache(const edm::ProductID &id)