Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
dbutils::gui::DCSConfigEditorDisplay Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/DatabaseUtils/cxx/include/GUI/DCSConfigEditorDisplay.h"

Inheritance diagram for dbutils::gui::DCSConfigEditorDisplay:
dbutils::gui::BasicEditorDisplay

Public Slots

void generateRecipeScripts ()
 
void loadHVAndTemps ()
 
void reloadCurrentDataset ()
 
void loadNewDataset ()
 
void saveChanges ()
 
void saveChangesWithNewName ()
 
void showHelpDialog ()
 
virtual void reactToDataChange ()
 
virtual void reactToDataSave ()
 

Public Member Functions

 DCSConfigEditorDisplay (QWidget *parent=0)
 
bool hasChanges () const
 

Protected Member Functions

bool _doReloadCurrentDataset (const dbutils::daqconfig::IDSpec &idSpec)
 
bool _doLoadNewDataset (const dbutils::daqconfig::IDSpec &idSpec)
 
bool _doSaveChanges (const dbutils::daqconfig::IDSpec &oldIdSpec, const dbutils::daqconfig::IDSpec &newIdSpec, const dbutils::daqconfig::GlobalNameSpec &newNameSpec)
 
virtual void closeEvent (QCloseEvent *event)
 
bool _confirmSave ()
 
bool _getUserResponseToGlobalCopyFailure (const novadaq::Status &status)
 
void _addHelpMenu (std::string customText="")
 

Protected Attributes

QAction * _saveAction
 
QAction * _saveAsAction
 
SettingsDisplay_settingsDisplay
 
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec_globalNameSpecPtr
 
int64_t _currentGlobalConfigId
 

Private Attributes

TabbedSetOfTreeEditors_editorSet
 
std::string _pvScriptOutputDir
 

Detailed Description

Class for displaying the tabs that make up the graphical configuration editor.

Author
Kurt Biery
Version
Revision
1.15.14.1
Date
2019/09/27 00:07:04

Definition at line 21 of file DCSConfigEditorDisplay.h.

Constructor & Destructor Documentation

dbutils::gui::DCSConfigEditorDisplay::DCSConfigEditorDisplay ( QWidget *  parent = 0)

Definition at line 28 of file DCSConfigEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_addHelpMenu(), dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, _editorSet, dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, _pvScriptOutputDir, dbutils::gui::BasicEditorDisplay::_settingsDisplay, om::cerr, g4zmq::connect(), allTimeWatchdog::endl, generateRecipeScripts(), novadaq::EnvVarCache::getEnvVar(), novadaq::EnvVarCache::getInstance(), dbutils::gui::TabbedSetOfTreeEditors::isTopLevel(), dbutils::gui::TabbedSetOfTreeEditors::loadData(), loadHVAndTemps(), dbutils::gui::BasicEditorDisplay::reactToDataChange(), dbutils::gui::BasicEditorDisplay::reactToDataSave(), string, make_root_from_grid_output::tr, and dbutils::gui::SettingsDisplay::updateNamedConfiguration().

