CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
reco::PatternSet< N > Struct Template Reference

#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 ()
 
 PatternSet (reco::HitPattern const &hp)
 
int size () const
 

Public Attributes

unsigned char hit [N]
 
unsigned char nhit
 

Static Public Attributes

static constexpr int MaxHits =N
 

Detailed Description

template<int N = reco::HitPattern::MaxHits>
struct reco::PatternSet< N >

Definition at line 815 of file HitPattern.h.

Constructor & Destructor Documentation

template<int N = reco::HitPattern::MaxHits>
reco::PatternSet< N >::PatternSet ( )
inline

Definition at line 827 of file HitPattern.h.

827 : nhit(0){}
unsigned char nhit
Definition: HitPattern.h:818
template<int N = reco::HitPattern::MaxHits>
reco::PatternSet< N >::PatternSet ( reco::HitPattern const &  hp)
inline

Definition at line 828 of file HitPattern.h.

References reco::PatternSet< N >::fill().

828  {
829  fill(hp);
830  }
void fill(reco::HitPattern const &hp)
Definition: HitPattern.h:832

Member Function Documentation

template<int N = reco::HitPattern::MaxHits>
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().

820 { return hit;}
unsigned char hit[N]
Definition: HitPattern.h:817
template<int N = reco::HitPattern::MaxHits>
unsigned char* reco::PatternSet< N >::begin ( void  )
inline

Definition at line 822 of file HitPattern.h.

References reco::PatternSet< N >::hit.

822 { return hit;}
unsigned char hit[N]
Definition: HitPattern.h:817
template<int N = reco::HitPattern::MaxHits>
unsigned char const* reco::PatternSet< N >::end ( void  ) const
inline
template<int N = reco::HitPattern::MaxHits>
unsigned char* reco::PatternSet< N >::end ( void  )
inline

Definition at line 823 of file HitPattern.h.

References reco::PatternSet< N >::nhit.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

823 { return hit+nhit;}
unsigned char nhit
Definition: HitPattern.h:818
template<int N = reco::HitPattern::MaxHits>
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().

832  {
833  int lhit=0;
834  auto unpack =[&lhit,this](uint32_t pattern) -> bool {
835  unsigned char p = 255&(pattern>>3);
836  hit[lhit++]= p;
837 
838  // bouble sort
839  if (lhit>1)
840  for (auto h=hit+lhit-1; h!=hit; --h) {
841  if ( (*(h-1)) <= p) break; // { (*h)=p;break;}
842  (*h)=*(h-1); *(h-1)=p;
843  }
844  return lhit<MaxHits;
845  };
847  nhit=lhit;
848  }
unsigned char nhit
Definition: HitPattern.h:818
static constexpr int MaxHits
Definition: HitPattern.h:816
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:545
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
unsigned char hit[N]
Definition: HitPattern.h:817
template<int N = reco::HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 825 of file HitPattern.h.

References i.

825 { return hit[i];}
int i
Definition: DBlmapReader.cc:9
template<int N = reco::HitPattern::MaxHits>
int reco::PatternSet< N >::size ( void  ) const
inline

Definition at line 824 of file HitPattern.h.

References reco::PatternSet< N >::nhit.

824 { return nhit;}
unsigned char nhit
Definition: HitPattern.h:818

Member Data Documentation

template<int N = reco::HitPattern::MaxHits>
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().

template<int N = reco::HitPattern::MaxHits>
constexpr int reco::PatternSet< N >::MaxHits =N
static

Definition at line 816 of file HitPattern.h.

Referenced by reco::PatternSet< N >::fill().

template<int N = reco::HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::nhit