Runcontrol: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
Boiarino (talk | contribs)
No edit summary
Boiarino (talk | contribs)
Line 7: Line 7:
* rcServer/Components.s/daqRun.h: object must have a type 'daqData' to use reloaded operations etc:
* rcServer/Components.s/daqRun.h: object must have a type 'daqData' to use reloaded operations etc:


  daqData* tokenInterval_;
  daqData* tokenInterval_; /* variable */
daqDataWriter* tokenIWriter_; /* database writer */


* rcServer/Components.s/daqRun.cc: create object, connect it to manager, and enable writing:
* rcServer/Components.s/daqRun.cc: create object, connect it to manager, and enable writing:


  tokenInterval_ = new rcsDaqData (exptname_, "tokenInterval", 0);
  tokenInterval_ = new rcsDaqData (exptname_, "tokenInterval", 0); /* create variable */
  tokenInterval_->connect (dataManager_);
  tokenInterval_->connect (dataManager_);                         /* register to manager */
  tokenInterval_->enableWrite ();
  tokenInterval_->enableWrite ();                                 /* enable writing to database */
 
tokenIWriter_ = new rcsTokenIntervalWriter (this);               /* create writer */
 
tokenInterval_->writer (tokenIWriter_);                         /* register writer */
 
???
  tokenIWriter_ = new rcsTokenIntervalWriter (this);
  tokenInterval_->writer (tokenIWriter_);





Revision as of 11:11, 5 October 2015

This page describes run control part of Coda DAQ system. It reside in $CODA/src/rc/ directory.

Communication between rcServer and runcontrol

Lets use 'tokenInterval' as example. It reside in database, and can be changed by runcontrol. Following steps were made to implement 'tokenInterval' functionality:

  • rcServer/Components.s/daqRun.h: object must have a type 'daqData' to use reloaded operations etc:
daqData* tokenInterval_; /* variable */
daqDataWriter* tokenIWriter_; /* database writer */
  • rcServer/Components.s/daqRun.cc: create object, connect it to manager, and enable writing:
tokenInterval_ = new rcsDaqData (exptname_, "tokenInterval", 0); /* create variable */
tokenInterval_->connect (dataManager_);                          /* register to manager */
tokenInterval_->enableWrite ();                                  /* enable writing to database */
tokenIWriter_ = new rcsTokenIntervalWriter (this);               /* create writer */
tokenInterval_->writer (tokenIWriter_);                          /* register writer */




adcecal5:runControl> grep \"tokenInterval\" */*/*.cc

rcClient/src.s/rcClient.cc: tokenInterval_ = new rccDaqData (exptname_, "tokenInterval", 0);


rcServer/Components.s/daqRun.cc:/*sergey: corresponds to "tokenInterval" !? see

rcClient/src.s/rcClient.cc: tokenInterval_ = new rccDaqData (exptname_, "tokenInterval", 0);


rcServer/Components.s/dbaseReader.cc: else if (::strcmp (row[0], DBASE_TOKEN_INTERVAL) == 0) /* DBASE_TOKEN_INTERVAL="tokenInterval" */

Xui/src.s/rcClientHandler.cc: if (handler_.monitorOnCallback (exptname, "tokenInterval",

Xui/src.s/rcTokenIButton.cc: daqData data (client.exptname (), "tokenInterval", newval);