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.

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 }

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

◆ ~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
FWPartialConfigGUI::m_cfgMng
FWConfigurationManager * m_cfgMng
Definition: FWPartialConfig.h:20
FWConfiguration::swap
void swap(FWConfiguration &)
Definition: FWConfiguration.cc:106
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
FWConfiguration::KeyValues
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
Definition: FWConfiguration.h:40
FWGUIManager::getMainFrame
CmsShowMainFrame * getMainFrame() const
Definition: FWGUIManager.h:197
FWXMLConfigParser
Definition: FWXMLConfigParser.h:32
FWPartialConfigGUI::m_origConfig
FWConfiguration m_origConfig
Definition: FWPartialConfig.h:19
FWConfigurationManager::to
void to(FWConfiguration &) const
Definition: FWConfigurationManager.cc:86
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FWGUIManager::getGUIManager
static FWGUIManager * getGUIManager()
Definition: FWGUIManager.cc:685
FWPartialConfigGUI::m_entries
std::vector< TGCheckButton * > m_entries
Definition: FWPartialConfig.h:18
FWConfiguration::keyValues
const KeyValues * keyValues() const
Definition: FWConfiguration.h:51
FWConfiguration
Definition: FWConfiguration.h:31
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
g
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