CMS 3D CMS Logo

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 photonIsolationHIProducer_cfi::hf, and 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
FWPartialConfigGUI(const char *path, FWConfigurationManager *)
def load(fileName)
Definition: svgfig.py:546
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(), mps_fire::i, crabWrapper::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
const KeyValues * keyValues() const
FWEventItemsManager * m_eiMng
FWConfigurationManager * m_cfgMng
void subviewDestroyAll()
std::vector< TGCheckButton * > m_entries
void setFrom(const FWConfiguration &) const
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.