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 () override
 
- Public Member Functions inherited from FWPartialConfigGUI
void Cancel ()
 
 FWPartialConfigGUI (const char *path, FWConfigurationManager *)
 
 ~FWPartialConfigGUI () override
 

Private Member Functions

 ClassDefOverride (FWPartialConfigLoadGUI, 0)
 

Private Attributes

FWEventItemsManagerm_eiMng
 
const char * m_oldConfigName
 

Additional Inherited Members

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

Detailed Description

Definition at line 27 of file FWPartialConfig.h.

Constructor & Destructor Documentation

◆ FWPartialConfigLoadGUI()

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

Definition at line 92 of file FWPartialConfig.cc.

95  : FWPartialConfigGUI(path, iCfg), m_eiMng(iEiMng) {
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 }

References photonIsolationHIProducer_cfi::hf, and svgfig::load().

◆ ~FWPartialConfigLoadGUI()

FWPartialConfigLoadGUI::~FWPartialConfigLoadGUI ( )
override

Definition at line 111 of file FWPartialConfig.cc.

111 {}

Member Function Documentation

◆ ClassDefOverride()

FWPartialConfigLoadGUI::ClassDefOverride ( FWPartialConfigLoadGUI  ,
 
)
private

◆ Load()

void FWPartialConfigLoadGUI::Load ( )

Definition at line 113 of file FWPartialConfig.cc.

113  {
114  bool resetViews = true;
115  bool resetEI = true;
116 
118 
119  for (auto i = m_entries.begin(); i != m_entries.end(); i++) {
120  if (!((*i)->IsOn())) {
121  std::string key = nmm.realName((*i)->GetText()->GetString());
122  if (key == "EventItems")
123  resetEI = false;
124  if (key == "GUI")
125  resetViews = false;
126 
127  for (FWConfiguration::KeyValues::iterator it = kv->begin(); it != kv->end(); ++it) {
128  if (key == it->first) {
129  kv->erase(it);
130  break;
131  }
132  }
133  }
134  }
135 
136  if (resetEI)
137  m_eiMng->clearItems();
138 
139  if (resetViews)
141 
142  gEve->DisableRedraw();
144  gEve->EnableRedraw();
145 
146  UnmapWindow();
147 }

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().

Member Data Documentation

◆ m_eiMng

FWEventItemsManager* FWPartialConfigLoadGUI::m_eiMng
private

Definition at line 35 of file FWPartialConfig.h.

Referenced by Load().

◆ m_oldConfigName

const char* FWPartialConfigLoadGUI::m_oldConfigName
private

Definition at line 36 of file FWPartialConfig.h.

FWPartialConfigGUI::m_cfgMng
FWConfigurationManager * m_cfgMng
Definition: FWPartialConfig.h:20
mps_fire.i
i
Definition: mps_fire.py:428
FWEventItemsManager::clearItems
void clearItems()
Definition: FWEventItemsManager.cc:117
FWConfiguration::KeyValues
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
Definition: FWConfiguration.h:40
FWGUIManager::subviewDestroyAll
void subviewDestroyAll()
Definition: FWGUIManager.cc:465
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
FWPartialConfigGUI::m_origConfig
FWConfiguration m_origConfig
Definition: FWPartialConfig.h:19
svgfig.load
def load(fileName)
Definition: svgfig.py:547
FWPartialConfigGUI::FWPartialConfigGUI
FWPartialConfigGUI(const char *path, FWConfigurationManager *)
Definition: FWPartialConfig.cc:46
FWPartialConfigLoadGUI::m_eiMng
FWEventItemsManager * m_eiMng
Definition: FWPartialConfig.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWGUIManager::getGUIManager
static FWGUIManager * getGUIManager()
Definition: FWGUIManager.cc:685
FWConfigurationManager::setFrom
void setFrom(const FWConfiguration &) const
Definition: FWConfigurationManager.cc:75
FWPartialConfigGUI::m_entries
std::vector< TGCheckButton * > m_entries
Definition: FWPartialConfig.h:18
FWConfiguration::keyValues
const KeyValues * keyValues() const
Definition: FWConfiguration.h:51
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
crabWrapper.key
key
Definition: crabWrapper.py:19