CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 (HitPattern::HitCategory category, HitPattern const &hp)
 
unsigned char operator[] (int i) const
 
 PatternSet ()
 
 PatternSet (HitPattern::HitCategory category, 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 = HitPattern::MaxHits>
struct reco::PatternSet< N >

Definition at line 1087 of file HitPattern.h.

Constructor & Destructor Documentation

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

Definition at line 1104 of file HitPattern.h.

1104 : nhit(0) {}
unsigned char nhit
Definition: HitPattern.h:1090
template<int N = HitPattern::MaxHits>
reco::PatternSet< N >::PatternSet ( HitPattern::HitCategory  category,
HitPattern const &  hp 
)
inline

Definition at line 1106 of file HitPattern.h.

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

1106 { fill(category, hp); }
static const char category[]
void fill(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1108

Member Function Documentation

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

Definition at line 1092 of file HitPattern.h.

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

Referenced by reco::commonHits().

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

Definition at line 1096 of file HitPattern.h.

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

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

Definition at line 1098 of file HitPattern.h.

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

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

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

Definition at line 1108 of file HitPattern.h.

References reco::HitPattern::call(), h, reco::PatternSet< N >::hit, reco::PatternSet< N >::MaxHits, reco::PatternSet< N >::nhit, AlCaHLTBitMon_ParallelJobs::p, BeamSpotPI::unpack(), and reco::HitPattern::validHitFilter().

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

1108  {
1109  int lhit = 0;
1110  auto unpack = [&lhit, this](uint16_t pattern) -> bool {
1111  unsigned char p = 255 & (pattern >> 3);
1112  hit[lhit++] = p;
1113 
1114  // bouble sort
1115  if (lhit > 1) {
1116  for (auto h = hit + lhit - 1; h != hit; --h) {
1117  if ((*(h - 1)) <= p) {
1118  break;
1119  }
1120  (*h) = *(h - 1);
1121  *(h - 1) = p;
1122  }
1123  }
1124  return lhit < MaxHits;
1125  };
1126 
1128  nhit = lhit;
1129  }
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
static const char category[]
unsigned char nhit
Definition: HitPattern.h:1090
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:790
static constexpr int MaxHits
Definition: HitPattern.h:1088
unsigned char hit[N]
Definition: HitPattern.h:1089
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
template<int N = HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 1102 of file HitPattern.h.

References mps_fire::i.

1102 { return hit[i]; }
template<int N = HitPattern::MaxHits>
int reco::PatternSet< N >::size ( void  ) const
inline

Definition at line 1100 of file HitPattern.h.

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

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

1100 { return nhit; }
unsigned char nhit
Definition: HitPattern.h:1090

Member Data Documentation

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

Definition at line 1089 of file HitPattern.h.

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

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

Definition at line 1088 of file HitPattern.h.

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

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