#include <HitPattern.h>
Public Member Functions | |
unsigned char const * | begin () const |
unsigned char * | begin () |
unsigned char const * | end () const |
unsigned char * | end () |
void | fill (reco::HitPattern const &hp) |
unsigned char | operator[] (int i) const |
PatternSet (reco::HitPattern const &hp) | |
PatternSet () | |
int | size () const |
Public Attributes | |
unsigned char | hit [N] |
unsigned char | nhit |
Static Public Attributes | |
static constexpr int | MaxHits = N |
Definition at line 815 of file HitPattern.h.
reco::PatternSet< N >::PatternSet | ( | ) | [inline] |
Definition at line 827 of file HitPattern.h.
: nhit(0){}
reco::PatternSet< N >::PatternSet | ( | reco::HitPattern const & | hp | ) | [inline] |
Definition at line 828 of file HitPattern.h.
References reco::PatternSet< N >::fill().
{ fill(hp); }
unsigned char const* reco::PatternSet< N >::begin | ( | void | ) | const [inline] |
Definition at line 820 of file HitPattern.h.
References reco::PatternSet< N >::hit.
Referenced by reco::commonHits().
{ return hit;}
unsigned char* reco::PatternSet< N >::begin | ( | void | ) | [inline] |
unsigned char const* reco::PatternSet< N >::end | ( | void | ) | const [inline] |
Definition at line 821 of file HitPattern.h.
References reco::PatternSet< N >::nhit.
Referenced by reco::commonHits().
unsigned char* reco::PatternSet< N >::end | ( | void | ) | [inline] |
Definition at line 823 of file HitPattern.h.
References reco::PatternSet< N >::nhit.
void reco::PatternSet< N >::fill | ( | reco::HitPattern const & | hp | ) | [inline] |
Definition at line 832 of file HitPattern.h.
References reco::HitPattern::call(), h, reco::PatternSet< N >::hit, reco::PatternSet< N >::MaxHits, reco::PatternSet< N >::nhit, AlCaHLTBitMon_ParallelJobs::p, listBenchmarks::pattern, timeUnitHelper::unpack(), and reco::HitPattern::validHitFilter().
Referenced by reco::PatternSet< N >::PatternSet().
{ int lhit=0; auto unpack =[&lhit,this](uint32_t pattern) -> bool { unsigned char p = 255&(pattern>>3); hit[lhit++]= p; // bouble sort if (lhit>1) for (auto h=hit+lhit-1; h!=hit; --h) { if ( (*(h-1)) <= p) break; // { (*h)=p;break;} (*h)=*(h-1); *(h-1)=p; } return lhit<MaxHits; }; hp.call(reco::HitPattern::validHitFilter,unpack); nhit=lhit; }
unsigned char reco::PatternSet< N >::operator[] | ( | int | i | ) | const [inline] |
int reco::PatternSet< N >::size | ( | void | ) | const [inline] |
Definition at line 824 of file HitPattern.h.
References reco::PatternSet< N >::nhit.
{ return nhit;}
unsigned char reco::PatternSet< N >::hit[N] |
Definition at line 817 of file HitPattern.h.
Referenced by reco::PatternSet< N >::begin(), and reco::PatternSet< N >::fill().
constexpr int reco::PatternSet< N >::MaxHits = N [static] |
Definition at line 816 of file HitPattern.h.
Referenced by reco::PatternSet< N >::fill().
unsigned char reco::PatternSet< N >::nhit |
Definition at line 818 of file HitPattern.h.
Referenced by reco::commonHits(), reco::PatternSet< N >::end(), reco::PatternSet< N >::fill(), and reco::PatternSet< N >::size().