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

Constructor & Destructor Documentation

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

Definition at line 1353 of file HitPattern.h.

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

Definition at line 1355 of file HitPattern.h.

References lumiContext::fill.

1356  {
1357  fill(category, hp);
1358  }
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
void fill(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1360

Member Function Documentation

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

Definition at line 1323 of file HitPattern.h.

Referenced by reco::commonHits().

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

Definition at line 1333 of file HitPattern.h.

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

Definition at line 1328 of file HitPattern.h.

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

1329  {
1330  return hit + nhit;
1331  }
unsigned char nhit
Definition: HitPattern.h:1321
template<int N = HitPattern::MaxHits>
unsigned char* reco::PatternSet< N >::end ( void  )
inline

Definition at line 1338 of file HitPattern.h.

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

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

Definition at line 1360 of file HitPattern.h.

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

1361  {
1362  int lhit = 0;
1363  auto unpack = [&lhit, this](uint16_t pattern) -> bool {
1364  unsigned char p = 255 & (pattern >> 3);
1365  hit[lhit++] = p;
1366 
1367  // bouble sort
1368  if (lhit > 1) {
1369  for (auto h = hit + lhit - 1; h != hit; --h) {
1370  if ((*(h - 1)) <= p) {
1371  break;
1372  }
1373  (*h) = *(h - 1);
1374  *(h - 1) = p;
1375  }
1376  }
1377  return lhit < MaxHits;
1378  };
1379 
1381  nhit = lhit;
1382  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
unsigned char nhit
Definition: HitPattern.h:1321
static int MaxHits
Definition: HitPattern.h:1319
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:847
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
unsigned char hit[N]
Definition: HitPattern.h:1320
template<int N = HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 1348 of file HitPattern.h.

References mps_fire::i.

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

Definition at line 1343 of file HitPattern.h.

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

1344  {
1345  return nhit;
1346  }
unsigned char nhit
Definition: HitPattern.h:1321

Member Data Documentation

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

Definition at line 1320 of file HitPattern.h.

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

Definition at line 1319 of file HitPattern.h.

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

Definition at line 1321 of file HitPattern.h.

Referenced by reco::commonHits().