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 private:
25  // Disable default copy constructor
27  // Disable default assignment operator
29 
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",
BeamSpotOnline::x
float x() const
Definition: BeamSpotOnline.h:48
FWBeamSpotOnlineProxyBuilder::~FWBeamSpotOnlineProxyBuilder
~FWBeamSpotOnlineProxyBuilder(void) override
Definition: FWBeamSpotOnlineProxyBuilder.cc:20
FWBeamSpotOnlineProxyBuilder
Definition: FWBeamSpotOnlineProxyBuilder.cc:17
FWSimpleProxyBuilderTemplate.h
BeamSpotOnline::err_y
float err_y() const
Definition: BeamSpotOnline.h:54
BeamSpotOnline::err_z
float err_z() const
Definition: BeamSpotOnline.h:55
FWViewType::kAllRPZBits
static const int kAllRPZBits
Definition: FWViewType.h:67
BeamSpotOnline::y
float y() const
Definition: BeamSpotOnline.h:49
REGISTER_FWPROXYBUILDER
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
Definition: FWProxyBuilderFactory.h:33
REGISTER_PROXYBUILDER_METHODS
#define REGISTER_PROXYBUILDER_METHODS()
Definition: register_dataproxybuilder_macro.h:28
BeamSpotOnline.h
FWViewType::kAll3DBits
static const int kAll3DBits
Definition: FWViewType.h:68
FWBeamSpotOnlineProxyBuilder::FWBeamSpotOnlineProxyBuilder
FWBeamSpotOnlineProxyBuilder(void)
Definition: FWBeamSpotOnlineProxyBuilder.cc:19
BeamSpotOnline::err_x
float err_x() const
Definition: BeamSpotOnline.h:53
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWEventItem.h
FWViewContext
Definition: FWViewContext.h:32
BeamSpotOnline
Definition: BeamSpotOnline.h:28
FWBeamSpotOnlineProxyBuilder::operator=
const FWBeamSpotOnlineProxyBuilder & operator=(const FWBeamSpotOnlineProxyBuilder &)=delete
FWSimpleProxyBuilderTemplate
Definition: FWSimpleProxyBuilderTemplate.h:30
BeamSpotOnline::z
float z() const
Definition: BeamSpotOnline.h:50