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 
14  theTracker = std::move(other.theTracker);
15  theStripData = std::move(other.theStripData);
16  thePixelData = std::move(other.thePixelData);
17  thePhase2OTData = std::move(other.thePhase2OTData);
18  theOwner = other.theOwner;
19  other.theOwner = false; // make sure to fully transfer the ownership
20  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
21  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
22 }
24  theTracker = std::move(other.theTracker);
25  theStripData = std::move(other.theStripData);
26  thePixelData = std::move(other.thePixelData);
27  thePhase2OTData = std::move(other.thePhase2OTData);
28  theOwner = other.theOwner;
29  other.theOwner = false; // make sure to fully transfer the ownership
30  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
31  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
32  return *this;
33 }
34 
38  theTracker(trackerEvent.theTracker),
39  theStripData(trackerEvent.theStripData),
40  thePixelData(trackerEvent.thePixelData),
43 {
44  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
45  if (stripClustersToSkip.refProd().id() != theStripData->handle().id() ){
46  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id();
47  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id()<< "\n";
48  }
49 
50  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
51  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
52  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
53  }
54 
57 
60 }
61 
62 //FIXME:just temporary solution for phase2!
66  theTracker(trackerEvent.theTracker),
68  thePixelData(trackerEvent.thePixelData),
69  thePhase2OTData(trackerEvent.thePhase2OTData),
71 {
72 
73  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
74  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
75  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
76  }
77 
78  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()){
79  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
80  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
81  }
82 
85 
88 }
const std::vector< bool > & phase2OTClustersToSkip() const
ProductID id() const
Definition: HandleBase.cc:15
#define nullptr
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
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
std::vector< bool > theStripClustersToSkip
MeasurementTrackerEvent & operator=(const MeasurementTrackerEvent &other)=delete
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
def move(src, dest)
Definition: eostools.py:511