test
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 (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 int MaxHits = N
 

Detailed Description

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

Definition at line 1223 of file HitPattern.h.

Constructor & Destructor Documentation

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

Definition at line 1258 of file HitPattern.h.

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

Definition at line 1260 of file HitPattern.h.

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

1261  {
1262  fill(category, hp);
1263  }
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
void fill(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1265

Member Function Documentation

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

Definition at line 1228 of file HitPattern.h.

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

Referenced by reco::commonHits().

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

Definition at line 1238 of file HitPattern.h.

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

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

Definition at line 1233 of file HitPattern.h.

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

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

1234  {
1235  return hit + nhit;
1236  }
unsigned char nhit
Definition: HitPattern.h:1226
template<int N = HitPattern::MaxHits>
unsigned char* reco::PatternSet< N >::end ( void  )
inline

Definition at line 1243 of file HitPattern.h.

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

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

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

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

1266  {
1267  int lhit = 0;
1268  auto unpack = [&lhit, this](uint16_t pattern) -> bool {
1269  unsigned char p = 255 & (pattern >> 3);
1270  hit[lhit++] = p;
1271 
1272  // bouble sort
1273  if (lhit > 1) {
1274  for (auto h = hit + lhit - 1; h != hit; --h) {
1275  if ((*(h - 1)) <= p) {
1276  break;
1277  }
1278  (*h) = *(h - 1);
1279  *(h - 1) = p;
1280  }
1281  }
1282  return lhit < MaxHits;
1283  };
1284 
1286  nhit = lhit;
1287  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
unsigned char nhit
Definition: HitPattern.h:1226
static int MaxHits
Definition: HitPattern.h:1224
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:787
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
unsigned char hit[N]
Definition: HitPattern.h:1225
template<int N = HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 1253 of file HitPattern.h.

References i.

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

Definition at line 1248 of file HitPattern.h.

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

1249  {
1250  return nhit;
1251  }
unsigned char nhit
Definition: HitPattern.h:1226

Member Data Documentation

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

Definition at line 1225 of file HitPattern.h.

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

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

Definition at line 1224 of file HitPattern.h.

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

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