CMS 3D CMS Logo

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

Constructor & Destructor Documentation

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

Definition at line 1259 of file HitPattern.h.

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

Definition at line 1261 of file HitPattern.h.

References lumiContext::fill.

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

Member Function Documentation

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

Definition at line 1229 of file HitPattern.h.

Referenced by reco::commonHits().

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

Definition at line 1239 of file HitPattern.h.

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

Definition at line 1234 of file HitPattern.h.

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

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

Definition at line 1244 of file HitPattern.h.

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

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

Definition at line 1266 of file HitPattern.h.

References reco::HitPattern::call(), h, AlCaHLTBitMon_ParallelJobs::p, listBenchmarks::pattern, and timeUnitHelper::unpack().

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

Definition at line 1254 of file HitPattern.h.

References mps_fire::i.

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

Definition at line 1249 of file HitPattern.h.

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

1250  {
1251  return nhit;
1252  }
unsigned char nhit
Definition: HitPattern.h:1227

Member Data Documentation

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

Definition at line 1226 of file HitPattern.h.

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

Definition at line 1225 of file HitPattern.h.

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

Definition at line 1227 of file HitPattern.h.

Referenced by reco::commonHits().