Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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