test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~FWMuonProxyBuilder( void ) {}
25 
26  virtual void setItem(const FWEventItem* iItem);
27 
29 
30 private:
31  // Disable default copy constructor
33  // Disable default assignment operator
35 
36 
38  virtual void build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* ) override;
39 
40  virtual 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:170
#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)
virtual void setItem(const FWEventItem *iItem)
virtual ~FWMuonProxyBuilder(void)
const FWMuonProxyBuilder & operator=(const FWMuonProxyBuilder &)
virtual void localModelChanges(const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) override
FWGenericParameter< T > * assertParam(const std::string &name, T def)
void increaseComponentTransparency(unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)