CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Fireworks/Muons/plugins/FWMuonGlimpseProxyBuilder.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     Muons
00004 // Class  :     FWMuonGlimpseProxyBuilder
00005 //
00006 // $Id: FWMuonGlimpseProxyBuilder.cc,v 1.2 2010/09/02 18:28:13 amraktad Exp $
00007 //
00008 
00009 #include "TEveScalableStraightLineSet.h"
00010 #include "Fireworks/Core/interface/FWSimpleProxyBuilderTemplate.h"
00011 #include "Fireworks/Candidates/interface/CandidateUtils.h"
00012 #include "DataFormats/MuonReco/interface/Muon.h"
00013 
00014 class FWMuonGlimpseProxyBuilder : public FWSimpleProxyBuilderTemplate<reco::Muon>
00015 {
00016 public:
00017    FWMuonGlimpseProxyBuilder( void ) {}
00018    virtual ~FWMuonGlimpseProxyBuilder( void ) {}
00019 
00020    REGISTER_PROXYBUILDER_METHODS();
00021 
00022 private:
00023    // Disable default copy constructor
00024    FWMuonGlimpseProxyBuilder( const FWMuonGlimpseProxyBuilder& );
00025    // Disable default assignment operator
00026    const FWMuonGlimpseProxyBuilder& operator=( const FWMuonGlimpseProxyBuilder& );
00027 
00028    void build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* );
00029 };
00030 
00031 void
00032 FWMuonGlimpseProxyBuilder::build( const reco::Muon& iData, unsigned int iIndex, TEveElement& oItemHolder, const FWViewContext* )
00033 {
00034    TEveScalableStraightLineSet* marker = new TEveScalableStraightLineSet( "", "" );
00035    marker->SetLineWidth( 2 );
00036    fireworks::addStraightLineSegment( marker, &iData, 1.0 );
00037    setupAddElement( marker, &oItemHolder );
00038    //add to scaler at end so that it can scale the line after all ends have been added
00039    // FIXME:   scaler()->addElement(marker);
00040 }
00041 
00042 REGISTER_FWPROXYBUILDER(FWMuonGlimpseProxyBuilder, reco::Muon, "Muons", FWViewType::kGlimpseBit);