CMS 3D CMS Logo

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 public:
21 
23 
24  // Disable default copy constructor
26  // Disable default assignment operator
28 
29 private:
31  void build(const BeamSpotOnline& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext*) override;
32 };
33 
35  unsigned int iIndex,
36  TEveElement& oItemHolder,
37  const FWViewContext*) {
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, posx - errx, posy - erry, posz - errz);
56 }
57 
60  "Beam Spot Online",
float err_y() const
float z() const
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
Definition: FWViewType.h:67
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
float y() const
float err_x() const
float err_z() const
static const int kAll3DBits
Definition: FWViewType.h:68
const FWBeamSpotOnlineProxyBuilder & operator=(const FWBeamSpotOnlineProxyBuilder &)=delete
float x() const