Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-03 04:09:59

0001 // -*- C++ -*-
0002 #ifndef Fireworks_Core_FWTriggerTableView_h
0003 #define Fireworks_Core_FWTriggerTableView_h
0004 //
0005 // Package:     Core
0006 // Class  :     FWTriggerTableView
0007 //
0008 
0009 // system include files
0010 #include "Rtypes.h"
0011 
0012 // user include files
0013 #include "Fireworks/Core/interface/FWViewBase.h"
0014 #include "Fireworks/Core/interface/FWStringParameter.h"
0015 
0016 // forward declarations
0017 class TGFrame;
0018 class TGCompositeFrame;
0019 class FWTableWidget;
0020 class TGComboBox;
0021 class TEveWindowFrame;
0022 class TEveWindowSlot;
0023 class FWTriggerTableViewManager;
0024 class FWTriggerTableViewTableManager;
0025 class FWJobMetadataManager;
0026 
0027 namespace fwlite {
0028   class Event;
0029 }
0030 
0031 class FWTriggerTableView : public FWViewBase {
0032   friend class FWTriggerTableViewTableManager;
0033 
0034 public:
0035   struct Column {
0036     std::string title;
0037     std::vector<std::string> values;
0038     Column(const std::string& s) : title(s) {}
0039   };
0040 
0041   FWTriggerTableView(TEveWindowSlot*, FWViewType::EType);
0042   ~FWTriggerTableView(void) override;
0043 
0044   // ---------- const member functions ---------------------
0045   void addTo(FWConfiguration&) const override;
0046   void saveImageTo(const std::string& iName) const override;
0047   Color_t backgroundColor() const { return m_backgroundColor; }
0048 
0049   // ---------- static member functions --------------------
0050 
0051   // ---------- member functions ---------------------------
0052   void setFrom(const FWConfiguration&) override;
0053   void setBackgroundColor(Color_t);
0054   //void resetColors( const class FWColorManager& );
0055   void dataChanged(void);
0056   void columnSelected(Int_t iCol, Int_t iButton, Int_t iKeyMod);
0057 
0058   void setProcessList(std::vector<std::string>* x) { m_processList = x; }
0059   void resetCombo() const;
0060   //  void processChanged(Int_t);
0061   void processChanged(const char*);
0062 
0063 protected:
0064   FWStringParameter m_regex;
0065   FWStringParameter m_process;
0066 
0067   std::vector<Column> m_columns;
0068   FWTriggerTableViewTableManager* m_tableManager;
0069 
0070   virtual void fillTable(fwlite::Event* event) = 0;
0071 
0072 public:
0073   FWTriggerTableView(const FWTriggerTableView&) = delete;                   // stop default
0074   const FWTriggerTableView& operator=(const FWTriggerTableView&) = delete;  // stop default
0075 
0076 private:
0077   bool isProcessValid() const;
0078   void populateController(ViewerParameterGUI&) const override;
0079 
0080   mutable TGComboBox* m_combo;
0081 
0082   // destruction
0083   TEveWindowFrame* m_eveWindow;
0084   TGCompositeFrame* m_vert;
0085 
0086   FWTableWidget* m_tableWidget;
0087 
0088   Color_t m_backgroundColor;
0089 
0090   std::vector<std::string>* m_processList;
0091 };
0092 
0093 #endif