CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWDTDigiProxyBuilder Class Reference
Inheritance diagram for FWDTDigiProxyBuilder:
FWProxyBuilderBase

Public Member Functions

 FWDTDigiProxyBuilder (void)
 
bool haveSingleProduct (void) const override
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWDTDigiProxyBuilder (void) 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
 
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 buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType, const FWViewContext *) override
 
 FWDTDigiProxyBuilder (const FWDTDigiProxyBuilder &)=delete
 
const FWDTDigiProxyBuilderoperator= (const FWDTDigiProxyBuilder &)=delete
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWProxyBuilderBase
virtual void build (const FWEventItem *iItem, TEveElementList *product, 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 57 of file FWDTDigiProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWDTDigiProxyBuilder() [1/2]

FWDTDigiProxyBuilder::FWDTDigiProxyBuilder ( void  )
inline

Definition at line 59 of file FWDTDigiProxyBuilder.cc.

59 {}

◆ ~FWDTDigiProxyBuilder()

FWDTDigiProxyBuilder::~FWDTDigiProxyBuilder ( void  )
inlineoverride

Definition at line 60 of file FWDTDigiProxyBuilder.cc.

60 {}

◆ FWDTDigiProxyBuilder() [2/2]

FWDTDigiProxyBuilder::FWDTDigiProxyBuilder ( const FWDTDigiProxyBuilder )
privatedelete

Member Function Documentation

◆ buildViewType() [1/2]

void FWProxyBuilderBase::buildViewType
private

Definition at line 333 of file FWProxyBuilderBase.cc.

333  {
334  assert(
335  "virtual buildViewType(const FWEventItem*, TEveElementList*, FWViewType::EType, const FWViewContext*) not "
336  "implemented by inherited class");
337 }

◆ buildViewType() [2/2]

void FWDTDigiProxyBuilder::buildViewType ( const FWEventItem iItem,
TEveElementList *  product,
FWViewType::EType  type,
const FWViewContext  
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 79 of file FWDTDigiProxyBuilder.cc.

82  {
83  const DTDigiCollection* digis = nullptr;
84  iItem->get(digis);
85 
86  if (!digis) {
87  return;
88  }
89  const FWGeometry* geom = iItem->getGeom();
90 
91  for (DTDigiCollection::DigiRangeIterator dri = digis->begin(), dre = digis->end(); dri != dre; ++dri) {
92  const DTLayerId& layerId = (*dri).first;
93  unsigned int rawid = layerId.rawId();
94  const DTDigiCollection::Range& range = (*dri).second;
95 
96  if (!geom->contains(rawid)) {
97  fwLog(fwlog::kWarning) << "failed to get geometry of DT with detid: " << rawid << std::endl;
98 
99  TEveCompound* compound = createCompound();
100  setupAddElement(compound, product);
101 
102  continue;
103  }
104 
105  const float* pars = geom->getParameters(rawid);
106  FWGeometry::IdToInfoItr det = geom->find(rawid);
107 
108  int superLayer = layerId.superlayerId().superLayer();
109 
110  float localPos[3] = {0.0, 0.0, 0.0};
111 
112  // Loop over the digis of this DetUnit
113  for (DTDigiCollection::const_iterator it = range.first; it != range.second; ++it) {
114  // The x wire position in the layer, starting from its wire number.
115  float firstChannel = pars[3];
116  float nChannels = pars[5];
117  localPos[0] = ((*it).wire() - (firstChannel - 1) - 0.5) * pars[0] - nChannels / 2.0 * pars[0];
118 
120  TEveBox* box = new TEveBox;
121  setupAddElement(box, product);
122  ::addTube(box, *det, localPos, pars);
123  } else if (((type == FWViewType::kRhoPhi || type == FWViewType::kRhoPhiPF) && superLayer != 2) ||
124  (type == FWViewType::kRhoZ && superLayer == 2)) {
125  TEvePointSet* pointSet = new TEvePointSet;
126  pointSet->SetMarkerStyle(24);
127  setupAddElement(pointSet, product);
128 
129  float globalPos[3];
130  geom->localToGlobal(*det, localPos, globalPos);
131  pointSet->SetNextPoint(globalPos[0], globalPos[1], globalPos[2]);
132 
133  TEveBox* box = new TEveBox;
134  setupAddElement(box, product);
135  ::addTube(box, *det, localPos, pars);
136  } else {
137  TEveCompound* compound = createCompound();
138  setupAddElement(compound, product);
139  }
140  }
141  }
142 }

References FWProxyBuilderBase::createCompound(), fwLog, relativeConstraints::geom, FWEventItem::get(), FWEventItem::getGeom(), FWViewType::k3D, FWViewType::kISpy, FWViewType::kRhoPhi, FWViewType::kRhoPhiPF, FWViewType::kRhoZ, fwlog::kWarning, ecaldqm::nChannels, FastTimerService_cff::range, DetId::rawId(), FWProxyBuilderBase::setupAddElement(), DTSuperLayerId::superLayer(), and DTLayerId::superlayerId().

◆ classPurpose()

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

Definition at line 147 of file FWDTDigiProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 147 of file FWDTDigiProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 147 of file FWDTDigiProxyBuilder.cc.

◆ classView()

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

Definition at line 147 of file FWDTDigiProxyBuilder.cc.

◆ haveSingleProduct()

bool FWDTDigiProxyBuilder::haveSingleProduct ( void  ) const
inlineoverridevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 62 of file FWDTDigiProxyBuilder.cc.

62 { return false; }

◆ operator=()

const FWDTDigiProxyBuilder& FWDTDigiProxyBuilder::operator= ( const FWDTDigiProxyBuilder )
privatedelete

◆ purpose()

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

Definition at line 64 of file FWDTDigiProxyBuilder.cc.

66 :
67  // Disable default copy constructor

◆ typeName()

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

Definition at line 64 of file FWDTDigiProxyBuilder.cc.

66 :
67  // Disable default copy constructor

◆ view()

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

Definition at line 64 of file FWDTDigiProxyBuilder.cc.

66 :
67  // Disable default copy constructor
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
FWViewType::kRhoZ
Definition: FWViewType.h:33
ecaldqm::nChannels
Definition: EcalDQMCommonUtils.h:113
FWGeometry::IdToInfoItr
std::vector< FWGeometry::GeomDetInfo >::const_iterator IdToInfoItr
Definition: FWGeometry.h:137
cms::cuda::assert
assert(be >=bs)
DTSuperLayerId::superLayer
int superLayer() const
Return the superlayer number.
Definition: DTSuperLayerId.h:39
FWProxyBuilderBase::createCompound
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
Definition: FWProxyBuilderBase.cc:374
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
DTLayerId
Definition: DTLayerId.h:12
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
DTDigiCollection
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
fwlog::kWarning
Definition: fwLog.h:35
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
FWViewType::kISpy
Definition: FWViewType.h:35
DTLayerId::superlayerId
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
FWViewType::k3D
Definition: FWViewType.h:34
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
FWViewType::kRhoPhiPF
Definition: FWViewType.h:42
DigiContainerIterator
Definition: MuonDigiCollection.h:30
FWViewType::kRhoPhi
Definition: FWViewType.h:32