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 834 of file HitPattern.h.

Constructor & Destructor Documentation

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

Definition at line 846 of file HitPattern.h.

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

Definition at line 847 of file HitPattern.h.

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

847  {
848  fill(hp);
849  }
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
void fill(reco::HitPattern const &hp)
Definition: HitPattern.h:851

Member Function Documentation

template<int N = reco::HitPattern::MaxHits>
unsigned char const* reco::PatternSet< N >::begin ( void  ) const
inline

Definition at line 839 of file HitPattern.h.

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

Referenced by reco::commonHits().

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

Definition at line 841 of file HitPattern.h.

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

841 { return hit;}
unsigned char hit[N]
Definition: HitPattern.h:836
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 842 of file HitPattern.h.

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

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

842 { return hit+nhit;}
unsigned char nhit
Definition: HitPattern.h:837
template<int N = reco::HitPattern::MaxHits>
void reco::PatternSet< N >::fill ( reco::HitPattern const &  hp)
inline

Definition at line 851 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().

851  {
852  int lhit=0;
853  auto unpack =[&lhit,this](uint32_t pattern) -> bool {
854  unsigned char p = 255&(pattern>>3);
855  hit[lhit++]= p;
856 
857  // bouble sort
858  if (lhit>1)
859  for (auto h=hit+lhit-1; h!=hit; --h) {
860  if ( (*(h-1)) <= p) break; // { (*h)=p;break;}
861  (*h)=*(h-1); *(h-1)=p;
862  }
863  return lhit<MaxHits;
864  };
866  nhit=lhit;
867  }
unsigned char nhit
Definition: HitPattern.h:837
static constexpr int MaxHits
Definition: HitPattern.h:835
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool validHitFilter(uint32_t pattern)
Definition: HitPattern.h:564
unsigned char hit[N]
Definition: HitPattern.h:836
template<int N = reco::HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 844 of file HitPattern.h.

References i.

844 { 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 843 of file HitPattern.h.

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

843 { return nhit;}
unsigned char nhit
Definition: HitPattern.h:837

Member Data Documentation

template<int N = reco::HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::hit[N]

Definition at line 836 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 835 of file HitPattern.h.

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

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