CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 = 0; // also sets to zero since sometimes the FWK seems
8  delete thePixelData; thePixelData = 0; // to double-delete the same object (!!!)
9  }
10 }
11 
12 void
14 {
15  if (&other != this) {
16  using std::swap;
17  swap(theTracker, other.theTracker);
20  swap(theOwner, other.theOwner);
23  }
24 }
25 
27  const edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > & stripClustersToSkip,
28  const edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > & pixelClustersToSkip) :
29  theTracker(trackerEvent.theTracker),
30  theStripData(trackerEvent.theStripData), thePixelData(trackerEvent.thePixelData), theOwner(false),
31  theStripClustersToSkip(),
32  thePixelClustersToSkip()
33 {
34  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
35  if (stripClustersToSkip.refProd().id() != theStripData->handle().id() ){
36  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id();
37  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id()<< "\n";
38  }
39 
40  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
41  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
42  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
43  }
44 
47 
50 }
51 
ProductID id() const
Definition: HandleBase.cc:15
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
void swap(MeasurementTrackerEvent &other)
const PxMeasurementDetSet * thePixelData
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< bool > theStripClustersToSkip
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
volatile std::atomic< bool > shutdown_flag false