CMS 3D CMS Logo

MeasurementTrackerEvent.cc
Go to the documentation of this file.
3 
5  if (theOwner) {
6  //std::cout << "Deleting owned MT @" << this << " (strip data @ " << theStripData << ")" << std::endl;
7  delete theStripData; theStripData = nullptr; // also sets to zero since sometimes the FWK seems
8  delete thePixelData; thePixelData = nullptr; // to double-delete the same object (!!!)
9  delete thePhase2OTData; thePhase2OTData = nullptr; // to double-delete the same object (!!!)
10  }
11 }
12 
13 void
15 {
16  if (&other != this) {
17  using std::swap;
18  swap(theTracker, other.theTracker);
22  swap(theOwner, other.theOwner);
25  }
26 }
27 
31  theTracker(trackerEvent.theTracker),
32  theStripData(trackerEvent.theStripData),
33  thePixelData(trackerEvent.thePixelData),
36 {
37  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
38  if (stripClustersToSkip.refProd().id() != theStripData->handle().id() ){
39  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id();
40  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id()<< "\n";
41  }
42 
43  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
44  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
45  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
46  }
47 
50 
53 }
54 
55 //FIXME:just temporary solution for phase2!
59  theTracker(trackerEvent.theTracker),
61  thePixelData(trackerEvent.thePixelData),
62  thePhase2OTData(trackerEvent.thePhase2OTData),
64 {
65 
66  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
67  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
68  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
69  }
70 
71  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()){
72  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
73  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
74  }
75 
78 
81 }
const std::vector< bool > & phase2OTClustersToSkip() const
ProductID id() const
Definition: HandleBase.cc:15
std::vector< bool > thePhase2OTClustersToSkip
MeasurementTrackerEvent()
Dummy constructor used for I/O (even if it&#39;s a transient object)
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const
#define nullptr
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
void swap(MeasurementTrackerEvent &other)
const PxMeasurementDetSet * thePixelData
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
std::vector< bool > theStripClustersToSkip
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()