Column

FWTriggerTableView

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
// -*- C++ -*-
#ifndef Fireworks_Core_FWTriggerTableView_h
#define Fireworks_Core_FWTriggerTableView_h
//
// Package:     Core
// Class  :     FWTriggerTableView
//

// system include files
#include "Rtypes.h"

// user include files
#include "Fireworks/Core/interface/FWViewBase.h"
#include "Fireworks/Core/interface/FWStringParameter.h"

// forward declarations
class TGFrame;
class TGCompositeFrame;
class FWTableWidget;
class TGComboBox;
class TEveWindowFrame;
class TEveWindowSlot;
class FWTriggerTableViewManager;
class FWTriggerTableViewTableManager;
class FWJobMetadataManager;

namespace fwlite {
  class Event;
}

class FWTriggerTableView : public FWViewBase {
  friend class FWTriggerTableViewTableManager;

public:
  struct Column {
    std::string title;
    std::vector<std::string> values;
    Column(const std::string& s) : title(s) {}
  };

  FWTriggerTableView(TEveWindowSlot*, FWViewType::EType);
  ~FWTriggerTableView(void) override;

  // ---------- const member functions ---------------------
  void addTo(FWConfiguration&) const override;
  void saveImageTo(const std::string& iName) const override;
  Color_t backgroundColor() const { return m_backgroundColor; }

  // ---------- static member functions --------------------

  // ---------- member functions ---------------------------
  void setFrom(const FWConfiguration&) override;
  void setBackgroundColor(Color_t);
  //void resetColors( const class FWColorManager& );
  void dataChanged(void);
  void columnSelected(Int_t iCol, Int_t iButton, Int_t iKeyMod);

  void setProcessList(std::vector<std::string>* x) { m_processList = x; }
  void resetCombo() const;
  //  void processChanged(Int_t);
  void processChanged(const char*);

protected:
  FWStringParameter m_regex;
  FWStringParameter m_process;

  std::vector<Column> m_columns;
  FWTriggerTableViewTableManager* m_tableManager;

  virtual void fillTable(fwlite::Event* event) = 0;

public:
  FWTriggerTableView(const FWTriggerTableView&) = delete;                   // stop default
  const FWTriggerTableView& operator=(const FWTriggerTableView&) = delete;  // stop default

private:
  bool isProcessValid() const;
  void populateController(ViewerParameterGUI&) const override;

  mutable TGComboBox* m_combo;

  // destruction
  TEveWindowFrame* m_eveWindow;
  TGCompositeFrame* m_vert;

  FWTableWidget* m_tableWidget;

  Color_t m_backgroundColor;

  std::vector<std::string>* m_processList;
};

#endif