CMS 3D CMS Logo

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
 
 ~FWME0DigiProxyBuilder () override
 
- 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

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

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 17 of file FWME0DigiProxyBuilder.cc.

17 {}
FWME0DigiProxyBuilder::~FWME0DigiProxyBuilder ( )
inlineoverride

Definition at line 18 of file FWME0DigiProxyBuilder.cc.

18 {}
FWME0DigiProxyBuilder::FWME0DigiProxyBuilder ( const FWME0DigiProxyBuilder )
privatedelete

Member Function Documentation

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

Reimplemented from FWProxyBuilderBase.

Definition at line 28 of file FWME0DigiProxyBuilder.cc.

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

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

Definition at line 69 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 69 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 69 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 69 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

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

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

22 :
23  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;