CMS 3D CMS Logo

FWMuonProxyBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Muons
4 // Class : FWMuonProxyBuilder
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Thu Dec 4 19:28:07 EST 2008
11 //
12 #include "TEveTrack.h"
13 
19 
21 {
22 public:
23  FWMuonProxyBuilder( void ) {}
24  ~FWMuonProxyBuilder( void ) override {}
25 
26  void setItem(const FWEventItem* iItem) override;
27 
29 
30 private:
31  // Disable default copy constructor
32  FWMuonProxyBuilder( const FWMuonProxyBuilder& ) = delete;
33  // Disable default assignment operator
34  const FWMuonProxyBuilder& operator=( const FWMuonProxyBuilder& ) = delete;
35 
36 
38  void build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* ) override;
39 
40  void localModelChanges( const FWModelId& iId, TEveElement* iCompound,
41  FWViewType::EType viewType, const FWViewContext* vc ) override;
42 
44 };
45 
46 
47 void
49 {
51 
52  if (iItem) {
53  iItem->getConfig()->assertParam("LineWidth", long(1), long(1), long(4));
54  }
55 }
56 
57 void
58 FWMuonProxyBuilder::build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* )
59 {
60  int width = item()->getConfig()->value<long>("LineWidth");
61  m_builder.setLineWidth(width);
62 
63  m_builder.buildMuon( this, &iData, &oItemHolder, true, false );
64  increaseComponentTransparency( iIndex, &oItemHolder, "Chamber", 60 );
65 }
66 
67 void
68 FWMuonProxyBuilder::localModelChanges( const FWModelId& iId, TEveElement* iCompound,
69  FWViewType::EType viewType, const FWViewContext* vc )
70 {
71  increaseComponentTransparency( iId.index(), iCompound, "Chamber", 60 );
72 }
73 
FWProxyBuilderConfiguration * getConfig() const
Definition: FWEventItem.h:169
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
void setLineWidth(int w)
Definition: FWMuonBuilder.h:40
void buildMuon(FWProxyBuilderBase *, const reco::Muon *muon, TEveElement *tList, bool showEndcap, bool onlyTracks=false)
const FWEventItem * item() const
static const int kAll3DBits
Definition: FWViewType.h:59
int index() const
Definition: FWModelId.h:49
virtual void setItem(const FWEventItem *iItem)
void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
FWGenericParameter< T > * assertParam(const std::string &name, T def)
void setItem(const FWEventItem *iItem) override
~FWMuonProxyBuilder(void) override
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
const FWMuonProxyBuilder & operator=(const FWMuonProxyBuilder &)=delete