CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/Fireworks/Muons/plugins/FWMuonProxyBuilder.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Muons
00004 // Class  :     FWMuonProxyBuilder
00005 //
00006 // Implementation:
00007 //     <Notes on implementation>
00008 //
00009 // Original Author:  Chris Jones
00010 //         Created:  Thu Dec  4 19:28:07 EST 2008
00011 // $Id: FWMuonProxyBuilder.cc,v 1.13 2010/08/19 13:39:17 yana Exp $
00012 //
00013 
00014 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00015 #include "Fireworks/Muons/interface/FWMuonBuilder.h"
00016 #include "DataFormats/MuonReco/interface/Muon.h"
00017 
00018 class FWMuonProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::Muon>
00019 {
00020 public:
00021    FWMuonProxyBuilder( void ) {}
00022    virtual ~FWMuonProxyBuilder( void ) {}
00023 
00024    REGISTER_PROXYBUILDER_METHODS();
00025 
00026 private:
00027    // Disable default copy constructor
00028    FWMuonProxyBuilder( const FWMuonProxyBuilder& );
00029    // Disable default assignment operator
00030    const FWMuonProxyBuilder& operator=( const FWMuonProxyBuilder& );
00031 
00032 
00033    virtual void build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* );
00034 
00035    virtual void localModelChanges( const FWModelId& iId, TEveElement* iCompound,
00036                                    FWViewType::EType viewType, const FWViewContext* vc );
00037 
00038    mutable FWMuonBuilder m_builder;
00039 };
00040 
00041 void
00042 FWMuonProxyBuilder::build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* ) 
00043 {
00044    m_builder.buildMuon( this, &iData, &oItemHolder, true, false );
00045 
00046    increaseComponentTransparency( iIndex, &oItemHolder, "Chamber", 60 );
00047 }
00048 
00049 void
00050 FWMuonProxyBuilder::localModelChanges( const FWModelId& iId, TEveElement* iCompound,
00051                                        FWViewType::EType viewType, const FWViewContext* vc )
00052 {
00053    increaseComponentTransparency( iId.index(), iCompound, "Chamber", 60 );
00054 }
00055 
00056 REGISTER_FWPROXYBUILDER( FWMuonProxyBuilder, reco::Muon, "Muons", FWViewType::kAll3DBits | FWViewType::kRhoZBit );