Coda: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
 
(3 intermediate revisions by one other user not shown)
Line 24: Line 24:


'''Variables/''' contains some generic stuff, for example ''daqData'' contains operators overloading etc.
'''Variables/''' contains some generic stuff, for example ''daqData'' contains operators overloading etc.
daqData - generic data acquisition data type




Line 158: Line 160:
  transitionTimer
  transitionTimer
  verifier
  verifier
== Adding config file handling to the runcontrol ==
* in rcServer/Components.s create files rcsConfFileNameWriter.cc and rcsConfFileNameWriter.h; containing constructor, destructor and method 'write(daqData* data)'
* in rcServer/Components.s/dbaseReader.cc add following method:
dbaseReader::putConfFileName (char* name) - update 'confFile' in database '<>_option' table
* in rcServer/Components.s/daqRun.cc add following to method daqRun::createAllVariables() called from constructor:
confFile_ = new rcsDaqData (exptname_, "confFile", "unknown");
confFile_->connect (dataManager_);
confFile_->enableWrite ();
//confFile_->disableWrite ();
confnameWriter_ = new rcsConfFileNameWriter (this);
confFile_->writer (confnameWriter_);
* in rcServer/Components.s/daqRun.cc add following to method daqRun::resetAllVariables() called from loadDatabase:
*confFile_ = "unknown";
if (conffileName_) delete []conffileName_;
conffileName_ = 0;
* in rcServer/Components.s/daqRun.cc create following methods:
daqRun::confFile (char *file) -
daqRun::writeConfFileNameToDbase (char* file)
daqRun::setConfFileName (char* name)

Latest revision as of 21:05, 9 April 2014

CODA is JLAB data aquisition system software. CLAS version of CODA has some differences and described in current section.

dac directory

Core CODA packages.

proc_thread

Original CODA's second readout list is running as a thread, called 'proc_thread'. It can be run on main host or on pmc co-processor. Main files is 'main/cinclude/roc_process.c'. Main function started as a thread is

void proc_thread(BIGPROC *bigprocptrin, unsigned int offsetin)

where BIGPROC structure contains control parameters including pointers to the input (BIGBUF *gbigBuffer) and output (BIGBUF *gbigBuffer1) big buffers.

write_thread

Last component in coda_roc running as a thread. Main file is 'dac.s/roc_network.c'. Main function started as a thread is

write_thread(BIGNET *bignetptrin, unsigned int offsetin)

where BIGNET structure contains control parameters including pointers to the input (BIGBUF *gbigBuffer) big buffer;

rc directory (run control)

Uses MOTIF as graphics and ACE3.1 as communication package, all sources are available in subdirectories /cg, /motif and /sase3.1. Run control code resides in subdirectory /runControl.


Variables/ contains some generic stuff, for example daqData contains operators overloading etc.

daqData - generic data acquisition data type


Common/ - set of classes use by other components:

codaIntHash -- codaSList
codaStrHash ------/
rcMsg
rcSvcInfoFinder
rcSvcLocaterRep
   | (friend)
rcServerLocater

/rcClient contains run control client library functions in /src.s and client program example in /main. Library has following structure:

rcClient <- rccDaqData <- codaRcCallback


/rcServer contains run control server library in subdirectories /Components.s, /Constants.s, /Network.s, /Transitioners.s and /src.s, and main program in /main. Most important classes are in /Components.s.


Main/

rcServer
  |
  |-- Common/rcSvcInfoFinder
  |-- Common/rcServerLocater
  |-- (local src.s)/rcSignalHandler
  |-- sase/Reactor
  |-- Network/rccAcceptor
  |-- Network/rccStdinPipe
  |-- Network/portHandler
  |-- Constants/daqActions
  |-- Components/daqRun
  |-- Components/rcMsgReporter
  |-- Components/dbaseReader
  |-- Components/daqSystem
  |-- sace/Time_Value


Components/

daqRun - 
  |
  |-- rcsAnaLogVarWriter
  |-- rcsConfFileNameWriter
  |-- rcsDaqData
  |-- rcsDataLimitWriter
  |-- rcsEvLimitWriter
  |-- rcsLogFileDesWriter
  |-- rcsNumEvTrigger
  |-- rcsNumLongTrigger
  |-- rcsRunNumberWriter
  |-- rcsTokenIntervalWriter
  |-- rcsUpdateIWriter
  |
  |-- dbaseReader -- factory -- daqLogComp
  |
  |-- daqCompMonitor -- daqCompMonitorTimer
  |
  |-- daqDataUpdater
  |-- daqDataUpdateFunc

netComponent (used in multiple places)
  |
  |-- codaCompClnt (codaDaDownload etc using tclClient)
  |-- netCompBootTimer

subSysSortedList

daqSystem - used in multiple places
  |
  |-- transitionGraph

daqSubSystem - used in multiple classes
  |
  |-- daqCompSortedList

daqComponent - used in multiple places

daqScriptComp - used in 'daqSystem' and 'factory'

daqScriptSystem - used in 'daqRun' and 'dbaseReader'

daqTarget - used in 'daqSystem' and 'daqComponent'
  |
  |-- target 
rcMsgReporter - global 'reporter' used in multiple places


Constants/

daqActions
daqState


Network/

portHandler
rccAcceptor
rccCmdBuffer
rccIO
rccStdinPipe
rccThrPipe


Transitioners/

activater
booter
compTransitioner
configurer
downloader
ender
pauser
prestarter
resetter
subSysAborter
subSysActivater
subSysBooter
subSysConfigurer
subSysDownloader
subSysEnder
subSysPauser
subSysPrestarter
subSysResetter
subSysTerminater
subSysTransitioner
subSysVerifier
terminater
transitioner -- Components/subSysSortedList
transitionTimer
verifier

Adding config file handling to the runcontrol

  • in rcServer/Components.s create files rcsConfFileNameWriter.cc and rcsConfFileNameWriter.h; containing constructor, destructor and method 'write(daqData* data)'
  • in rcServer/Components.s/dbaseReader.cc add following method:
dbaseReader::putConfFileName (char* name) - update 'confFile' in database '<>_option' table
  • in rcServer/Components.s/daqRun.cc add following to method daqRun::createAllVariables() called from constructor:
confFile_ = new rcsDaqData (exptname_, "confFile", "unknown");
confFile_->connect (dataManager_);
confFile_->enableWrite ();
//confFile_->disableWrite ();

confnameWriter_ = new rcsConfFileNameWriter (this);
confFile_->writer (confnameWriter_);
  • in rcServer/Components.s/daqRun.cc add following to method daqRun::resetAllVariables() called from loadDatabase:
*confFile_ = "unknown";
if (conffileName_) delete []conffileName_;
conffileName_ = 0;
  • in rcServer/Components.s/daqRun.cc create following methods:
daqRun::confFile (char *file) - 
daqRun::writeConfFileNameToDbase (char* file)
daqRun::setConfFileName (char* name)