CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/Fireworks/Core/interface/FWTriggerTableView.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef Fireworks_Core_FWTriggerTableView_h
00003 #define Fireworks_Core_FWTriggerTableView_h
00004 //
00005 // Package:     Core
00006 // Class  :     FWTriggerTableView
00007 // $Id: FWTriggerTableView.h,v 1.9 2011/02/16 18:38:36 amraktad Exp $
00008 //
00009 
00010 // system include files
00011 #include "Rtypes.h"
00012 
00013 // user include files
00014 #include "Fireworks/Core/interface/FWViewBase.h"
00015 #include "Fireworks/Core/interface/FWStringParameter.h"
00016 
00017 
00018 #define BOOST_NO_INITIALIZER_LISTS
00019 // without this #define, genreflex chokes on std::initializer_list
00020 // at least when buildig from tarball in SLC5 with the default gcc4.1.2
00021 #include <boost/unordered_map.hpp>
00022 #undef BOOST_NO_INITIALIZER_LISTS
00023 
00024 // forward declarations
00025 class TGFrame;
00026 class TGCompositeFrame;
00027 class FWTableWidget;
00028 class TGComboBox;
00029 class TEveWindowFrame;
00030 class TEveWindowSlot;
00031 class FWTriggerTableViewManager;
00032 class FWTriggerTableViewTableManager;
00033 class FWJobMetadataManager;
00034 
00035 namespace fwlite {
00036    class Event;
00037 }
00038 
00039 class FWTriggerTableView : public FWViewBase 
00040 {
00041    friend class FWTriggerTableViewTableManager;
00042 public:
00043    struct Column {
00044       std::string title;
00045       std::vector<std::string> values;
00046       Column( const std::string& s ) : title( s )
00047       {}
00048    };
00049 
00050    FWTriggerTableView(TEveWindowSlot *, FWViewType::EType );
00051    virtual ~FWTriggerTableView( void );
00052 
00053    // ---------- const member functions ---------------------
00054    virtual void   addTo( FWConfiguration& ) const;
00055    virtual void   saveImageTo( const std::string& iName ) const;
00056    Color_t backgroundColor() const { return m_backgroundColor; }
00057 
00058    // ---------- static member functions --------------------
00059 
00060    // ---------- member functions ---------------------------
00061    virtual void setFrom( const FWConfiguration& );
00062    void setBackgroundColor( Color_t );
00063    //void resetColors( const class FWColorManager& );
00064    void dataChanged( void );
00065    void columnSelected( Int_t iCol, Int_t iButton, Int_t iKeyMod );
00066 
00067    void setProcessList( std::vector<std::string>* x) { m_processList = x; }
00068    void resetCombo() const;
00069    //  void processChanged(Int_t);
00070   void processChanged(const char*);
00071 protected:
00072    FWStringParameter               m_regex;
00073    FWStringParameter               m_process;
00074 
00075    std::vector<Column>             m_columns;
00076    FWTriggerTableViewTableManager* m_tableManager;
00077 
00078    virtual void fillTable(fwlite::Event* event) = 0;
00079 
00080 private:
00081    FWTriggerTableView( const FWTriggerTableView& );      // stop default
00082    const FWTriggerTableView& operator=( const FWTriggerTableView& );      // stop default
00083 
00084    bool isProcessValid()const;
00085    virtual void populateController(ViewerParameterGUI&) const;
00086 
00087    mutable TGComboBox*             m_combo;
00088 
00089    // destruction
00090    TEveWindowFrame*                m_eveWindow;
00091    TGCompositeFrame*               m_vert;
00092 
00093 
00094    FWTableWidget*                  m_tableWidget;
00095 
00096    Color_t                         m_backgroundColor;
00097 
00098    std::vector<std::string>*       m_processList;
00099 
00100 };
00101 
00102 
00103 #endif