CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
FWPartialConfigGUI Class Reference

#include <FWPartialConfig.h>

Inheritance diagram for FWPartialConfigGUI:
FWPartialConfigLoadGUI FWPartialConfigSaveGUI

Public Member Functions

void Cancel ()
 
 FWPartialConfigGUI (const char *path, FWConfigurationManager *)
 
 ~FWPartialConfigGUI () override
 

Protected Member Functions

 ClassDefOverride (FWPartialConfigGUI, 0)
 

Protected Attributes

FWConfigurationManagerm_cfgMng
 
std::vector< TGCheckButton * > m_entries
 
FWConfiguration m_origConfig
 

Detailed Description

Definition at line 11 of file FWPartialConfig.h.

Constructor & Destructor Documentation

◆ FWPartialConfigGUI()

FWPartialConfigGUI::FWPartialConfigGUI ( const char *  path,
FWConfigurationManager iCfg 
)

Definition at line 46 of file FWPartialConfig.cc.

References g, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, FWConfiguration::keyValues(), m_cfgMng, m_entries, m_origConfig, writedatasetfile::parser, castor_dqm_sourceclient_file_cfg::path, jetUpdater_cfi::sort, AlCaHLTBitMon_QueryRunRegistry::string, FWConfiguration::swap(), and FWConfigurationManager::to().

47  : TGTransientFrame(gClient->GetRoot(), FWGUIManager::getGUIManager()->getMainFrame(), 200, 140), m_cfgMng(iCfg) {
48  if (path) {
49  std::ifstream g(path);
51  parser.parse();
52  parser.config()->swap(m_origConfig);
53  } else {
54  FWConfiguration curr;
55  m_cfgMng->to(curr);
56  curr.swap(m_origConfig);
57  }
58 
59  TGVerticalFrame* vf = new TGVerticalFrame(this);
60  AddFrame(vf, new TGLayoutHints(kLHintsNormal, 2, 2, 4, 4));
61 
62  // can do a cast to non-const since we own the configuration
64  std::sort(kv->begin(),
65  kv->end(),
66  [](const std::pair<std::string, FWConfiguration>& lhs, const std::pair<std::string, FWConfiguration>& rhs)
67  -> bool { return nmm.btnName(lhs.first) < nmm.btnName(rhs.first); });
68 
69  for (FWConfiguration::KeyValues::const_iterator it = m_origConfig.keyValues()->begin();
70  it != m_origConfig.keyValues()->end();
71  ++it) {
72  if (it->second.keyValues()) {
73  std::string nb = nmm.btnName(it->first);
74  TGCheckButton* cb = new TGCheckButton(vf, nb.c_str());
75  vf->AddFrame(cb);
76 
77  m_entries.push_back(cb);
78  }
79  }
80 }
void to(FWConfiguration &) const
FWConfigurationManager * m_cfgMng
std::vector< TGCheckButton * > m_entries
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:197
void swap(FWConfiguration &)
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
static FWGUIManager * getGUIManager()
FWConfiguration m_origConfig
const KeyValues * keyValues() const

◆ ~FWPartialConfigGUI()

FWPartialConfigGUI::~FWPartialConfigGUI ( )
inlineoverride

Definition at line 14 of file FWPartialConfig.h.

14 {}

Member Function Documentation

◆ Cancel()

void FWPartialConfigGUI::Cancel ( )

Definition at line 82 of file FWPartialConfig.cc.

82  {
83  // AMT Is this eniugh. Should there be a destroy ?
84  UnmapWindow();
85 }

◆ ClassDefOverride()

FWPartialConfigGUI::ClassDefOverride ( FWPartialConfigGUI  ,
 
)
protected

Member Data Documentation

◆ m_cfgMng

FWConfigurationManager* FWPartialConfigGUI::m_cfgMng
protected

◆ m_entries

std::vector<TGCheckButton*> FWPartialConfigGUI::m_entries
protected

◆ m_origConfig

FWConfiguration FWPartialConfigGUI::m_origConfig
protected