Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:10:04

0001 /*
0002  *  FWSimVertexProxyBuilder.cc
0003  *  FWorks
0004  *
0005  *  Created by Ianna Osborne on 9/9/10.
0006  *
0007  */
0008 
0009 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
0010 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0011 
0012 #include "TEvePointSet.h"
0013 
0014 class FWSimVertexProxyBuilder : public FWSimpleProxyBuilderTemplate<SimVertex> {
0015 public:
0016   FWSimVertexProxyBuilder(void) {}
0017   ~FWSimVertexProxyBuilder(void) override {}
0018 
0019   REGISTER_PROXYBUILDER_METHODS();
0020 
0021   // Disable default copy constructor
0022   FWSimVertexProxyBuilder(const FWSimVertexProxyBuilder&) = delete;
0023   // Disable default assignment operator
0024   const FWSimVertexProxyBuilder& operator=(const FWSimVertexProxyBuilder&) = delete;
0025 
0026 private:
0027   using FWSimpleProxyBuilderTemplate<SimVertex>::build;
0028   void build(const SimVertex& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*) override;
0029 };
0030 
0031 void FWSimVertexProxyBuilder::build(const SimVertex& iData,
0032                                     unsigned int iIndex,
0033                                     TEveElement& oItemHolder,
0034                                     const FWViewContext*) {
0035   TEvePointSet* pointSet = new TEvePointSet;
0036   setupAddElement(pointSet, &oItemHolder);
0037   pointSet->SetNextPoint(iData.position().x(), iData.position().y(), iData.position().z());
0038 }
0039 
0040 REGISTER_FWPROXYBUILDER(FWSimVertexProxyBuilder,
0041                         SimVertex,
0042                         "SimVertices",
0043                         FWViewType::kAll3DBits | FWViewType::kAllRPZBits);