CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
FWPSimHitProxyBuilder Class Reference
Inheritance diagram for FWPSimHitProxyBuilder:
FWSimpleProxyBuilderTemplate< PSimHit > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWPSimHitProxyBuilder (void)
 
 REGISTER_PROXYBUILDER_METHODS ()
 
virtual ~FWPSimHitProxyBuilder (void)
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< PSimHit >
 FWSimpleProxyBuilderTemplate ()
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
virtual ~FWSimpleProxyBuilder ()
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () const
 
virtual void itemBeingDestroyed (const FWEventItem *)
 
void itemChanged (const FWEventItem *)
 
int layer () const
 
void modelChanges (const FWModelIds &)
 
void removePerViewProduct (FWViewType::EType, const FWViewContext *vc)
 
void scaleChanged (const FWViewContext *)
 
void setHaveWindow (bool iFlag)
 
virtual void setInteractionList (FWInteractionList *, const std::string &)
 
virtual void setItem (const FWEventItem *iItem)
 
void setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const
 
void setupElement (TEveElement *el, bool color=true) const
 
virtual bool willHandleInteraction () const
 
virtual ~FWProxyBuilderBase ()
 

Private Member Functions

void build (const PSimHit &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *)
 
 FWPSimHitProxyBuilder (const FWPSimHitProxyBuilder &)
 
const FWPSimHitProxyBuilderoperator= (const FWPSimHitProxyBuilder &)
 

Additional Inherited Members

- Static Public Member Functions inherited from FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< PSimHit >
const PSimHitmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *)
 
virtual void clean ()
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void cleanLocal ()
 
TEveCompound * createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const
 
 FWProxyBuilderBase (const FWProxyBuilderBase &)
 
void increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset)
 
virtual void localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc)
 
virtual void modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 17 of file FWPSimHitProxyBuilder.cc.

Constructor & Destructor Documentation

FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( void  )
inline

Definition at line 20 of file FWPSimHitProxyBuilder.cc.

20 {}
virtual FWPSimHitProxyBuilder::~FWPSimHitProxyBuilder ( void  )
inlinevirtual

Definition at line 21 of file FWPSimHitProxyBuilder.cc.

21 {}
FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( const FWPSimHitProxyBuilder )
private

Member Function Documentation

void FWPSimHitProxyBuilder::build ( const PSimHit iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
privatevirtual

iIndex is the index where iData is found in the container from which it came iItemHolder is the object to which you add your own objects which inherit from TEveElement

Reimplemented from FWSimpleProxyBuilderTemplate< PSimHit >.

Definition at line 35 of file FWPSimHitProxyBuilder.cc.

References FWGeometry::contains(), PSimHit::detUnitId(), fwLog, relativeConstraints::geom, FWEventItem::getGeom(), FWProxyBuilderBase::item(), fwlog::kError, PSimHit::localPosition(), FWGeometry::localToGlobal(), FWProxyBuilderBase::setupAddElement(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

36 {
37  TEvePointSet* pointSet = new TEvePointSet;
38  setupAddElement( pointSet, &oItemHolder );
39  const FWGeometry *geom = item()->getGeom();
40  unsigned int rawid = iData.detUnitId();
41  if( ! geom->contains( rawid ))
42  {
44  << "failed to get geometry of detid: "
45  << rawid << std::endl;
46  return;
47  }
48 
49  float local[3] = { iData.localPosition().x(), iData.localPosition().y(), iData.localPosition().z() };
50  float global[3];
51  geom->localToGlobal( rawid, local, global );
52  pointSet->SetNextPoint( global[0], global[1], global[2] );
53 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
T y() const
Definition: PV3DBase.h:63
void localToGlobal(unsigned int id, const float *local, float *global) const
Definition: FWGeometry.cc:325
const FWEventItem * item() const
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T z() const
Definition: PV3DBase.h:64
bool contains(unsigned int id) const
Definition: FWGeometry.h:98
#define fwLog(_level_)
Definition: fwLog.h:51
T x() const
Definition: PV3DBase.h:62
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:682
unsigned int detUnitId() const
Definition: PSimHit.h:93
const FWPSimHitProxyBuilder& FWPSimHitProxyBuilder::operator= ( const FWPSimHitProxyBuilder )
private
FWPSimHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )