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

Constructor & Destructor Documentation

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

Definition at line 1361 of file HitPattern.h.

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

Definition at line 1363 of file HitPattern.h.

References lumiContext::fill.

1364  {
1365  fill(category, hp);
1366  }
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
void fill(HitPattern::HitCategory category, HitPattern const &hp)
Definition: HitPattern.h:1368

Member Function Documentation

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

Definition at line 1331 of file HitPattern.h.

Referenced by reco::commonHits().

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

Definition at line 1341 of file HitPattern.h.

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

Definition at line 1336 of file HitPattern.h.

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

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

Definition at line 1346 of file HitPattern.h.

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

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

Definition at line 1368 of file HitPattern.h.

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

1369  {
1370  int lhit = 0;
1371  auto unpack = [&lhit, this](uint16_t pattern) -> bool {
1372  unsigned char p = 255 & (pattern >> 3);
1373  hit[lhit++] = p;
1374 
1375  // bouble sort
1376  if (lhit > 1) {
1377  for (auto h = hit + lhit - 1; h != hit; --h) {
1378  if ((*(h - 1)) <= p) {
1379  break;
1380  }
1381  (*h) = *(h - 1);
1382  *(h - 1) = p;
1383  }
1384  }
1385  return lhit < MaxHits;
1386  };
1387 
1389  nhit = lhit;
1390  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
unsigned char nhit
Definition: HitPattern.h:1329
static int MaxHits
Definition: HitPattern.h:1327
static bool validHitFilter(uint16_t pattern)
Definition: HitPattern.h:855
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
unsigned char hit[N]
Definition: HitPattern.h:1328
template<int N = HitPattern::MaxHits>
unsigned char reco::PatternSet< N >::operator[] ( int  i) const
inline

Definition at line 1356 of file HitPattern.h.

References mps_fire::i.

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

Definition at line 1351 of file HitPattern.h.

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

1352  {
1353  return nhit;
1354  }
unsigned char nhit
Definition: HitPattern.h:1329

Member Data Documentation

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

Definition at line 1328 of file HitPattern.h.

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

Definition at line 1327 of file HitPattern.h.

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

Definition at line 1329 of file HitPattern.h.

Referenced by reco::commonHits().