CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWBeamSpotProxyBuilder Class Reference
Inheritance diagram for FWBeamSpotProxyBuilder:
FWSimpleProxyBuilderTemplate< reco::BeamSpot > FWSimpleProxyBuilder FWProxyBuilderBase

Public Member Functions

 FWBeamSpotProxyBuilder (void)
 
 FWBeamSpotProxyBuilder (const FWBeamSpotProxyBuilder &)=delete
 
const FWBeamSpotProxyBuilderoperator= (const FWBeamSpotProxyBuilder &)=delete
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWBeamSpotProxyBuilder (void) override
 
- Public Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::BeamSpot >
 FWSimpleProxyBuilderTemplate ()
 
 FWSimpleProxyBuilderTemplate (const FWSimpleProxyBuilderTemplate &)=delete
 
const FWSimpleProxyBuilderTemplateoperator= (const FWSimpleProxyBuilderTemplate &)=delete
 
- Public Member Functions inherited from FWSimpleProxyBuilder
 FWSimpleProxyBuilder (const std::type_info &iType)
 
 FWSimpleProxyBuilder (const FWSimpleProxyBuilder &)=delete
 
const FWSimpleProxyBuilderoperator= (const FWSimpleProxyBuilder &)=delete
 
 ~FWSimpleProxyBuilder () 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 FWSimpleProxyBuilder
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 
- 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 reco::BeamSpot &iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *) override
 
void localModelChanges (const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWSimpleProxyBuilderTemplate< reco::BeamSpot >
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void build (const void *, unsigned int iIndex, TEveElement &iItemHolder, const FWViewContext *)=0
 
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, const FWViewContext *context) override
 
virtual void buildViewType (const void *, unsigned int iIndex, TEveElement &iItemHolder, FWViewType::EType, const FWViewContext *)=0
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void buildViewType (const void *iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *context) override
 
virtual void buildViewType (const reco::BeamSpot &iData, unsigned int iIndex, TEveElement &oItemHolder, FWViewType::EType viewType, const FWViewContext *)
 
const reco::BeamSpotmodelData (int index)
 
- Protected Member Functions inherited from FWSimpleProxyBuilder
void build ()
 
virtual void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *)
 
void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 
virtual void buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *)
 
void buildViewType (const FWEventItem *iItem, TEveElementList *product, FWViewType::EType viewType, const FWViewContext *) override
 
void clean () override
 
- Protected Member Functions inherited from FWProxyBuilderBase
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 modelChanges (const FWModelIds &, Product *)
 
const FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
- Protected Attributes inherited from FWSimpleProxyBuilder
FWSimpleProxyHelper m_helper
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 15 of file FWBeamSpotProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWBeamSpotProxyBuilder() [1/2]

FWBeamSpotProxyBuilder::FWBeamSpotProxyBuilder ( void  )
inline

Definition at line 17 of file FWBeamSpotProxyBuilder.cc.

17 {}

◆ ~FWBeamSpotProxyBuilder()

FWBeamSpotProxyBuilder::~FWBeamSpotProxyBuilder ( void  )
inlineoverride

Definition at line 18 of file FWBeamSpotProxyBuilder.cc.

18 {}

◆ FWBeamSpotProxyBuilder() [2/2]

FWBeamSpotProxyBuilder::FWBeamSpotProxyBuilder ( const FWBeamSpotProxyBuilder )
delete

Member Function Documentation

◆ build()

void FWBeamSpotProxyBuilder::build ( const reco::BeamSpot iData,
unsigned int  iIndex,
TEveElement &  oItemHolder,
const FWViewContext  
)
overrideprivatevirtual

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< reco::BeamSpot >.

Definition at line 55 of file FWBeamSpotProxyBuilder.cc.

References a, b, cms::cuda::bs, FWEventItem::defaultDisplayProperties(), Calorimetry_cff::dp, MillePedeFileConverter_cfg::e, mps_fire::i, FWProxyBuilderBase::item(), eostools::ls(), N, Pi, and FWProxyBuilderBase::setupAddElement().

