CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWPartialConfigLoadGUI Class Reference

#include <FWPartialConfig.h>

Inheritance diagram for FWPartialConfigLoadGUI:
FWPartialConfigGUI

Public Member Functions

 FWPartialConfigLoadGUI (const char *path, FWConfigurationManager *, FWEventItemsManager *)
 
void Load ()
 
 ~FWPartialConfigLoadGUI ()
 
- Public Member Functions inherited from FWPartialConfigGUI
void Cancel ()
 
 FWPartialConfigGUI (const char *path, FWConfigurationManager *)
 
 ~FWPartialConfigGUI ()
 

Private Member Functions

 ClassDef (FWPartialConfigLoadGUI, 0)
 

Private Attributes

FWEventItemsManagerm_eiMng
 
const char * m_oldConfigName
 

Additional Inherited Members

- Protected Member Functions inherited from FWPartialConfigGUI
 ClassDef (FWPartialConfigGUI, 0)
 
- Protected Attributes inherited from FWPartialConfigGUI
FWConfigurationManagerm_cfgMng
 
std::vector< TGCheckButton * > m_entries
 
FWConfiguration m_origConfig
 

Detailed Description

Definition at line 28 of file FWPartialConfig.h.

Constructor & Destructor Documentation

FWPartialConfigLoadGUI::FWPartialConfigLoadGUI ( const char *  path,
FWConfigurationManager iCfg,
FWEventItemsManager iEiMng 
)

Definition at line 93 of file FWPartialConfig.cc.

References svgfig::load().

93  :
94  FWPartialConfigGUI(path, iCfg), m_eiMng(iEiMng)
95 {
96  TGHorizontalFrame* hf = new TGHorizontalFrame(this);
97  AddFrame(hf, new TGLayoutHints( kLHintsRight| kLHintsBottom, 1, 1, 2, 4));
98  TGTextButton* load = new TGTextButton(hf, " Load ");
99  load->Connect("Clicked()", "FWPartialConfigLoadGUI", this, "Load()");
100  hf->AddFrame(load, new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
101  TGTextButton* cancel = new TGTextButton(hf, " Cancel ");
102  cancel->Connect("Clicked()", "FWPartialConfigGUI", this, "Cancel()");
103  hf->AddFrame(cancel, new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0));
104 
105  SetWindowName("Load Config");
106  MapSubwindows();
107  Layout();
108  MapWindow();
109 }
FWEventItemsManager * m_eiMng
def load
Definition: svgfig.py:546
FWPartialConfigGUI(const char *path, FWConfigurationManager *)
FWPartialConfigLoadGUI::~FWPartialConfigLoadGUI ( )

Definition at line 111 of file FWPartialConfig.cc.

112 {
113 }

Member Function Documentation

FWPartialConfigLoadGUI::ClassDef ( FWPartialConfigLoadGUI  ,
 
)
private
void FWPartialConfigLoadGUI::Load ( )

Definition at line 115 of file FWPartialConfig.cc.

References FWEventItemsManager::clearItems(), FWGUIManager::getGUIManager(), i, relval_steps::key, FWConfiguration::keyValues(), FWPartialConfigGUI::m_cfgMng, m_eiMng, FWPartialConfigGUI::m_entries, FWPartialConfigGUI::m_origConfig, FWConfigurationManager::setFrom(), AlCaHLTBitMon_QueryRunRegistry::string, and FWGUIManager::subviewDestroyAll().

116 {
117  bool resetViews = true;
118  bool resetEI = true;
119 
121 
122  for (auto i = m_entries.begin(); i != m_entries.end(); i++) {
123  if (!((*i)->IsOn())) {
124  std::string key = nmm.realName((*i)->GetText()->GetString());
125  if (key == "EventItems") resetEI = false;
126  if (key == "GUI") resetViews = false;
127 
128  for(FWConfiguration::KeyValues::iterator it = kv->begin(); it != kv->end(); ++it)
129  {
130  if ( key.compare(it->first) == 0) {
131  kv->erase(it);
132  break;
133  }
134  }
135  }
136  }
137 
138  if (resetEI)
139  m_eiMng->clearItems();
140 
141  if (resetViews)
143 
144  gEve->DisableRedraw();
146  gEve->EnableRedraw();
147 
148  UnmapWindow();
149 }
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
int i
Definition: DBlmapReader.cc:9
const KeyValues * keyValues() const
FWEventItemsManager * m_eiMng
FWConfigurationManager * m_cfgMng
void subviewDestroyAll()
std::vector< TGCheckButton * > m_entries
void setFrom(const FWConfiguration &) const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
static FWGUIManager * getGUIManager()
FWConfiguration m_origConfig

Member Data Documentation

FWEventItemsManager* FWPartialConfigLoadGUI::m_eiMng
private

Definition at line 37 of file FWPartialConfig.h.

Referenced by Load().

const char* FWPartialConfigLoadGUI::m_oldConfigName
private

Definition at line 38 of file FWPartialConfig.h.