Class that represents a run
Class that represents a run. Instances of this class are created as runs are started by the partition object.
Its identifier, the run number, is currently maintained in an ASCII file pointed to by the environment variable \$RC_RUNNUMBER_FILE.Its purpose is twofold:
begin{itemize}First it is an active object that represents an active run and as such it performs a whole bunch of operations as we are taking data. These operations are done in periodic intervals, tasks typically include gathering status information and checking for automatic end run conditions (e.g. the desired number of events have been taken and the run should be ended now). Second it should store the information about the run when it ends. This functionality is currently not implemented. The following things happens during the run state actions:
- create: nothing really!
- starting: initialise the run counters, store beginrun info in the ASCII file, send evStarted to self
- running: in periodic intervales do:
1. ask the readout object for information (the current number of events, nb of Mby written, ...),
2. check whether an end run condition is valid- paused: cancel the timer to stop the automatic run update procedure 3. send event to self for the next update or an event to the partition in case the EoR condition has been detected
- ended: store the end run info in the ASCII file,
First version: April 6, 98, CW
Last update: Feb 5, 2000, CW
~rcRun()
static void listAll( ostream &os = cout )
static void dump_all( ostream &os = cout )
void identify( ostream &os = cout )
virtual void dump( ostream &os = cout )
static int getNextRunNumber()
static int storeNewRunNumber( int newRunNumber )
static run_parameters getLastRunParameters()
Accessors
int getRunNb()
const char* getPurpose()
int getNbEventsTaken()
int getSecRunning()
int getNbMbyWritten()
int getUpdateFreq()
void setUpdateFreq( int iMilliSec )
struct run_parameters getRunParameters const
void setEventLimit( int iNewLimit )
void setTimeLimit( int iNewLimit )
void setVolumeLimit( int iNewLimit )
void show_status( ostream &os )
bool isActive()
int relateToPartition( rcPartition *pPartition )
int unrelateFromPartition( rcPartition *pPartition )
Run_i* getRunImpl()
Finite State machine for the run object
void setCurrentState( int iNewState )
enum eStates
enum eEvents
static int stt[ eNStates ][ eNEvents ]
int create()
int starting()
int running()
int paused()
int ended()
int storeBorInfo()
int storeEorInfo()
int iRunNb
char* pcName
int nEventsTaken
int nSecRunning
int nMbyWritten
int nEventsInDDStart
int nEventsInDD
struct run_parameters sRunParam
int iUpdateFreqMsec
static const char* pcStates[eNStates]
bool bDisableTimer
smTimer* pMyTimer
rcPartition* pMyPartition
bool bTestMode
bool bPrintRunProgress
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de