CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWBeamSpotOnlineProxyBuilder.cc
Go to the documentation of this file.
1 /*
2  * FWBeamSpotProxyBuilder.cc
3  * FWorks
4  *
5  * Created by Ianna Osborne on 7/29/10.
6  *
7  */
8 
9 #include "TEvePointSet.h"
10 #include "TEveStraightLineSet.h"
11 
14 
16 
18 {
19 public:
21  virtual ~FWBeamSpotOnlineProxyBuilder( void ) {}
22 
24 
25 private:
26  // Disable default copy constructor
28  // Disable default assignment operator
30 
32  virtual void build( const BeamSpotOnline& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* ) override;
33 };
34 
35 void
36 FWBeamSpotOnlineProxyBuilder::build( const BeamSpotOnline& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* )
37 {
38  TEvePointSet* pointSet = new TEvePointSet;
39  setupAddElement( pointSet, &oItemHolder );
40 
41  TEveStraightLineSet* lineSet = new TEveStraightLineSet;
42  setupAddElement( lineSet, &oItemHolder );
43 
44  double posx = iData.x();
45  double posy = iData.y();
46  double posz = iData.z();
47  double errx = iData.err_x();
48  double erry = iData.err_y();
49  double errz = iData.err_z();
50 
51  pointSet->SetNextPoint( posx, posy, posz );
52  pointSet->SetNextPoint( posx + errx, posy + erry, posz + errz );
53  pointSet->SetNextPoint( posx - errx, posy - erry, posz - errz );
54 
55  lineSet->AddLine( posx + errx, posy + erry, posz + errz,
56  posx - errx, posy - erry, posz - errz );
57 }
58 
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
float err_y() const
static const int kAllRPZBits
Definition: FWViewType.h:58
float err_x() const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
float y() const
float x() const
float z() const
static const int kAll3DBits
Definition: FWViewType.h:59
float err_z() const
const FWBeamSpotOnlineProxyBuilder & operator=(const FWBeamSpotOnlineProxyBuilder &)