29 {
30  std::string detectorString =
31  novadaq::EnvVarCache::getInstance().getEnvVar("NOVADAQ_ENVIRONMENT");
32  if (detectorString.length() == 0) {
33  detectorString = "NOVADAQ_ENVIRONMENT_EnvVar_NeedsToBeSet";
34  }
35 
36  _pvScriptOutputDir = "/nova/config/" + detectorString + "/DCS";
37 
38  // (hopefully) temporary menu option to call the script that
39  // converts the DB entries into PV settings
40  QMenu* actionMenu = menuBar()->addMenu(tr("&Action"));
41  QAction* genScriptAction =
42  actionMenu->addAction(tr("&Generate Recipe Scripts"));
43  QObject::connect(genScriptAction, SIGNAL(triggered()),
44  this, SLOT(generateRecipeScripts()));
45 
46  QAction* loadHVAndTempsAction =
47  actionMenu->addAction(tr("&Load HV and Temperatures"));
48  QObject::connect(loadHVAndTempsAction, SIGNAL(triggered()),
49  this, SLOT(loadHVAndTemps()));
50 
51  _addHelpMenu();
52 
53  std::vector<std::string> tableDefinitions;
54  tableDefinitions +=
55  "NovaDatabase/tables/DCS/DCSFEBEnableMasks.xml",
56  "NovaDatabase/tables/DCS/APDTemperatureSettings.xml",
57  "NovaDatabase/tables/DCS/APDHighVoltages.xml",
58  "NovaDatabase/tables/DCS/FEBDryAirChannels.xml",
59  "NovaDatabase/tables/DCS/EPICSAlarmThresholds.xml";
60 
62  reset(new GlobalNameSpec("ColdDetectorSettings", "DCS",
63  detectorString));
64  _globalNameSpecPtr->isSlowControlsConfiguration(true);
66  if (! NamedConfigUtils::getGlobalConfigId((*_globalNameSpecPtr),
68  std::cerr << "Error fetching globalConfigId." << std::endl;
69  }
70  IDSpec idSpec(_currentGlobalConfigId, IDSpec::GLOBAL,
71  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
72  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
73 
74  _editorSet = new TabbedSetOfTreeEditors("APDHardware", "slowcontrols",
75  tableDefinitions,this);
76  _editorSet->isTopLevel(true);
77  _editorSet->loadData(idSpec);
78  connect(_editorSet, SIGNAL(aChangeWasMade()),
79  this, SLOT(reactToDataChange()));
80  connect(_editorSet, SIGNAL(dataWasSaved()),
81  this, SLOT(reactToDataSave()));
82 
83  _settingsDisplay = new SettingsDisplay();
85 
86  QVBoxLayout* thisDisplayLayout = new QVBoxLayout;
87  thisDisplayLayout->addWidget(_editorSet);
88  thisDisplayLayout->addWidget(_settingsDisplay);
89  QWidget* tmpWidget = new QWidget();
90  tmpWidget->setContentsMargins(0,5,0,0);
91  tmpWidget->setLayout(thisDisplayLayout);
92 
93  setCentralWidget(tmpWidget);
94 }
static EnvVarCache & getInstance()
Definition: EnvVarCache.cpp:12
OStream cerr
Definition: OStream.cxx:7
void updateNamedConfiguration(const dbutils::daqconfig::GlobalNameSpec &nameSpec)
void _addHelpMenu(std::string customText="")
def connect(endpoint="tcp://127.0.0.1:5555")
Definition: g4zmq.py:15
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
bool loadData(const dbutils::daqconfig::IDSpec &idSpec)
std::string getEnvVar(std::string name)
Definition: EnvVarCache.cpp:33
enum BeamMode string

Member Function Documentation

void dbutils::gui::BasicEditorDisplay::_addHelpMenu ( std::string  customText = "")
protectedinherited

Definition at line 512 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_customHelpText, g4zmq::connect(), dbutils::gui::BasicEditorDisplay::showHelpDialog(), and make_root_from_grid_output::tr.

Referenced by dbutils::gui::DAQConfigEditorDisplay::DAQConfigEditorDisplay(), and DCSConfigEditorDisplay().

513 {
514  _customHelpText = customText;
515 
516  QMenu* helpMenu = menuBar()->addMenu(tr("&Help"));
517  QAction* helpAction =
518  helpMenu->addAction(tr("&Help"));
519  QObject::connect(helpAction, SIGNAL(triggered()),
520  this, SLOT(showHelpDialog()));
521 }
def connect(endpoint="tcp://127.0.0.1:5555")
Definition: g4zmq.py:15
bool dbutils::gui::BasicEditorDisplay::_confirmSave ( )
protectedinherited

Definition at line 416 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_getUserResponseToGlobalCopyFailure(), novadaq::EnvVarCache::getEnvVar(), novadaq::EnvVarCache::getInstance(), dbutils::gui::BasicEditorDisplay::hasChanges(), runNovaSAM::retCode, and string.

Referenced by dbutils::gui::BasicEditorDisplay::saveChanges(), dbutils::gui::BasicEditorDisplay::saveChangesWithNewName(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

417 {
418  if (! hasChanges()) {return false;}
419 
420  std::string dbString =
422  QMessageBox confirmBox(this);
423 
424  std::string msgText = "You are about to update the \"";
425  msgText.append(dbString);
426  msgText.append("\" database.");
427  confirmBox.setText(msgText.c_str());
428 
429  msgText = "Are you sure that you want to save your changes to the \"";
430  msgText.append(dbString);
431  msgText.append("\" database?");
432  confirmBox.setInformativeText(msgText.c_str());
433 
434  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
435  confirmBox.setDefaultButton(QMessageBox::No);
436  int retCode = confirmBox.exec();
437 
438  return (retCode == QMessageBox::Yes);
439 }
static EnvVarCache & getInstance()
Definition: EnvVarCache.cpp:12
virtual bool hasChanges() const =0
std::string getEnvVar(std::string name)
Definition: EnvVarCache.cpp:33
enum BeamMode string
bool dbutils::gui::DCSConfigEditorDisplay::_doLoadNewDataset ( const dbutils::daqconfig::IDSpec idSpec)
protectedvirtual

Implements dbutils::gui::BasicEditorDisplay.

Definition at line 220 of file DCSConfigEditorDisplay.cpp.

References _doSaveChanges(), _editorSet, and dbutils::gui::TabbedSetOfTreeEditors::loadData().

Referenced by _doReloadCurrentDataset().

221 {
222  return _editorSet->loadData(idSpec);
223 }
bool loadData(const dbutils::daqconfig::IDSpec &idSpec)
bool dbutils::gui::DCSConfigEditorDisplay::_doReloadCurrentDataset ( const dbutils::daqconfig::IDSpec idSpec)
protectedvirtual

Implements dbutils::gui::BasicEditorDisplay.

Definition at line 214 of file DCSConfigEditorDisplay.cpp.

References _doLoadNewDataset(), _editorSet, and dbutils::gui::TabbedSetOfTreeEditors::loadData().

Referenced by generateRecipeScripts().

215 {
216  return _editorSet->loadData(idSpec);
217 }
bool loadData(const dbutils::daqconfig::IDSpec &idSpec)
bool dbutils::gui::DCSConfigEditorDisplay::_doSaveChanges ( const dbutils::daqconfig::IDSpec oldIdSpec,
const dbutils::daqconfig::IDSpec newIdSpec,
const dbutils::daqconfig::GlobalNameSpec newNameSpec 
)
protectedvirtual

Implements dbutils::gui::BasicEditorDisplay.

Definition at line 226 of file DCSConfigEditorDisplay.cpp.

References _editorSet, and dbutils::gui::TabbedSetOfTreeEditors::saveChanges().

Referenced by _doLoadNewDataset().

229 {
230  return _editorSet->saveChanges(oldIdSpec, newIdSpec, newNameSpec);
231 }
bool saveChanges(const dbutils::daqconfig::IDSpec &oldGlobalIdSpec, const dbutils::daqconfig::IDSpec &newGlobalIdSpec, const dbutils::daqconfig::GlobalNameSpec &newGlobalNameSpec)
bool dbutils::gui::BasicEditorDisplay::_getUserResponseToGlobalCopyFailure ( const novadaq::Status status)
protectedinherited

Definition at line 442 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, om::cerr, novadaq::Status::code, allTimeWatchdog::endl, novadaq::Status::message, runNovaSAM::retCode, and string.

Referenced by dbutils::gui::BasicEditorDisplay::_confirmSave(), dbutils::gui::BasicEditorDisplay::saveChanges(), dbutils::gui::BasicEditorDisplay::saveChangesWithNewName(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

443 {
444  if (statusObj.code ==
445  NamedConfigUtils::COPY_FOUND_UPDATE_IN_PROGRESS) {
446  std::string msgText = "A problem was found when saving changes to ";
447  msgText.append("the database.<br/><br/>");
448  msgText.append("The creation of a configuration with the same ");
449  msgText.append("name and DCM operating mode is currently in ");
450  msgText.append("progress. (Attempting to copy global ");
451  msgText.append("configuration with ID ");
452  msgText.append(boost::lexical_cast<std::string>
454  msgText.append(".)");
455  msgText.append("<ul><li>Detailed message: \"");
456  msgText.append(statusObj.message);
457  msgText.append("\"</li></ul>");
458  msgText.append("Please try again in a few minutes, or if ");
459  msgText.append("this problem persists, use the ");
460  msgText.append("<a href=\"https://cdcvs.fnal.gov/redmine/projects/novadaq-config-mgmt/wiki/How_To_recover_from_a_failed_pedestal_upload_-_December_2011\">MarkConfigChangesDone</a> utility to fix the issue.");
461  msgText.append("<br/><br/>Another alternative is to save ");
462  msgText.append("this configuration dataset with a different ");
463  msgText.append("name (use File-&gt;Save As).");
464  QMessageBox::warning(this, "Save Warning", msgText.c_str());
465 
466  return false;
467  }
468  else if (statusObj.code ==
469  NamedConfigUtils::COPY_FOUND_INTERMEDIATE_UPDATE) {
470  QMessageBox messageBox(this);
471  messageBox.setIcon(QMessageBox::Warning);
472  messageBox.setWindowTitle("Save Warning");
473 
474  std::string msgText = "A problem was found when saving changes to ";
475  msgText.append("the database.<br/><br/>");
476  msgText.append("Intermediate changes will be obscured by ");
477  msgText.append("this change. (Attempting to copy global ");
478  msgText.append("configuration with ID ");
479  msgText.append(boost::lexical_cast<std::string>
481  msgText.append(".)");
482  msgText.append("<ul><li>Detailed message: \"");
483  msgText.append(statusObj.message);
484  msgText.append("\"</li></ul>");
485  messageBox.setText(msgText.c_str());
486 
487  msgText = "Do you want to save anyway? (<b>Please Note</b> that ";
488  msgText.append("if you say Yes, the dataset that you are ");
489  msgText.append("currently saving will take precedence over the ");
490  msgText.append("existing one with the same name and DCM operating ");
491  msgText.append("mode <b>and</b> differences will <b>not</b> be ");
492  msgText.append("automatically brought forward.)");
493  messageBox.setInformativeText(msgText.c_str());
494 
495  messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
496  messageBox.setDefaultButton(QMessageBox::No);
497  int retCode = messageBox.exec();
498 
499  return (retCode == QMessageBox::Yes);
500  }
501  else if (statusObj.code != NamedConfigUtils::COPY_SUCCEEDED) {
502  std::cerr << "Unable to create a copy of the named "
503  << "global configuration with ID = "
504  << _currentGlobalConfigId << ": " << statusObj.message
505  << std::endl;
506  return false;
507  }
508 
509  return true;
510 }
OStream cerr
Definition: OStream.cxx:7
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::closeEvent ( QCloseEvent *  event)
protectedvirtualinherited

Definition at line 395 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::hasChanges(), runNovaSAM::retCode, and string.

Referenced by dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

396 {
397  if (! hasChanges()) {event->accept(); return;}
398 
399  QMessageBox confirmBox(this);
400 
401  std::string msgText = "There are changes that haven't been saved yet.";
402  confirmBox.setText(msgText.c_str());
403 
404  msgText = "Are you sure that you want to exit without saving ";
405  msgText.append("your changes to the database?");
406  confirmBox.setInformativeText(msgText.c_str());
407 
408  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
409  confirmBox.setDefaultButton(QMessageBox::No);
410  int retCode = confirmBox.exec();
411 
412  if (retCode == QMessageBox::Yes) {event->accept(); return;}
413  else {event->ignore(); return;}
414 }
virtual bool hasChanges() const =0
enum BeamMode string
void dbutils::gui::DCSConfigEditorDisplay::generateRecipeScripts ( )
slot

Definition at line 101 of file DCSConfigEditorDisplay.cpp.

References _doReloadCurrentDataset(), _pvScriptOutputDir, run_hadd::cmd, novadaq::EnvVarCache::getEnvVar(), novadaq::EnvVarCache::getInstance(), compare_h5_caf::idx, art::Normal, bp_utils::progressBar(), runNovaSAM::retCode, fabricate::status, string, and make_root_from_grid_output::tr.

Referenced by DCSConfigEditorDisplay().

102 {
103  // check that the user really wants to do this
104  std::string dbString =
106  QMessageBox confirmBox(this);
107 
108  std::string msgText = "You are about to update PV scripts on ";
109  msgText.append("disk based on data in the \"");
110  msgText.append(dbString);
111  msgText.append("\" database.");
112  confirmBox.setText(msgText.c_str());
113 
114  msgText = "Are you sure that you want to re-generate ";
115  msgText.append("the PV settings scripts?");
116  confirmBox.setInformativeText(msgText.c_str());
117 
118  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
119  confirmBox.setDefaultButton(QMessageBox::No);
120  int retCode = confirmBox.exec();
121 
122  if (retCode != QMessageBox::Yes) {return;}
123 
124  // determine the output directory to use
125  bool status;
126  QString responseText =
127  QInputDialog::getText(this, tr("Output directory"),
128  tr("Enter the output directory for the generated PV scripts:"),
130  _pvScriptOutputDir.c_str(), &status);
131  if (! status) {return;}
132  _pvScriptOutputDir = responseText.toStdString();
133 
134  // verify that the specified output directory is valid
135  if (! BFS::exists(_pvScriptOutputDir)) {
136  std::string msgText = "Output directory ";
137  msgText.append(_pvScriptOutputDir);
138  msgText.append(" does not exist. Aborting script generation...");
139  QMessageBox::critical(this, "Invalid Output Directory", msgText.c_str());
140  return;
141  }
142 
143  // generate the scripts
144  QProgressDialog progressBar("Generating scripts... Timeout at 100%", "Close", 0, 10, this);
145  progressBar.setWindowModality(Qt::WindowModal);
146  progressBar.setMinimumDuration(0);
147  progressBar.setValue(0);
148  QCoreApplication::processEvents(QEventLoop::AllEvents, 500);
149 
150  std::string cmd = "GenerateDCSRecipeScripts.sh ";
151  cmd.append(_pvScriptOutputDir);
152  boost::shared_ptr<QProcess> processPtr(new QProcess(this));
153  processPtr->start(cmd.c_str());
154 
155  bool finished = false;
156  QCoreApplication::processEvents(QEventLoop::AllEvents, 500);
157  if (processPtr->waitForStarted(8000)) {
158  progressBar.setValue(1);
159  QCoreApplication::processEvents(QEventLoop::AllEvents, 500);
160  for (int idx = 2; idx < 15; ++idx) {
161  if (processPtr->waitForFinished(8000)) {
162  finished = true;
163  break;
164  }
165  progressBar.setValue(idx < 9 ? idx : 9);
166  QCoreApplication::processEvents(QEventLoop::AllEvents, 500);
167  }
168  }
169  progressBar.setValue(10);
170  QCoreApplication::processEvents(QEventLoop::AllEvents, 500);
171 
172  if (! finished) {
173  processPtr->kill();
174  processPtr->waitForFinished(5000);
175  }
176 
177  std::string stdoutString(processPtr->readAllStandardOutput());
178  std::string stderrString(processPtr->readAllStandardError());
179 
180  if (finished) {
181  std::string msgText = "The job to generated the PV ";
182  msgText.append("settings scripts completed ");
183  msgText.append("Press \"Show Details...\" to see output.");
184  std::string outText = stdoutString;
185  outText.append("\n");
186  outText.append(stderrString);
187  QMessageBox resultBox(this);
188  resultBox.setIcon(QMessageBox::Information);
189  resultBox.setWindowTitle("PV Script Result");
190  resultBox.setText(msgText.c_str());
191  resultBox.setDetailedText(outText.c_str());
192  resultBox.exec();
193  //QMessageBox::information(this, "PV Script Result", msgText.c_str());
194  }
195  else {
196  std::string msgText = "The job to generated the PV ";
197  msgText.append("settings scripts timed out. ");
198  msgText.append("Press \"Show Details...\" to see output.");
199 
200  std::string outText = stdoutString;
201  outText.append("\n");
202  outText.append(stderrString);
203  QMessageBox resultBox(this);
204  resultBox.setIcon(QMessageBox::Warning);
205  resultBox.setWindowTitle("PV Script Result");
206  resultBox.setText(msgText.c_str());
207  resultBox.setDetailedText(outText.c_str());
208  resultBox.exec();
209  //QMessageBox::warning(this, "PV Script Result", msgText.c_str());
210  }
211 }
def progressBar(value, endvalue, docdb_id, bar_length=40)
Definition: bp_utils.py:6
int status
Definition: fabricate.py:1613
static EnvVarCache & getInstance()
Definition: EnvVarCache.cpp:12
string cmd
Definition: run_hadd.py:52
std::string getEnvVar(std::string name)
Definition: EnvVarCache.cpp:33
enum BeamMode string
bool dbutils::gui::DCSConfigEditorDisplay::hasChanges ( ) const
virtual
void dbutils::gui::DCSConfigEditorDisplay::loadHVAndTemps ( )
slot

Definition at line 234 of file DCSConfigEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, confusionMatrixTree::count, om::cout, mkDefs::detName, allTimeWatchdog::endl, fclose(), path, dbutils::gui::BasicEditorDisplay::reloadCurrentDataset(), runNovaSAM::retCode, string, system(), and make_root_from_grid_output::tr.

Referenced by DCSConfigEditorDisplay().

235 {
236  ///////////////////////////////////
237  // Prompt for location of the csv
238  std::string detName=_globalNameSpecPtr->getDetectorName();
239  std::string detDir;
240  if(detName=="FarDet")
241  detDir = "";
242  else if(detName=="NDOS")
243  detDir = "";
244  else if(detName=="NearDet")
245  detDir = "";
246  else if(detName=="NDSBTest")
247  detDir = "";
248  else
249  detDir = "";
250 
251  QFileDialog peddialog(this);
252  peddialog.setViewMode(QFileDialog::Detail);
253  QString folderName = peddialog.getExistingDirectory(this, tr("Select HV/Temp Directory."),
254  detDir.c_str(),
255  QFileDialog::ShowDirsOnly|QFileDialog::DontUseNativeDialog);
256  if(folderName==""){return;}
257 
258  /////////////////////////////////
259  // DB load confirmation box
260  QMessageBox confirmBox(this);
261  int count;
262  std::ostringstream hvfebs;
263  std::ostringstream tempfebs;
264 
265  boost::filesystem::path p(folderName.toUtf8().constData());
266  boost::filesystem::path uniquestamp = p.filename();
267 
268  std::string hvFileName = folderName.toUtf8().constData();
269  hvFileName.append("/hv_");
270  hvFileName.append(uniquestamp.string());
271  hvFileName.append(".csv");
272  std::string tempFileName = folderName.toUtf8().constData();
273  tempFileName.append("/temp_");
274  tempFileName.append(uniquestamp.string());
275  tempFileName.append(".csv");
276 
277 
278  std::ifstream hvFile(hvFileName.c_str());
279  count=std::count(std::istreambuf_iterator<char>(hvFile),
280  std::istreambuf_iterator<char>(), '\n');
281  hvfebs << count;
282 
283  std::ifstream tempFile(tempFileName.c_str());
284  count=std::count(std::istreambuf_iterator<char>(tempFile),
285  std::istreambuf_iterator<char>(), '\n');
286  tempfebs << count;
287 
288  std::string msgText = "You are about to load voltages and temperatures from ";
289  msgText.append(folderName.toUtf8().constData());
290  msgText.append("\n\n Found voltage results from ");
291  msgText.append(hvfebs.str());
292  msgText.append(" febs, temperature results from ");
293  msgText.append(tempfebs.str());
294  msgText.append(" febs.");
295  confirmBox.setText(msgText.c_str());
296 
297  msgText = "Are you sure that you want to load these values? ";
298  confirmBox.setInformativeText(msgText.c_str());
299  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
300  confirmBox.setDefaultButton(QMessageBox::No);
301  int retCode = confirmBox.exec();
302  if (retCode != QMessageBox::Yes) {return;}
303 
304  //////////
305  // Ask if user want to overide all setting in the config or simply append
306  // apply proper defualts if they want to override
307  QMessageBox loadBox(this);
308  msgText = "Do you want to override ALL existing exceptions underneath the defaults or append the results?";
309  loadBox.setText(msgText.c_str());
310  loadBox.addButton(tr("Override"),QMessageBox::AcceptRole);
311  loadBox.addButton(tr("Append"),QMessageBox::NoRole);
312  loadBox.addButton(QMessageBox::Cancel);
313  loadBox.setDefaultButton(QMessageBox::Cancel);
314  retCode = loadBox.exec();
315  std::string configName = _globalNameSpecPtr->getConfigName();
316 
317  std::string systemCommand = "LoadAPDHighVoltagesAndTemps NovaDatabase/tables/DCS ";
318  if (retCode == QMessageBox::Cancel){return;}
319  else if (retCode == QMessageBox::AcceptRole) {
320  std::string tmpstring;
321  tmpstring = folderName.toUtf8().constData();
322  tmpstring.append("/hvXXXXXX");
323  char *hvTmpName = new char[tmpstring.length() + 1];
324  strcpy(hvTmpName, tmpstring.c_str()); // Get temp name
325 
326  tmpstring = folderName.toUtf8().constData();
327  tmpstring.append("/tempXXXXXX");
328  char *tempTmpName = new char[tmpstring.length() + 1]; // Get temp name
329  strcpy(tempTmpName, tmpstring.c_str()); // Get temp name
330 
331 
332  mkstemp(hvTmpName);
333  mkstemp(tempTmpName);
334 
335  FILE * hvFileTmp = fopen (hvTmpName, "w");
336  FILE * tempFileTmp = fopen (tempTmpName, "w");
337 
338  std::string systemCommandtmp = "";
339 
340  //defaults
341  fputs ("1,default,-1,cold,1533,0,1,2,3,4\n", hvFileTmp);
342  fputs ("1,default,-1,warm,2957,0,1,2,3,4\n", hvFileTmp);
343  fputs ("1,default,-1,2000,0,1,2,3,4\n",tempFileTmp);
344  fclose(hvFileTmp);
345  fclose(tempFileTmp);
346 
347  systemCommandtmp.append(systemCommand);
348  systemCommandtmp.append(hvTmpName);
349  systemCommandtmp.append(" ");
350  systemCommandtmp.append(tempTmpName);
351  systemCommandtmp.append(" ");
352  systemCommandtmp.append(configName);
353  system(systemCommandtmp.c_str());
354 
355  remove(hvTmpName);
356  remove(tempTmpName);
357  }
358 
359  /////////////////////////////////
360  // Prompt user with status ans load into the database
361  //#Output the database environment
362  //echo
363  //echo 'Loading into' $NOVADBNAME 'on' $NOVADBHOST 'at port' $NOVADBPORT '....'
364 
365  //#Load the Thesholds and Masks
366 
367  systemCommand.append(hvFileName);
368  systemCommand.append(" ");
369  systemCommand.append(tempFileName);
370  systemCommand.append(" ");
371  systemCommand.append(configName);
372  std::cout<<systemCommand.c_str()<<std::endl;
373  system(systemCommand.c_str());
374 
375  ///////////////////////////////
376  //Refresh the editor
378 
379 } // end of loadHVAndTemps
system("rm -rf microbeam.root")
const char * p
Definition: xmltok.h:285
fclose(fg1)
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
OStream cout
Definition: OStream.cxx:6
const std::string path
Definition: plot_BEN.C:43
detName
Definition: mkDefs.py:106
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::loadNewDataset ( )
slotinherited

Definition at line 90 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, dbutils::gui::BasicEditorDisplay::_doLoadNewDataset(), dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, dbutils::gui::BasicEditorDisplay::_settingsDisplay, om::cerr, allTimeWatchdog::endl, dbutils::gui::BasicEditorDisplay::hasChanges(), runNovaSAM::retCode, string, and dbutils::gui::SettingsDisplay::updateNamedConfiguration().

Referenced by dbutils::gui::BasicEditorDisplay::BasicEditorDisplay(), dbutils::gui::DAQConfigEditorDisplay::DAQConfigEditorDisplay(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

91 {
92  if (hasChanges()) {
93  QMessageBox confirmBox(this);
94  std::string msgText = "There are changes that haven't been saved yet.";
95  confirmBox.setText(msgText.c_str());
96 
97  msgText = "Are you sure that you want to load a new dataset without ";
98  msgText.append("saving the existing changes to the database?");
99  confirmBox.setInformativeText(msgText.c_str());
100 
101  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
102  confirmBox.setDefaultButton(QMessageBox::No);
103  int retCode = confirmBox.exec();
104 
105  if (retCode == QMessageBox::No) {return;}
106  }
107 
108  ConfigSelectionDialog selectDialog((_globalNameSpecPtr->
109  isSlowControlsConfiguration() ?
110  IDSpec::SLOWCONTROLS : IDSpec::DAQ),
111  _globalNameSpecPtr->getDetectorName(), this);
112  int retCode = selectDialog.exec();
113  if (retCode == QDialog::Rejected) {
114  return;
115  }
116 
117  boost::shared_ptr<dbutils::daqconfig::GlobalNameSpec> nameSpecPtr;
118  if (selectDialog.getSelectedTime()==NamedConfigUtils::LATEST_TIME_STRING) {
119  nameSpecPtr.
120  reset(new GlobalNameSpec(selectDialog.getSelectedConfigName(),
121  selectDialog.getSelectedDCMOpMode(),
122  _globalNameSpecPtr->getDetectorName()));
123  }
124  else {
125  nameSpecPtr.
126  reset(new GlobalNameSpec(selectDialog.getSelectedConfigName(),
127  selectDialog.getSelectedDCMOpMode(),
128  _globalNameSpecPtr->getDetectorName(),
129  selectDialog.getSelectedTime()));
130  }
131  nameSpecPtr->isSlowControlsConfiguration(_globalNameSpecPtr->
132  isSlowControlsConfiguration());
133  int64_t globalConfigId = -1;
134  if (! NamedConfigUtils::getGlobalConfigId((*nameSpecPtr),
135  globalConfigId)) {
136  std::cerr << "Error fetching globalConfigId." << std::endl;
137  return;
138  }
139  IDSpec idSpec(globalConfigId, IDSpec::GLOBAL,
140  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
141  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
142 
143  if (_doLoadNewDataset(idSpec)) {
144  _globalNameSpecPtr = nameSpecPtr;
145  _currentGlobalConfigId = globalConfigId;
146  if (_settingsDisplay != 0) {
148  }
149  }
150  else {
151  std::string msgText = "The loading of the new dataset failed. ";
152  msgText.append("Depending on when the failure occurred, you may have an inconsistent set of data displayed in this editor. Please retry the loading of the new dataset until success is achieved before editing the data in the display.");
153  QMessageBox::critical(this, "Data Loading Error",
154  msgText.c_str());
155  return;
156  }
157 }
OStream cerr
Definition: OStream.cxx:7
void updateNamedConfiguration(const dbutils::daqconfig::GlobalNameSpec &nameSpec)
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
virtual bool _doLoadNewDataset(const dbutils::daqconfig::IDSpec &idSpec)=0
virtual bool hasChanges() const =0
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::reactToDataChange ( )
virtualslotinherited
void dbutils::gui::BasicEditorDisplay::reactToDataSave ( )
virtualslotinherited
void dbutils::gui::BasicEditorDisplay::reloadCurrentDataset ( )
slotinherited

Definition at line 47 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, dbutils::gui::BasicEditorDisplay::_doReloadCurrentDataset(), dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, om::cerr, allTimeWatchdog::endl, dbutils::gui::BasicEditorDisplay::hasChanges(), runNovaSAM::retCode, and string.

Referenced by dbutils::gui::BasicEditorDisplay::BasicEditorDisplay(), loadHVAndTemps(), dbutils::gui::DAQConfigEditorDisplay::loadThresholdsAndMasks(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

48 {
49  if (hasChanges()) {
50  QMessageBox confirmBox(this);
51  std::string msgText = "There are changes that haven't been saved yet.";
52  confirmBox.setText(msgText.c_str());
53 
54  msgText = "Are you sure that you want to reload this dataset without ";
55  msgText.append("saving the existing changes to the database?");
56  confirmBox.setInformativeText(msgText.c_str());
57 
58  confirmBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
59  confirmBox.setDefaultButton(QMessageBox::No);
60  int retCode = confirmBox.exec();
61 
62  if (retCode == QMessageBox::No) {return;}
63  }
64 
65  int64_t globalConfigId = _currentGlobalConfigId;
66  if (! _globalNameSpecPtr->hasTimestamp()) {
67  if (! NamedConfigUtils::getGlobalConfigId((*_globalNameSpecPtr),
68  globalConfigId)) {
69  std::cerr << "Error fetching globalConfigId." << std::endl;
70  return;
71  }
72  }
73 
74  IDSpec idSpec(globalConfigId, IDSpec::GLOBAL,
75  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
76  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
77 
78  if (_doReloadCurrentDataset(idSpec)) {
79  //_globalNameSpecPtr = nameSpecPtr;
80  _currentGlobalConfigId = globalConfigId;
81  //if (_settingsDisplay != 0) {
82  // _settingsDisplay->updateNamedConfiguration(*_globalNameSpecPtr);
83  //}
84  }
85 }
virtual bool _doReloadCurrentDataset(const dbutils::daqconfig::IDSpec &idSpec)=0
OStream cerr
Definition: OStream.cxx:7
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
virtual bool hasChanges() const =0
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::saveChanges ( )
slotinherited

Definition at line 159 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_confirmSave(), dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, dbutils::gui::BasicEditorDisplay::_doSaveChanges(), dbutils::gui::BasicEditorDisplay::_getUserResponseToGlobalCopyFailure(), dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, dbutils::gui::BasicEditorDisplay::_settingsDisplay, novadaq::Status::code, novadaq::Status::message, dbutils::SimpleParameterSet::put(), fabricate::status, string, and dbutils::gui::SettingsDisplay::updateNamedConfiguration().

Referenced by dbutils::gui::BasicEditorDisplay::BasicEditorDisplay(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

160 {
161  if (! _confirmSave()) {return;}
162 
163  IDSpec oldGlobalIdSpec(_currentGlobalConfigId, IDSpec::GLOBAL,
164  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
165  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
166 
168  paramSet.put(NamedConfigUtils::DESCRIPTION_COLUMN_NAME,
169  "New values from the Configuration Editor GUI.");
170  int64_t globalConfigId;
171  novadaq::Status resultStatus =
172  NamedConfigUtils::copyGlobalConfig(oldGlobalIdSpec, true, paramSet,
173  "", false, globalConfigId);
174  if (resultStatus.code != NamedConfigUtils::COPY_SUCCEEDED) {
175  bool userChoice = _getUserResponseToGlobalCopyFailure(resultStatus);
176  if (! userChoice) {return;}
177 
178  resultStatus =
179  NamedConfigUtils::copyGlobalConfig(oldGlobalIdSpec, true, paramSet,
180  "", true, globalConfigId);
181  if (resultStatus.code != NamedConfigUtils::COPY_SUCCEEDED) {
182  std::string msgText = "Unable to create a copy of the named ";
183  msgText.append("global configuration with ID = ");
184  msgText.append(boost::lexical_cast<std::string>
186  msgText.append(": ");
187  msgText.append(resultStatus.message);
188  QMessageBox::critical(this, "Save Error", msgText.c_str());
189  return;
190  }
191  }
192 
193  // 12-Dec-2011, KAB - this copying of the GlobalNameSpec is simply
194  // to get rid of any timestamp that may be present in the existing
195  // _globalNameSpecPtr (since the act of saving will create a new latest)
196  boost::shared_ptr<dbutils::daqconfig::GlobalNameSpec>
197  nameSpecPtr(new GlobalNameSpec(_globalNameSpecPtr->getConfigName(),
198  _globalNameSpecPtr->getDCMOpMode(),
199  _globalNameSpecPtr->getDetectorName()));
200  nameSpecPtr->
201  isSlowControlsConfiguration(_globalNameSpecPtr->
202  isSlowControlsConfiguration());
203  IDSpec globalIdSpec(globalConfigId, IDSpec::GLOBAL,
204  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
205  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
206  if (_doSaveChanges(oldGlobalIdSpec, globalIdSpec, (*nameSpecPtr))) {
207  if (NamedConfigUtils::markConfigDone(globalIdSpec, true)) {
208  _globalNameSpecPtr = nameSpecPtr;
209  _currentGlobalConfigId = globalConfigId;
210  if (_settingsDisplay != 0) {
212  }
213  }
214  }
215  else {
216  bool status = NamedConfigUtils::markConfigDone(globalIdSpec, false);
217 
218  std::string msgText = "An error occurred when saving changes to ";
219  msgText.append("the database.<br/><br/>");
220 
221  if (status) {
222  msgText.append("However, the new configuration was ");
223  msgText.append("successfully marked as Done (changes have ");
224  msgText.append("finished). Please try saving again in a few ");
225  msgText.append("minutes, but realize that you may need to ");
226  msgText.append("over-write the incomplete save that just ");
227  msgText.append("failed (the GUI will guide you through that).");
228  }
229  else {
230  msgText.append("In addition, the new configuration was not ");
231  msgText.append("successfully marked as Done (so it still ");
232  msgText.append("appears that there is a change in progress ");
233  msgText.append("in the DB table). If so, you'll need ");
234  msgText.append("to use the ");
235  msgText.append("<a href=\"https://cdcvs.fnal.gov/redmine/projects/novadaq-config-mgmt/wiki/How_To_recover_from_a_failed_pedestal_upload_-_December_2011\">MarkConfigChangesDone</a> utility to mark the change as Done.");
236  msgText.append("In any case, please try saving again in a few ");
237  msgText.append("minutes - the GUI will guide you through any ");
238  msgText.append("extra steps that you need to take.");
239  }
240 
241  QMessageBox::critical(this, "Save Error", msgText.c_str());
242  }
243 }
bool _getUserResponseToGlobalCopyFailure(const novadaq::Status &status)
int status
Definition: fabricate.py:1613
void put(const std::string &key, const std::string &value)
int32_t code
Definition: Status.h:22
void updateNamedConfiguration(const dbutils::daqconfig::GlobalNameSpec &nameSpec)
virtual bool _doSaveChanges(const dbutils::daqconfig::IDSpec &oldIdSpec, const dbutils::daqconfig::IDSpec &newIdSpec, const dbutils::daqconfig::GlobalNameSpec &newNameSpec)=0
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
std::string message
Definition: Status.h:24
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::saveChangesWithNewName ( )
slotinherited

Definition at line 245 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_confirmSave(), dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId, dbutils::gui::BasicEditorDisplay::_doSaveChanges(), dbutils::gui::BasicEditorDisplay::_getUserResponseToGlobalCopyFailure(), dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr, dbutils::gui::BasicEditorDisplay::_settingsDisplay, novadaq::Status::code, novadaq::Status::message, lem_server::msg, art::Normal, dbutils::SimpleParameterSet::put(), fabricate::status, string, make_root_from_grid_output::tr, and dbutils::gui::SettingsDisplay::updateNamedConfiguration().

Referenced by dbutils::gui::BasicEditorDisplay::BasicEditorDisplay(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

246 {
247  if (! _confirmSave()) {return;}
248 
250  NamedConfigUtils::
251  getAvailableGlobalConfigs((_globalNameSpecPtr->
252  isSlowControlsConfiguration() ?
253  IDSpec::SLOWCONTROLS : IDSpec::DAQ),
254  _globalNameSpecPtr->getDetectorName(),
255  globalNameMap);
256 
257  bool status;
258  std::string msg = "Please enter the new configuration name.";
259  if (globalNameMap.size() > 0) {
260  msg.append("<br/><br/>Recent choices for the name and the DCM ");
261  msg.append("operating mode include the following:<ul>");
262  NamedConfigUtils::GlobalNameSpecMap::const_iterator iter;
263  NamedConfigUtils::GlobalNameSpecMap::const_iterator iterEnd =
264  globalNameMap.end();
265  for (iter = globalNameMap.begin(); iter != iterEnd; ++iter) {
266  msg.append("<li>");
267  msg.append((*iter).first.getConfigName());
268  msg.append(" ");
269  msg.append((*iter).first.getDCMOpMode());
270  msg.append("</li>");
271  }
272  msg.append("</ul>");
273  }
274  QString newConfigName =
275  QInputDialog::getText(this, tr("Configuration Name"), msg.c_str(),
277  _globalNameSpecPtr->getConfigName().c_str(),
278  &status);
279  if (! status) {return;}
280 
281  msg = "Please enter the new DCM operating mode.";
282  if (globalNameMap.size() > 0) {
283  msg.append("<br/><br/>Recent choices for the name and the DCM ");
284  msg.append("operating mode include the following:<ul>");
285  NamedConfigUtils::GlobalNameSpecMap::const_iterator iter;
286  NamedConfigUtils::GlobalNameSpecMap::const_iterator iterEnd =
287  globalNameMap.end();
288  for (iter = globalNameMap.begin(); iter != iterEnd; ++iter) {
289  msg.append("<li>");
290  msg.append((*iter).first.getConfigName());
291  msg.append(" ");
292  msg.append((*iter).first.getDCMOpMode());
293  msg.append("</li>");
294  }
295  msg.append("</ul>");
296  }
297  QString newDCMOpMode =
298  QInputDialog::getText(this, tr("DCM Operating Mode"), msg.c_str(),
300  _globalNameSpecPtr->getDCMOpMode().c_str(),
301  &status);
302  if (! status) {return;}
303 
304  IDSpec oldGlobalIdSpec(_currentGlobalConfigId, IDSpec::GLOBAL,
305  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
306  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
307 
309  paramSet.put(NamedConfigUtils::NAME_COLUMN_NAME,
310  newConfigName.toStdString());
311  paramSet.put(NamedConfigUtils::DCMOPMODE_COLUMN_NAME,
312  newDCMOpMode.toStdString());
313  paramSet.put(NamedConfigUtils::DESCRIPTION_COLUMN_NAME,
314  "New named configuration from the Configuration Editor GUI.");
315  int64_t globalConfigId;
316  novadaq::Status resultStatus =
317  NamedConfigUtils::copyGlobalConfig(oldGlobalIdSpec, true, paramSet,
318  "", false, globalConfigId);
319  if (resultStatus.code != NamedConfigUtils::COPY_SUCCEEDED) {
320  bool userChoice = _getUserResponseToGlobalCopyFailure(resultStatus);
321  if (! userChoice) {return;}
322 
323  resultStatus =
324  NamedConfigUtils::copyGlobalConfig(oldGlobalIdSpec, true, paramSet,
325  "", true, globalConfigId);
326  if (resultStatus.code != NamedConfigUtils::COPY_SUCCEEDED) {
327  std::string msgText = "Unable to create a copy of the named ";
328  msgText.append("global configuration with ID = ");
329  msgText.append(boost::lexical_cast<std::string>
331  msgText.append(": ");
332  msgText.append(resultStatus.message);
333  QMessageBox::critical(this, "Save Error", msgText.c_str());
334  return;
335  }
336  }
337 
338  boost::shared_ptr<dbutils::daqconfig::GlobalNameSpec>
339  nameSpecPtr(new GlobalNameSpec(newConfigName.toStdString(),
340  newDCMOpMode.toStdString(),
341  _globalNameSpecPtr->getDetectorName()));
342  nameSpecPtr->
343  isSlowControlsConfiguration(_globalNameSpecPtr->
344  isSlowControlsConfiguration());
345  IDSpec globalIdSpec(globalConfigId, IDSpec::GLOBAL,
346  (_globalNameSpecPtr->isSlowControlsConfiguration() ?
347  IDSpec::SLOWCONTROLS : IDSpec::DAQ));
348  if (_doSaveChanges(oldGlobalIdSpec, globalIdSpec, (*nameSpecPtr))) {
349  if (NamedConfigUtils::markConfigDone(globalIdSpec, true)) {
350  _globalNameSpecPtr = nameSpecPtr;
351  _currentGlobalConfigId = globalConfigId;
352  if (_settingsDisplay != 0) {
354  }
355  }
356  }
357  else {
358  NamedConfigUtils::markConfigDone(globalIdSpec, false);
359  }
360 }
bool _getUserResponseToGlobalCopyFailure(const novadaq::Status &status)
int status
Definition: fabricate.py:1613
void put(const std::string &key, const std::string &value)
int32_t code
Definition: Status.h:22
void updateNamedConfiguration(const dbutils::daqconfig::GlobalNameSpec &nameSpec)
std::map< GlobalNameSpec, std::vector< GlobalNameSpec > > GlobalNameSpecMap
virtual bool _doSaveChanges(const dbutils::daqconfig::IDSpec &oldIdSpec, const dbutils::daqconfig::IDSpec &newIdSpec, const dbutils::daqconfig::GlobalNameSpec &newNameSpec)=0
boost::shared_ptr< dbutils::daqconfig::GlobalNameSpec > _globalNameSpecPtr
std::string message
Definition: Status.h:24
enum BeamMode string
void dbutils::gui::BasicEditorDisplay::showHelpDialog ( )
slotinherited

Definition at line 362 of file BasicEditorDisplay.cpp.

References dbutils::gui::BasicEditorDisplay::_customHelpText, and string.

Referenced by dbutils::gui::BasicEditorDisplay::_addHelpMenu(), and dbutils::gui::BasicEditorDisplay::~BasicEditorDisplay().

363 {
364  std::string msgText = "Helpful hints:";
365  msgText.append("<ul>");
366  msgText.append("<li>To edit a value, double-click on it [left mouse button]. (A single mouse click simply selects the value, it doesn't enable editing.)</li>");
367  msgText.append("<li>Once you have edited a value, you should single-click on a different cell in the table to ensure that the editor captures your change. (Pressing the Tab or Enter key after you enter your change will also work.)</li>");
368  msgText.append("<li>For \"mask\" values, a bitmap editor is provided. To open the bitmap editor, right-mouse-click on the value that you want to edit, and select the \"Open bitmap editor\" option from the popup menu.</li>");
369  msgText.append("</ul>");
370  msgText.append(_customHelpText);
371  QMessageBox::information(this, "Configuration editor help",
372  msgText.c_str());
373 }
enum BeamMode string

Member Data Documentation

int64_t dbutils::gui::BasicEditorDisplay::_currentGlobalConfigId
protectedinherited
TabbedSetOfTreeEditors* dbutils::gui::DCSConfigEditorDisplay::_editorSet
private
boost::shared_ptr<dbutils::daqconfig::GlobalNameSpec> dbutils::gui::BasicEditorDisplay::_globalNameSpecPtr
protectedinherited
std::string dbutils::gui::DCSConfigEditorDisplay::_pvScriptOutputDir
private

Definition at line 47 of file DCSConfigEditorDisplay.h.

Referenced by DCSConfigEditorDisplay(), and generateRecipeScripts().

QAction* dbutils::gui::BasicEditorDisplay::_saveAction
protectedinherited
QAction* dbutils::gui::BasicEditorDisplay::_saveAsAction
protectedinherited
SettingsDisplay* dbutils::gui::BasicEditorDisplay::_settingsDisplay
protectedinherited

The documentation for this class was generated from the following files: