test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWME0DigiProxyBuilder Class Reference
Inheritance diagram for FWME0DigiProxyBuilder:
FWProxyBuilderBase

Public Member Functions

 FWME0DigiProxyBuilder ()
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
virtual ~FWME0DigiProxyBuilder ()
 
- 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 ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- 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...
 

Private Member Functions

virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
 FWME0DigiProxyBuilder (const FWME0DigiProxyBuilder &)
 
const FWME0DigiProxyBuilderoperator= (const FWME0DigiProxyBuilder &)
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >
::iterator 
Product_it
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
virtual void clean ()
 
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)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 15 of file FWME0DigiProxyBuilder.cc.

Constructor & Destructor Documentation

FWME0DigiProxyBuilder::FWME0DigiProxyBuilder ( )
inline

Definition at line 18 of file FWME0DigiProxyBuilder.cc.

18 {}
virtual FWME0DigiProxyBuilder::~FWME0DigiProxyBuilder ( )
inlinevirtual

Definition at line 19 of file FWME0DigiProxyBuilder.cc.

19 {}
FWME0DigiProxyBuilder::FWME0DigiProxyBuilder ( const FWME0DigiProxyBuilder )
private

Member Function Documentation

void FWME0DigiProxyBuilder::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext  
)
privatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 29 of file FWME0DigiProxyBuilder.cc.

References FWGeometry::contains(), FWProxyBuilderBase::createCompound(), fwLog, relativeConstraints::geom, FWEventItem::get(), FWEventItem::getGeom(), fwlog::kWarning, FWGeometry::localToGlobal(), and FWProxyBuilderBase::setupAddElement().

30 {
31  const ME0DigiPreRecoCollection* digis = 0;
32 
33  iItem->get(digis);
34 
35  if ( ! digis )
36  {
37  fwLog(fwlog::kWarning)<<"Failed to get ME0Digis"<<std::endl;
38  return;
39  }
40  const FWGeometry *geom = iItem->getGeom();
41 
42  for ( ME0DigiPreRecoCollection::DigiRangeIterator dri = digis->begin(), driEnd = digis->end();
43  dri != driEnd; ++dri )
44  {
45  unsigned int rawid = (*dri).first.rawId();
46  const ME0DigiPreRecoCollection::Range& range = (*dri).second;
47 
48  if( ! geom->contains( rawid ))
49  {
50  fwLog( fwlog::kWarning ) << "Failed to get geometry of ME0 roll with detid: "
51  << rawid << std::endl;
52 
53  TEveCompound* compound = createCompound();
54  setupAddElement( compound, product );
55 
56  continue;
57  }
58 
59  for( ME0DigiPreRecoCollection::const_iterator dit = range.first;
60  dit != range.second; ++dit )
61  {
62  TEveBoxSet* stripDigiSet = new TEveBoxSet;
63  setupAddElement( stripDigiSet, product );
64 
65  float localPoint[3] = {(*dit).x(), (*dit).y(), 0.0};
66  float globalPoint[3];
67 
68  geom->localToGlobal( rawid, localPoint, globalPoint);
69 
70  stripDigiSet->AddBox(globalPoint[0], globalPoint[1], globalPoint[2],
71  (*dit).ex(), (*dit).ey(), 0.1);
72  }
73  }
74 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:85
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Definition: FWGeometry.cc:328
bool contains(unsigned int id) const
Definition: FWGeometry.h:109
#define fwLog(_level_)
Definition: fwLog.h:50
std::vector< ME0DigiPreReco >::const_iterator const_iterator
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::pair< const_iterator, const_iterator > Range
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:683
const std::string & FWME0DigiProxyBuilder::classPurpose ( )
static

Definition at line 77 of file FWME0DigiProxyBuilder.cc.

const std::string & FWME0DigiProxyBuilder::classRegisterTypeName ( )
static

Definition at line 77 of file FWME0DigiProxyBuilder.cc.

const std::string & FWME0DigiProxyBuilder::classTypeName ( )
static

Definition at line 77 of file FWME0DigiProxyBuilder.cc.

const std::string & FWME0DigiProxyBuilder::classView ( )
static

Definition at line 77 of file FWME0DigiProxyBuilder.cc.

const FWME0DigiProxyBuilder& FWME0DigiProxyBuilder::operator= ( const FWME0DigiProxyBuilder )
private
const std::string& FWME0DigiProxyBuilder::purpose ( ) const
inline

Definition at line 21 of file FWME0DigiProxyBuilder.cc.

23 :
24  virtual void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*);
const std::string& FWME0DigiProxyBuilder::typeName ( ) const
inline

Definition at line 21 of file FWME0DigiProxyBuilder.cc.

23 :
24  virtual void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*);
const std::string& FWME0DigiProxyBuilder::view ( ) const
inline

Definition at line 21 of file FWME0DigiProxyBuilder.cc.

23 :
24  virtual void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*);