test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeasurementTrackerEvent.h
Go to the documentation of this file.
1 #ifndef MeasurementTrackerEvent_H
2 #define MeasurementTrackerEvent_H
3 
4 #include <vector>
10 
14 #if defined(__GCCXML__) || defined(__CINT__)
15  #define MeasurementTrackerEvent_Hide_Impl
16  struct MeasurementTracker;
17 #else
19 #endif
20 
22 public:
23 #ifndef MeasurementTrackerEvent_Hide_Impl
25 #endif
26 
29 
31 
34  const std::vector<bool> & stripClustersToSkip = std::vector<bool>(),
35  const std::vector<bool> & pixelClustersToSkip = std::vector<bool>()):
36  theTracker(&tracker), theStripData(&strips), thePixelData(&pixels), theOwner(false),
38 
41  const std::vector<bool> & stripClustersToSkip = std::vector<bool>(),
42  const std::vector<bool> & pixelClustersToSkip = std::vector<bool>()):
43  theTracker(&tracker), theStripData(strips), thePixelData(pixels), theOwner(true),
45 
47  //MeasurementTrackerEvent(const MeasurementTrackerEvent &trackerEvent,
48  // const std::vector<bool> & stripClustersToSkip,
49  // const std::vector<bool> & pixelClustersToSkip):
50  // theTracker(trackerEvent.theTracker), theStripData(trackerEvent.theStripData), thePixelData(trackerEvent.thePixelData), theOwner(false)
51  // theStripClustersToSkip(stripClustersToSkip), thePixelClustersToSkip(pixelClustersToSkip) {}
52 
57 
58 
60  theTracker(other.theTracker),
63  theOwner(false),
66  {
67  assert(other.theOwner == false && "trying to copy an owning pointer");
68  }
69 
71  {
72  if (&other != this) {
74  copy.swap(*this);
75  }
76  return *this;
77  }
78 
79 #ifndef MeasurementTrackerEvent_Hide_Impl
81  theTracker(other.theTracker),
84  theOwner(other.theOwner),
87  {
88  other.theTracker = 0;
89  other.theStripData = 0; other.thePixelData = 0;
90  other.theOwner = false;
91  }
92 
94  {
95  if (&other != this) {
97  copy.swap(*this);
98  }
99  return *this;
100  }
101 #endif
102 
103  void swap(MeasurementTrackerEvent &other) ;
104 
105  const MeasurementTracker & measurementTracker() const { return * theTracker; }
106  const StMeasurementDetSet & stripData() const { return * theStripData; }
107  const PxMeasurementDetSet & pixelData() const { return * thePixelData; }
108  const std::vector<bool> & stripClustersToSkip() const { return theStripClustersToSkip; }
109  const std::vector<bool> & pixelClustersToSkip() const { return thePixelClustersToSkip; }
110 
111 #ifndef MeasurementTrackerEvent_Hide_Impl
112  // forwarded calls
115 
117  MeasurementDetWithData idToDet(const DetId& id) const { return measurementTracker().idToDet(id, *this); }
118 #endif
119 
120 protected:
124  bool theOwner; // do I own the two above?
125  // these two could be const pointers as well, but ContainerMask doesn't expose the vector
126  std::vector<bool> theStripClustersToSkip;
127  std::vector<bool> thePixelClustersToSkip;
128 };
129 
131 #endif // MeasurementTrackerEvent_H
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
MeasurementTracker::QualityFlags QualityFlags
const TrackingGeometry * geomTracker() const
MeasurementTrackerEvent(const MeasurementTracker &tracker, const StMeasurementDetSet &strips, const PxMeasurementDetSet &pixels, const std::vector< bool > &stripClustersToSkip=std::vector< bool >(), const std::vector< bool > &pixelClustersToSkip=std::vector< bool >())
Real constructor 1: with the full data (not owned)
MeasurementTrackerEvent(MeasurementTrackerEvent &&other)
MeasurementTrackerEvent()
Dummy constructor used for I/O (even if it&#39;s a transient object)
const StMeasurementDetSet & stripData() const
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
void swap(MeasurementTrackerEvent &other)
const PxMeasurementDetSet * thePixelData
const PxMeasurementDetSet & pixelData() const
std::vector< bool > theStripClustersToSkip
const TrackingGeometry * geomTracker() const
MeasurementTrackerEvent & operator=(MeasurementTrackerEvent &&other)
const MeasurementTracker & measurementTracker() const
Definition: DetId.h:18
MeasurementTrackerEvent & operator=(const MeasurementTrackerEvent &other)
double b
Definition: hdecay.h:120
MeasurementTrackerEvent(const MeasurementTrackerEvent &other)
MeasurementTrackerEvent(const MeasurementTracker &tracker, const StMeasurementDetSet *strips, const PxMeasurementDetSet *pixels, const std::vector< bool > &stripClustersToSkip=std::vector< bool >(), const std::vector< bool > &pixelClustersToSkip=std::vector< bool >())
Real constructor 1: with the full data (owned)
double a
Definition: hdecay.h:121
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
volatile std::atomic< bool > shutdown_flag false
const GeometricSearchTracker * geometricSearchTracker() const
const GeometricSearchTracker * geometricSearchTracker() const
virtual MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const =0
MeasurementDetSystem interface.