CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SeedingHitSet.h
Go to the documentation of this file.
1 #ifndef TkSeedingLayers_SeedingHitSet_H
2 #define TkSeedingLayers_SeedingHitSet_H
3 
5 
6 class SeedingHitSet {
7 public:
11 
12  static ConstRecHitPointer nullPtr() { return nullptr; }
13 
14  SeedingHitSet() { theRecHits[0] = theRecHits[1] = theRecHits[2] = theRecHits[3] = nullptr; }
15 
17  // : theRecHits{{one,two,ConstRecHitPointer()}}
18  {
19  theRecHits[0] = one;
21  theRecHits[2] = theRecHits[3] = nullptr;
22  }
24  // : theRecHits{{one,two,three}},
25  {
26  theRecHits[0] = one;
27  theRecHits[1] = two;
28  theRecHits[2] = three;
29  theRecHits[3] = nullptr;
30  }
31 
33  theRecHits[0] = one;
34  theRecHits[1] = two;
35  theRecHits[2] = three;
36  theRecHits[3] = four;
37  }
38 
39  ConstRecHitPointer const *data() const { return theRecHits; }
40 
41  unsigned int size() const { return theRecHits[3] ? 4 : (theRecHits[2] ? 3 : (theRecHits[1] ? 2 : 0)); }
42 
43  ConstRecHitPointer get(unsigned int i) const { return theRecHits[i]; }
44  ConstRecHitPointer operator[](unsigned int i) const { return theRecHits[i]; }
45 
46 private:
48 };
49 
50 #endif
SeedingHitSet(ConstRecHitPointer one, ConstRecHitPointer two, ConstRecHitPointer three, ConstRecHitPointer four)
Definition: SeedingHitSet.h:32
ConstRecHitPointer const * data() const
Definition: SeedingHitSet.h:39
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
ConstRecHitPointer operator[](unsigned int i) const
Definition: SeedingHitSet.h:44
static ConstRecHitPointer nullPtr()
Definition: SeedingHitSet.h:12
unsigned int size() const
Definition: SeedingHitSet.h:41