Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:30

0001 #ifndef Fireworks_Core_FWDigitSetProxyBuilder_h
0002 #define Fireworks_Core_FWDigitSetProxyBuilder_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Core
0006 // Class  :     FWDigitSetProxyBuilder
0007 //
0008 /**\class FWDigitSetProxyBuilder FWDigitSetProxyBuilder.h Fireworks/Core/interface/FWDigitSetProxyBuilder.h
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Alja Mrak-Tadel
0018 //         Created:  Tue Oct 19 12:00:57 CEST 2010
0019 //
0020 
0021 // system include files
0022 
0023 // user include files
0024 #include "Fireworks/Core/interface/FWProxyBuilderBase.h"
0025 
0026 // forward declarations
0027 class TEveDigitSet;
0028 class TEveBoxSet;
0029 class FWDisplayProperties;
0030 
0031 class FWDigitSetProxyBuilder : public FWProxyBuilderBase {
0032 public:
0033   FWDigitSetProxyBuilder();
0034   ~FWDigitSetProxyBuilder() override;
0035 
0036   // ---------- const member functions ---------------------
0037 
0038   bool willHandleInteraction() const override { return true; }
0039 
0040   // ---------- static member functions --------------------
0041 
0042   // ---------- member functions ---------------------------
0043 
0044   FWDigitSetProxyBuilder(const FWDigitSetProxyBuilder&) = delete;  // stop default
0045 
0046   const FWDigitSetProxyBuilder& operator=(const FWDigitSetProxyBuilder&) = delete;  // stop default
0047 
0048 protected:
0049   // AMT: temproary structure since TEveBoxSet::BFreeBox_t is protected
0050   // this workaround should be  removed in next root patch
0051   struct BFreeBox_t {
0052     Int_t fValue;
0053     void* fUserData;
0054     Float_t fVertices[8][3];
0055     BFreeBox_t(Int_t v = 0) : fValue(v), fUserData(nullptr) {}
0056   };
0057 
0058   TEveBoxSet* addBoxSetToProduct(TEveElementList* product);
0059   void addBox(TEveBoxSet* set, const float* pnts, const FWDisplayProperties& dp);
0060   TEveBoxSet* getBoxSet() const { return m_boxSet; }
0061 
0062 private:
0063   // ---------- member data --------------------------------
0064 
0065   void modelChanges(const FWModelIds&, Product*) override;
0066 
0067   static TString getTooltip(TEveDigitSet* set, int idx);
0068 
0069   TEveDigitSet* digitSet(TEveElement* product);
0070 
0071   TEveBoxSet* m_boxSet;
0072 };
0073 
0074 #endif