CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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 ()
 
 FWME0DigiProxyBuilder (const FWME0DigiProxyBuilder &)=delete
 
const FWME0DigiProxyBuilderoperator= (const FWME0DigiProxyBuilder &)=delete
 
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
 

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() [1/2]

FWME0DigiProxyBuilder::FWME0DigiProxyBuilder ( )
inline

Definition at line 17 of file FWME0DigiProxyBuilder.cc.

17 {}

◆ ~FWME0DigiProxyBuilder()

FWME0DigiProxyBuilder::~FWME0DigiProxyBuilder ( )
inlineoverride

Definition at line 18 of file FWME0DigiProxyBuilder.cc.

18 {}

◆ FWME0DigiProxyBuilder() [2/2]

FWME0DigiProxyBuilder::FWME0DigiProxyBuilder ( const FWME0DigiProxyBuilder )
delete

Member Function Documentation

◆ build()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 29 of file FWME0DigiProxyBuilder.cc.

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

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

◆ classPurpose()

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

Definition at line 70 of file FWME0DigiProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 70 of file FWME0DigiProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 70 of file FWME0DigiProxyBuilder.cc.

◆ classView()

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

Definition at line 70 of file FWME0DigiProxyBuilder.cc.

◆ operator=()

const FWME0DigiProxyBuilder& FWME0DigiProxyBuilder::operator= ( const FWME0DigiProxyBuilder )
delete

◆ purpose()

const std::string& FWME0DigiProxyBuilder::purpose ( ) const
inline

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

25 :
26  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;

◆ typeName()

const std::string& FWME0DigiProxyBuilder::typeName ( ) const
inline

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

25 :
26  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;

◆ view()

const std::string& FWME0DigiProxyBuilder::view ( ) const
inline

Definition at line 20 of file FWME0DigiProxyBuilder.cc.

25 :
26  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;