58  {
59  TEveStraightLineSet* ls = new TEveStraightLineSet();
60 
61  double pos[3] = {bs.x0(), bs.y0(), bs.z0()};
62  double e[3] = {bs.x0Error(), bs.y0Error(), bs.z0Error()};
63 
64  const Int_t N = 32;
65  const Float_t S = 2 * TMath::Pi() / N;
66 
67  Float_t a = e[0], b = e[1];
68  for (Int_t i = 0; i < N; i++)
69  ls->AddLine(
70  a * TMath::Cos(i * S), b * TMath::Sin(i * S), 0, a * TMath::Cos(i * S + S), b * TMath::Sin(i * S + S), 0);
71 
72  a = e[0];
73  b = e[2];
74  for (Int_t i = 0; i < N; i++)
75  ls->AddLine(
76  a * TMath::Cos(i * S), 0, b * TMath::Sin(i * S), a * TMath::Cos(i * S + S), 0, b * TMath::Sin(i * S + S));
77 
78  a = e[1];
79  b = e[2];
80  for (Int_t i = 0; i < N; i++)
81  ls->AddLine(
82  0, a * TMath::Cos(i * S), b * TMath::Sin(i * S), 0, a * TMath::Cos(i * S + S), b * TMath::Sin(i * S + S));
83 
84  ls->AddLine(0, 0, 0, 0, 0, 0);
85  ls->AddMarker(0, 0, 0);
86  ls->SetMarkerStyle(21);
88  ls->SetMarkerColor(dp.color());
89 
90  ls->RefMainTrans().SetPos(pos);
91  setupAddElement(ls, &oItemHolder);
92 }
const double Pi
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWDisplayProperties & defaultDisplayProperties() const
Definition: FWEventItem.cc:403
def ls(path, rec=False)
Definition: eostools.py:349
#define N
Definition: blowfish.cc:9
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
const FWEventItem * item() const

◆ classPurpose()

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

Definition at line 97 of file FWBeamSpotProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 97 of file FWBeamSpotProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 97 of file FWBeamSpotProxyBuilder.cc.

◆ classView()

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

Definition at line 97 of file FWBeamSpotProxyBuilder.cc.

◆ localModelChanges()

void FWBeamSpotProxyBuilder::localModelChanges ( const FWModelId iId,
TEveElement *  parent,
FWViewType::EType  viewType,
const FWViewContext vc 
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 37 of file FWBeamSpotProxyBuilder.cc.

References HltBtagPostValidation_cff::c, FWModelId::index(), FWProxyBuilderBase::item(), dqmiolumiharvest::j, eostools::ls(), FWEventItem::modelInfo(), and class-composition::parent.

40  {
41  if (TEveStraightLineSet* ls = dynamic_cast<TEveStraightLineSet*>(*parent->BeginChildren())) {
42  Color_t c = FWProxyBuilderBase::item()->modelInfo(iId.index()).displayProperties().color();
43  for (TEveProjectable::ProjList_i j = ls->BeginProjecteds(); j != ls->EndProjecteds(); ++j) {
44  if (TEveStraightLineSet* pls = dynamic_cast<TEveStraightLineSet*>(*j)) {
45  pls->SetMarkerColor(c);
46  pls->ElementChanged();
47  }
48  }
49 
50  ls->SetMarkerColor(c);
51  ls->ElementChanged();
52  }
53 }
int index() const
Definition: FWModelId.h:41
def ls(path, rec=False)
Definition: eostools.py:349
ModelInfo modelInfo(int iIndex) const
Definition: FWEventItem.cc:446
const FWEventItem * item() const

◆ operator=()

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

◆ purpose()

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

Definition at line 20 of file FWBeamSpotProxyBuilder.cc.

27 :
28  void localModelChanges(const FWModelId& iId,
void localModelChanges(const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override

◆ typeName()

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

Definition at line 20 of file FWBeamSpotProxyBuilder.cc.

27 :
28  void localModelChanges(const FWModelId& iId,
void localModelChanges(const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override

◆ view()

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

Definition at line 20 of file FWBeamSpotProxyBuilder.cc.

27 :
28  void localModelChanges(const FWModelId& iId,
void localModelChanges(const FWModelId &iId, TEveElement *parent, FWViewType::EType viewType, const FWViewContext *vc) override