Jpp
|
Runcontrol client to write data to disk. More...
Classes | |
struct | JRunDB |
Map run number to trigger parameters. More... | |
struct | JValue_t |
Auxiliary data structure for I/O of trigger parameters. More... | |
Public Member Functions | |
JDataWriter (const std::string &name, const std::string &server, const std::string &hostname, JLogger *logger, const int level, const std::string &path) | |
Constructor. More... | |
virtual void | actionInit (int length, const char *buffer) |
virtual void | actionConfigure (int length, const char *buffer) |
virtual void | actionReset (int length, const char *buffer) |
virtual void | actionQuit (int length, const char *buffer) |
virtual void | actionStart (int length, const char *buffer) |
virtual void | actionStop (int length, const char *buffer) |
virtual void | setSelect (JFileDescriptorMask &mask) const |
Set the file descriptor mask for the select call. More... | |
virtual void | actionSelect (const JFileDescriptorMask &mask) |
Action method following last select call. More... | |
virtual void | actionRunning () |
This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero. More... | |
void | typeout () |
Report status of data writing. More... | |
virtual bool | enter (const JArgs &args) |
Enter the state machine. More... | |
virtual bool | enter () |
Enter the state machine. More... | |
virtual bool | exit () |
Exit the state machine. More... | |
const std::string & | getFullName () const |
Get full name of this run control client. More... | |
const JNET::JTag & | getUniqueTag () const |
Get unique tag of this run control client. More... | |
int | getEventNumber () const |
Get last event number. More... | |
bool | isRunning () const |
Check if this client is in runnig state. More... | |
void | replaceEvent (const JNET::JTag &oldTag, const JNET::JTag &newTag, JDAQEvent_t &event) |
Replace tag of given event in event table. More... | |
JDAQEvent_t * | findEvent (const JNET::JTag &tag, const std::string &event_name) |
Find event in event table. More... | |
template<class T > | |
void | addParameter (const char option, T ¶meter) |
Add parameter to parser used in method enter(). More... | |
template<class T > | |
void | addParameter (const char option, T ¶meter, const T &value) |
Add parameter to parser used in method enter(). More... | |
long long int | getClockDelay () const |
Get total delay time. More... | |
const std::string & | getHostname () const |
Get hostname. More... | |
long long int | getClockInterval () const |
Get interval time. More... | |
void | setClockInterval (const long long int interval_us) |
Set interval time. More... | |
void | resetClock () |
Reset clock. More... | |
void | setSelect () |
Set the file descriptor mask for the select call. More... | |
virtual void | actionInput (int length, const char *buffer) |
This method is called at ev_input . More... | |
virtual bool | filter (const std::string &tag, int length, const char *buffer) |
Filter message. More... | |
void | run () |
Run as run control client following command messages via JNET::JControlHost. More... | |
void | run (const int port) |
Run for ever. More... | |
void | run (std::istream &in) |
Run client with commands from input stream (e.g for debugging). More... | |
Public Attributes | |
JMeta | meta |
meta data More... | |
Static Public Attributes | |
static const int | MAXIMUM_FILE_NUMBER = 100 |
maximum file number for overwrite protection. More... | |
static const int | TIMEOUT_S = 1 |
time out of update [s] More... | |
Protected Attributes | |
JSharedPointer< JControlHost > | server |
message server More... | |
JMessageLogger | logger |
message logger More... | |
Private Attributes | |
JLANG::JSharedPointer < JControlHost > | datawriter |
std::string | path |
JEEP::JTimer | timer |
Long64_t | numberOfEvents |
long long int | numberOfBytes |
JMessageScheduler | logErrorRun |
JMessageScheduler | logErrorFile |
JMessageScheduler | logErrorTag |
JMessageScheduler | logErrorState |
std::string | hostname |
host name of data server More... | |
JTreeWriter_t | writer |
TTree writer. More... | |
std::vector< char > | buffer |
internal buffer for incoming data More... | |
JRunDB | run_db |
Runcontrol client to write data to disk.
In state running, this application will write ROOT formatted data from the data filters to disk.
Definition at line 59 of file JDataWriter.cc.
|
inline |
Constructor.
name | name of client |
server | name of command message server |
hostname | name of data server |
logger | pointer to logger |
level | debug level |
path | default path |
Definition at line 73 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 94 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 124 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 158 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 164 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 168 of file JDataWriter.cc.
|
inlinevirtual |
Definition at line 221 of file JDataWriter.cc.
|
inlinevirtual |
Set the file descriptor mask for the select call.
This implementation does nothing but may be redefined by the derived class.
mask | file descriptor mask |
Reimplemented from KM3NETDAQ::JDAQClient.
Definition at line 243 of file JDataWriter.cc.
|
inlinevirtual |
Action method following last select call.
This implementation does nothing but may be redefined by the derived class.
mask | file descriptor mask |
Reimplemented from KM3NETDAQ::JDAQClient.
Definition at line 251 of file JDataWriter.cc.
|
inlinevirtual |
This method is repeatedly called when this client machine is in state Running and the clock interval time is non-zero.
This implementation does nothing but may be redefined by the derived class. Care has to be taken so that the time needed to execute this method should be less than the specified clock interval time (see method setClockInterval()).
Reimplemented from KM3NETDAQ::JDAQClient.
Definition at line 356 of file JDataWriter.cc.
|
inline |
Report status of data writing.
Definition at line 365 of file JDataWriter.cc.
|
inlinevirtualinherited |
Enter the state machine.
This overloaded method enter reproduces the constructor. All necessary input is parsed from the list of arguments. In case of an error, the state machine is not entered.
args | array of command line arguments |
Definition at line 143 of file JDAQClient.hh.
|
inlinevirtualinherited |
Enter the state machine.
This method activates the subscription to JNET::JControlHost messages. In case of an error, the state machine is not entered.
Reimplemented in KM3NETDAQ::JDAQDriver.
Definition at line 195 of file JDAQClient.hh.
|
inlinevirtualinherited |
Exit the state machine.
This method releases the various resources.
Definition at line 225 of file JDAQClient.hh.
|
inlineinherited |
Get full name of this run control client.
Definition at line 248 of file JDAQClient.hh.
|
inlineinherited |
Get unique tag of this run control client.
Definition at line 259 of file JDAQClient.hh.
|
inlineinherited |
Get last event number.
Definition at line 270 of file JDAQClient.hh.
|
inlineinherited |
Check if this client is in runnig state.
Definition at line 281 of file JDAQClient.hh.
|
inlineinherited |
Replace tag of given event in event table.
oldTag | old tag |
newTag | new tag |
event | event |
Definition at line 294 of file JDAQClient.hh.
|
inlineinherited |
Find event in event table.
tag | tag |
event_name | event name |
Definition at line 309 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
Definition at line 327 of file JDAQClient.hh.
|
inlineinherited |
Add parameter to parser used in method enter().
option | option |
parameter | parameter |
value | default value |
Definition at line 341 of file JDAQClient.hh.
|
inlineinherited |
Get total delay time.
Definition at line 352 of file JDAQClient.hh.
|
inlineinherited |
|
inlineinherited |
Get interval time.
Definition at line 374 of file JDAQClient.hh.
|
inlineinherited |
Set interval time.
interval_us | interval time [us] |
Definition at line 385 of file JDAQClient.hh.
|
inlineinherited |
Reset clock.
Definition at line 394 of file JDAQClient.hh.
|
inlineinherited |
Set the file descriptor mask for the select call.
Definition at line 403 of file JDAQClient.hh.
|
inlinevirtualinherited |
This method is called at ev_input
.
length | length of data |
buffer | pointer to data |
Reimplemented in AcousticDataFilter.
Definition at line 450 of file JDAQClient.hh.
|
inlinevirtualinherited |
Filter message.
The filter method can be overloaded so that a specific action is made before the corresponding message is processed by the state machine. The message is ignored if true is returned, else it is normally processed.
tag | tag |
length | number of characters |
buffer | message |
Definition at line 477 of file JDAQClient.hh.
|
inlineinherited |
Run as run control client following command messages via JNET::JControlHost.
This method can be called once the state machine is entered. It returns when the state machine is exited. If the clock interval is non-zero, the method actionRunning() is repeatedly called when this client machine is in state Running. The file descriptor mask can be set to interrupt the timeout of the select call and clock method wait() in this calling sequence (see methods setSelect() and actionSelect()).
Definition at line 493 of file JDAQClient.hh.
|
inlineinherited |
Run for ever.
This method can be used when the run control client is started before the run control (e.g. at boot time of the host processor). This method should be called before the state machine is entered. It launches a server which accepts a JNET::JControlHost connection from a designated application e.g. the JDAQClientStarter.cc program. The state machine is entered using the available data in the JNET::JControlHost message. After the state machine is exited, it accepts a new a JNET::JControlHost connection.
port | port number |
Definition at line 573 of file JDAQClient.hh.
|
inlineinherited |
Run client with commands from input stream (e.g for debugging).
Example input format:
<tag> <event name>[#data]; <tag> <event name>[#data];
in | input stream |
Definition at line 618 of file JDAQClient.hh.
JMeta KM3NETDAQ::JDataWriter::meta |
meta data
Definition at line 375 of file JDataWriter.cc.
|
static |
maximum file number for overwrite protection.
Definition at line 377 of file JDataWriter.cc.
|
private |
Definition at line 381 of file JDataWriter.cc.
|
private |
Definition at line 382 of file JDataWriter.cc.
|
private |
Definition at line 384 of file JDataWriter.cc.
|
private |
Definition at line 385 of file JDataWriter.cc.
|
private |
Definition at line 386 of file JDataWriter.cc.
|
private |
Definition at line 388 of file JDataWriter.cc.
|
private |
Definition at line 389 of file JDataWriter.cc.
|
private |
Definition at line 390 of file JDataWriter.cc.
|
private |
Definition at line 391 of file JDataWriter.cc.
|
private |
host name of data server
Definition at line 393 of file JDataWriter.cc.
|
private |
TTree writer.
Definition at line 394 of file JDataWriter.cc.
|
private |
internal buffer for incoming data
Definition at line 395 of file JDataWriter.cc.
|
private |
Definition at line 500 of file JDataWriter.cc.
|
staticinherited |
time out of update [s]
Definition at line 631 of file JDAQClient.hh.
|
protectedinherited |
message server
Definition at line 635 of file JDAQClient.hh.
|
protectedinherited |
message logger
Definition at line 636 of file JDAQClient.hh.