CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/Fireworks/Core/interface/CmsShowCommon.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_CmsShowCommon_h
00002 #define Fireworks_Core_CmsShowCommon_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     CmsShowCommon
00007 // 
00016 //
00017 // Original Author:  Alja Mrak-Tadel
00018 //         Created:  Fri Sep 10 14:51:07 CEST 2010
00019 // $Id: CmsShowCommon.h,v 1.11 2011/03/08 09:36:04 amraktad Exp $
00020 //
00021 
00022 #include <sigc++/signal.h>
00023 #include <sigc++/sigc++.h>
00024 
00025 #include "Rtypes.h"
00026 
00027 #include "Fireworks/Core/interface/FWConfigurableParameterizable.h"
00028 #include "Fireworks/Core/interface/FWBoolParameter.h"
00029 #include "Fireworks/Core/interface/FWLongParameter.h"
00030 #include "Fireworks/Core/interface/FWEnumParameter.h"
00031 #include "Fireworks/Core/interface/FWColorManager.h"
00032 #include "Fireworks/Core/interface/FWViewEnergyScale.h"
00033 
00034 class CmsShowCommonPopup;
00035 class FWColorManager;
00036 namespace fireworks
00037 {
00038 class Context;
00039 }
00040 
00041 class CmsShowCommon : public FWConfigurableParameterizable
00042 {
00043    friend class CmsShowCommonPopup;
00044 
00045 public:
00046    CmsShowCommon(fireworks::Context*);
00047    virtual ~CmsShowCommon();
00048 
00049    // ---------- const member functions ---------------------
00050    virtual void addTo(FWConfiguration&) const;
00051 
00052    // ---------- static member functions --------------------
00053 
00054    // ---------- member functions ---------------------------
00055    virtual void setFrom(const FWConfiguration&);
00056 
00057    void setTrackBreakMode();
00058    void setDrawBreakMarkers();
00059 
00060    int  gamma() { return m_gamma.value(); }
00061    void setGamma();
00062    void switchBackground();
00063 
00064    void setGeomColor(FWGeomColorIndex, Color_t);
00065    void setGeomTransparency(int val, bool projected);
00066 
00067    FWViewEnergyScale* getEnergyScale() const { return m_energyScale.get(); }
00068 
00069    
00070    UChar_t getProjTrackBreaking() const { return m_trackBreak.value(); }
00071    bool    getRnrPTBMarkers() const { return m_drawBreakPoints.value(); }
00072 
00073 protected:
00074    const FWColorManager*   colorManager() const;
00075 
00076    // ---------- member data --------------------------------
00077 
00078  
00079    fireworks::Context*        m_context;
00080 
00081    FWEnumParameter            m_trackBreak;
00082    FWBoolParameter            m_drawBreakPoints;
00083 
00084    // general colors
00085    mutable FWLongParameter   m_backgroundColor; // can be set via Ctr+b key binding
00086    FWLongParameter           m_gamma;
00087 
00088    // geom colors
00089    FWLongParameter     m_geomTransparency2D;
00090    FWLongParameter     m_geomTransparency3D;
00091    FWLongParameter*    m_geomColors[kFWGeomColorSize];
00092 
00093  
00094    std::auto_ptr<FWViewEnergyScale>  m_energyScale;
00095 
00096 private:
00097    CmsShowCommon(const CmsShowCommon&); // stop default
00098    const CmsShowCommon& operator=(const CmsShowCommon&); // stop default
00099 };
00100 
00101 
00102 #endif