47 const std::string& server,
70 properties[
"datawriter"] = destination =
"localhost";
71 properties[
"inputFile"] = inputFile;
72 properties[
"eventRate_Hz"] = eventRate_Hz = 1.0;
74 properties.
read(
string(buffer, length));
76 destination = destination.trim();
85 if (eventRate_Hz > 0.0)
86 setClockInterval((
long long int) (1.0e6 / eventRate_Hz));
88 setClockInterval(0ULL);
92 JDebugStream(logger) <<
"Event interval time " << getClockInterval() <<
" us";
131 if (timer.usec_wall > 0)
JNoticeStream(logger) <<
"I/O [MB/s] " << numberOfBytes / timer.usec_wall;
132 if (numberOfEvents > 0)
JNoticeStream(logger) <<
"Delay/event [ms] " << getClockDelay() / numberOfEvents / 1000;
144 if (datawriter.is_valid()) {
146 if (!inputFile.hasNext()) {
150 if (inputFile.hasNext()) {
164 datawriter->PutFullData(
IO_EVENT, out.data(), out.size());
167 numberOfBytes += out.size();
202 int main(
int argc,
char* argv[])
214 JParser<> zap(
"Program for real-time simulation of data.");
224 catch(
const exception &error) {
225 FATAL(error.what() << endl);
229 using namespace KM3NETDAQ;
Utility class to parse command line options.
bool read(const JEquation &equation)
Read equation.
Data structure for all trigger parameters.
ROOT TTree parameter settings of various packages.
Wrapper class around STL string class.
then JLigiers sh continue fi cat driver txt<< EOFprocess dfilter $HOST1 ssh\$HOST\$"JDataFilter -H \$SERVER\$ -M \$LOGGER\$ -d $DEBUG &";enterevent ev_init{RC_CMD%< ev_init.txt > from me< ev_init.txt > event ev_configure
virtual void actionStart(int length, const char *buffer)
JSharedPointer< JControlHost > datawriter
std::string getProcessName(const std::string &name, const std::string &process)
Get process name of run control client.
Message logging based on std::ostream.
JSUPPORT::JMultipleFileScanner< KM3NETDAQ::JDAQEvent > inputFile
Interface for logging messages.
Message logging based on ControlHost.
Utility class to parse parameter values.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Simple data structure to support I/O of equations (see class JLANG::JEquation).
static const JNET::JTag IO_TRIGGER_PARAMETERS
void run()
Run as run control client following command messages via JNET::JControlHost.
Utility class to parse parameter values.
JTRIGGER::JTriggerParameters parameters
Scheduling of actions via fixed latency intervals.
The template JSharedPointer class can be used to share a pointer to an object.
virtual void actionStop(int length, const char *buffer)
virtual void actionReset(int length, const char *buffer)
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getRunNumber(const std::string &file_name)
Get run number for given file name of data taking run.
Runcontrol client to simulate data filter(s).
Auxiliary class for CPU timing and usage.
Level specific message streamers.
Exception for ControlHost.
static const JNET::JTag RC_EVTGENERATOR
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JEventGenerator(const std::string &name, const std::string &server, JLogger *logger, const int level)
Constructor.
Control unit client base class.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
virtual bool enter(const JArgs &args)
Enter the state machine.
static const JNET::JTag RC_CMD
static const JNET::JTag IO_EVENT
Byte array binary output.
KM3NeT DAQ constants, bit handling, etc.
virtual void actionQuit(int length, const char *buffer)
virtual void actionConfigure(int length, const char *buffer)
JTriggerParameters getTriggerParameters(const JMultipleFileScanner_t &file_list)
Get trigger parameters.
static void Throw(const bool option)
Enable/disable throw option.
long long int numberOfBytes
virtual void actionRunning()
This method is repeatedly called when this client machine is in state Running and the clock interval ...
JTriggerCounter_t next()
Increment trigger counter.
int main(int argc, char *argv[])