CMS 3D CMS Logo

Public Member Functions | Private Member Functions

FWPSimHitProxyBuilder Class Reference

Inheritance diagram for FWPSimHitProxyBuilder:
FWSimpleProxyBuilderTemplate< PSimHit > FWSimpleProxyBuilder FWProxyBuilderBase

List of all members.

Public Member Functions

 FWPSimHitProxyBuilder (void)
 REGISTER_PROXYBUILDER_METHODS ()
virtual ~FWPSimHitProxyBuilder (void)

Private Member Functions

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

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.

{} 
virtual FWPSimHitProxyBuilder::~FWPSimHitProxyBuilder ( void  ) [inline, virtual]

Definition at line 21 of file FWPSimHitProxyBuilder.cc.

{}
FWPSimHitProxyBuilder::FWPSimHitProxyBuilder ( const FWPSimHitProxyBuilder ) [private]

Member Function Documentation

void FWPSimHitProxyBuilder::build ( const PSimHit iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
) [private, virtual]

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().

{
   TEvePointSet* pointSet = new TEvePointSet;
   setupAddElement( pointSet, &oItemHolder );
   const FWGeometry *geom = item()->getGeom();
   unsigned int rawid = iData.detUnitId();
   if( ! geom->contains( rawid ))
   {
      fwLog( fwlog::kError )
        << "failed to get geometry of detid: " 
        << rawid << std::endl;
      return;
   }
   
   float local[3] = { iData.localPosition().x(), iData.localPosition().y(), iData.localPosition().z() };
   float global[3];
   geom->localToGlobal( rawid, local, global );
   pointSet->SetNextPoint( global[0], global[1], global[2] );
}
const FWPSimHitProxyBuilder& FWPSimHitProxyBuilder::operator= ( const FWPSimHitProxyBuilder ) [private]
FWPSimHitProxyBuilder::REGISTER_PROXYBUILDER_METHODS ( )