CMS 3D CMS Logo

List of all members | Public Member Functions
FWPSetCellEditor Class Reference

#include <Fireworks/FWInterface/interface/FWPSetCellEditor.h>

Inheritance diagram for FWPSetCellEditor:

Public Member Functions

bool apply (FWPSetTableManager::PSetData &data, FWPSetTableManager::PSetData &parent)
 
 FWPSetCellEditor (const TGWindow *w, const char *txt)
 
bool HandleKey (Event_t *event) override
 
 ~FWPSetCellEditor () override
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 24 of file FWPSetCellEditor.h.

Constructor & Destructor Documentation

◆ FWPSetCellEditor()

FWPSetCellEditor::FWPSetCellEditor ( const TGWindow *  w,
const char *  txt 
)
inline

Definition at line 26 of file FWPSetCellEditor.h.

26 : TGTextEntry(w, txt){};

◆ ~FWPSetCellEditor()

FWPSetCellEditor::~FWPSetCellEditor ( )
inlineoverride

Definition at line 27 of file FWPSetCellEditor.h.

27 {};

Member Function Documentation

◆ apply()

bool FWPSetCellEditor::apply ( FWPSetTableManager::PSetData data,
FWPSetTableManager::PSetData parent 
)

Definition at line 219 of file FWPSetCellEditor.cc.

219  {
220  switch (data.type) {
221  case 'I':
222  editNumericParameter<int32_t>(*parent.pset, data.tracked, data.label, GetText());
223  break;
224  case 'B':
225  editBoolParameter(*parent.pset, data.tracked, data.label, GetText());
226  break;
227  case 'U':
228  editNumericParameter<uint32_t>(*parent.pset, data.tracked, data.label, GetText());
229  break;
230  case 'D':
231  editNumericParameter<double>(*parent.pset, data.tracked, data.label, GetText());
232  break;
233  case 'L':
234  editNumericParameter<long long>(*parent.pset, data.tracked, data.label, GetText());
235  break;
236  case 'X':
237  editNumericParameter<unsigned long long>(*parent.pset, data.tracked, data.label, GetText());
238  break;
239  case 'S':
240  editStringParameter(*parent.pset, data.tracked, data.label, GetText());
241  break;
242  case 'i':
243  editVectorParameter<int32_t>(*parent.pset, data.tracked, data.label, GetText());
244  break;
245  case 'u':
246  editVectorParameter<uint32_t>(*parent.pset, data.tracked, data.label, GetText());
247  break;
248  case 'l':
249  editVectorParameter<long long>(*parent.pset, data.tracked, data.label, GetText());
250  break;
251  case 'x':
252  editVectorParameter<unsigned long long>(*parent.pset, data.tracked, data.label, GetText());
253  break;
254  case 'd':
255  editVectorParameter<double>(*parent.pset, data.tracked, data.label, GetText());
256  break;
257  case 's':
258  editVectorParameter<std::string>(*parent.pset, data.tracked, data.label, GetText());
259  break;
260  case 't':
261  editInputTag(*parent.pset, data.tracked, data.label, GetText());
262  break;
263  case 'g':
264  editESInputTag(*parent.pset, data.tracked, data.label, GetText());
265  break;
266  case 'v':
267  editVInputTag(*parent.pset, data.tracked, data.label, GetText());
268  break;
269  case 'F':
270  editFileInPath(*parent.pset, data.tracked, data.label, GetText());
271  break;
272  default:
273  fwLog(fwlog::kError) << "unsupported parameter" << std::endl;
274  UnmapWindow();
275  return false;
276  }
277  return true;
278 }

References data, editBoolParameter(), editESInputTag(), editFileInPath(), editInputTag(), editStringParameter(), editVInputTag(), fwLog, fwlog::kError, and class-composition::parent.

Referenced by heavyIonTools.ConfigureHeavyIons::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), heavyIonTools.ProductionDefaults::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties::__call__(), heavyIonTools.SelectionDefaults::__call__(), heavyIonTools.DisbaleMonteCarloDeps::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), tauTools.AddTauCollection::__call__(), trackTools.MakeTrackCandidates::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.AddJetCollection::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.UpdateJetCollection::__call__(), jetTools.AddJetID::__call__(), jetTools.SetTagInfos::__call__(), and FWPSetTableManager::applyEditor().

◆ HandleKey()

bool FWPSetCellEditor::HandleKey ( Event_t *  event)
override

Definition at line 282 of file FWPSetCellEditor.cc.

282  {
283  UInt_t keysym = event->fCode;
284 
285  if (keysym == (UInt_t)gVirtualX->KeysymToKeycode(kKey_Escape)) {
286  TGFrame *p = dynamic_cast<TGFrame *>(const_cast<TGWindow *>(GetParent()));
287  while (p) {
288  TGMainFrame *mp = dynamic_cast<TGMainFrame *>(p);
289  // printf("editor find parent %p, %s, %p\n", p, p->ClassName(), mp);
290  if (mp) {
291  return mp->HandleKey(event);
292  }
293  p = dynamic_cast<TGFrame *>(const_cast<TGWindow *>(p->GetParent()));
294  }
295  }
296 
297  return TGTextEntry::HandleKey(event);
298 }

References AlCaHLTBitMon_ParallelJobs::p.

fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
editInputTag
bool editInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:124
editFileInPath
void editFileInPath(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:67
editBoolParameter
void editBoolParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:49
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
editStringParameter
void editStringParameter(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:40
w
const double w
Definition: UKUtility.cc:23
editVInputTag
bool editVInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:76
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
fwlog::kError
Definition: fwLog.h:35
event
Definition: event.py:1
class-composition.parent
parent
Definition: class-composition.py:88
editESInputTag
bool editESInputTag(edm::ParameterSet &ps, bool tracked, const std::string &label, const std::string &value)
Definition: FWPSetCellEditor.cc:157