176       static const int MAXIMUM_FILE_NUMBER = 100; 
 
  207         gErrorIgnoreLevel = kFatal;
 
  209         std::ostringstream os;
 
  214           std::remove(os.str().c_str());
 
  217         this->
open(os.str().c_str());
 
  235         if (this->is_open()) {
 
  237           const string file_name = this->
getFile()->GetName();
 
  243             for (
int i = 0; i != MAXIMUM_FILE_NUMBER; ++i) {
 
  249                  << 
"_"  << cal.getYear() << 
'-' << 
FILL(2,
'0') << cal.getMonth() << 
'-' << 
FILL(2,
'0') << cal.getDay()
 
  260                 if (std::rename(file_name.c_str(), os.str().c_str()) == 0)
 
  269             std::remove(file_name.c_str());
 
  294         return (sizeL0 > 0 ||
 
  310         if (
object.is_open())
 
  311           out << 
object.getFile()->GetName();
 
  317         out << 
object.sizeL0 << 
'/' 
  318             << 
object.sizeL1 << 
'/' 
  319             << 
object.sizeL2 << 
'/' 
  320             << 
object.sizeSN << 
'/';
 
  377       buffer_size(buffer_size),
 
  385       current_slice_index  = -1;
 
  396       if (c_buffer.is_open()) {
 
  398         JStatusStream(logger) << 
"Close and remove circular buffer " << c_buffer;
 
  400         c_buffer.close(
false);
 
  407     virtual void actionInit(
int length, 
const char* buffer)
 override 
  415         if (serversocket.is_valid()) {
 
  416           serversocket->shutdown();
 
  421       catch(
const std::exception& error) {
 
  422         JErrorStream(logger) << 
"Error \"" << error.what() << 
"\"; trigger ev_error.";
 
  443       dumpLimit = numeric_limits<int>::max();
 
  449       properties[
"dataWriter"]             = hostname;
 
  450       properties[
"numberOfFramesPerSlice"] = frames_per_slice = 1;
 
  453       properties[
"queueSize"]              = maxQueueSize  = (totalCPURAM - 
GIGABYTE);  
 
  454       properties[
"queueDepth"]             = maxQueueDepth = 20;                        
 
  455       properties[
"frameIndex"]             = maximal_frame_index = 100000;
 
  458       properties[
"JDataFilter"]            = dataFilters;
 
  459       properties[
"DataQueue"]              = dataQueues;
 
  460       properties[
"path"]                   = c_buffer.path;
 
  461       properties[
"archive"]                = c_buffer.archive;
 
  462       properties[
"c_sizeL0"]               = c_buffer.sizeL0;
 
  463       properties[
"c_sizeL1"]               = c_buffer.sizeL1;
 
  464       properties[
"c_sizeL2"]               = c_buffer.sizeL2;
 
  465       properties[
"c_sizeSN"]               = c_buffer.sizeSN;
 
  466       properties[
"dumpLimit"]              = dumpLimit;
 
  469         properties.
read(
string(buffer, length));
 
  471       catch(
const exception& error) {
 
  478       setClockInterval(
update_s * 1000000LL);
 
  480       hostname = 
trim(hostname);
 
  485         throw JException(
"Undefined data writer host name.");
 
  487       maximum_frames_per_slice = frames_per_slice;
 
  491       if (dataFilters.empty()) {
 
  492         JNoticeStream(logger) << 
"No DataFilters in process list, or no process list. " 
  493                               << 
"Assuming that this process is the only process on this CPU and setting parameters accordingly.";
 
  496       sort(dataFilters.begin(), dataFilters.end(), 
compare);
 
  498       unsigned int numberOfDataFiltersOnThisMachine = 0;
 
  506         notice << 
"My IP addresses:";
 
  515         JDebugStream(logger) << 
"Test IP address \"" << i->hostname << 
"\" " << (find(IP.begin(), IP.end(), i->hostname) != IP.end());
 
  517         if (find(IP.begin(), IP.end(), i->hostname) != IP.end()) {
 
  519           numberOfDataFiltersOnThisMachine++;
 
  521           if (i->port == 
this->port) {
 
  527       if (numberOfDataFiltersOnThisMachine == 0) {
 
  528         JNoticeStream(logger) << 
"Zero data filters on this machine according to process list (if it exists). " 
  529                               << 
"Assuming one datafilter on this machine.";
 
  530         numberOfDataFiltersOnThisMachine = 1;
 
  533       if (thisProcess == dataFilters.end()) {
 
  534         JErrorStream(logger) << 
"This process cannot be found in the process list. Why do I exist?";    
 
  537       if (thisProcess != dataFilters.end() && thisProcess->index != 
getName()) {
 
  538         JErrorStream(logger) << 
"Mismatch between given process names: " 
  540                              << 
", but in the process list I am referred to as " << thisProcess->index;
 
  543       if (dataFilters.begin() == thisProcess || dataFilters.empty()) {                    
 
  547       if (maxQueueSize > (totalCPURAM-
GIGABYTE)/(numberOfDataFiltersOnThisMachine)) {     
 
  549         maxQueueSize  =  (totalCPURAM-
GIGABYTE)/(numberOfDataFiltersOnThisMachine);
 
  551         JNoticeStream(logger) << 
"Maximum queue size is too large given the number of processes on this machine. " 
  552                               << 
"Queue size reduced to "  
  553                               << maxQueueSize << 
" bytes." ;  
 
  560         JNoticeStream(logger) << 
"Disabling high-rate veto of all PMTs.";
 
  577         JNoticeStream(logger) << 
"This data filter process will report.";
 
  581         JNoticeStream(logger) << 
"Update period [s]: "    << getClockInterval();
 
  593       if (buildL1.get() == NULL) { 
JErrorStream(logger) << 
"Failed to allocate buildL1."; }
 
  594       if (buildL2.get() == NULL) { 
JErrorStream(logger) << 
"Failed to allocate buildL2."; }
 
  595       if (buildSN.get() == NULL) { 
JErrorStream(logger) << 
"Failed to allocate buildSN."; }
 
  596       if (buildNB.get() == NULL) { 
JErrorStream(logger) << 
"Failed to allocate buildSN."; }
 
  603       if (c_buffer.is_enabled()) {
 
  605         if (!c_buffer.is_open()) {
 
  609           if (c_buffer.is_open()) {
 
  613             JStatusStream(logger) << 
"Created circular buffer " << c_buffer;
 
  617             JErrorStream (logger) << 
"Failed to create circular buffer in directory <" << c_buffer.path << 
">; disable functionality.";
 
  622           JNoticeStream(logger) << 
"Continue using circular buffer " << c_buffer;
 
  626       if (c_buffer.is_open()) {
 
  647       current_slice_index = -1;
 
  652       numberOfTimeslicesProcessed           = 0;
 
  653       numberOfIncompleteTimeslicesProcessed = 0;
 
  655       number_of_packets_received  = 0;
 
  656       number_of_packets_discarded = 0;
 
  657       number_of_bytes_received    = 0;
 
  660       minFrameNumber = numeric_limits<int>::max();
 
  661       maxFrameNumber = numeric_limits<int>::min();
 
  667       logErrorRun       .reset();
 
  668       logErrorDetector  .reset();
 
  669       logErrorIndex     .reset();
 
  670       logErrorIncomplete.reset();
 
  691       if (!timeslices.empty()) {
 
  693         JNoticeStream(logger) << 
"Flushing " << timeslices.size() << 
" slices.";
 
  695         for (deque<JDAQTimesliceL0>::const_iterator i = timeslices.begin(); i != timeslices.end(); ++i) {
 
  704         deque<JDAQTimesliceL0> buffer;
 
  706         timeslices.swap(buffer);
 
  713       current_slice_index = -1;
 
  726     virtual void actionStop(
int length, 
const char* buffer)
 override 
  736       if (serversocket.is_valid()) {
 
  737         serversocket->shutdown();
 
  740       serversocket.reset();
 
  744     virtual void actionQuit(
int length, 
const char* buffer)
 override 
  752       if (serversocket.is_valid()) {
 
  753         mask.
set(*serversocket);
 
  756       for (JChannelList_t::const_iterator channel = channelList.begin(); channel != channelList.end(); ++channel) {      
 
  757         if (!channel->isReady()) {
 
  758           mask.
set(channel->getFileDescriptor());   
 
  768       for (JChannelList_t::iterator channel = channelList.begin(); channel != channelList.end(); ) {
 
  772           if (mask.
has(channel->getFileDescriptor())) {
 
  776           if (channel->isReady()) {
 
  778             number_of_packets_received += 1;
 
  779             number_of_reads            += channel->getCounter();
 
  780             number_of_bytes_received   += channel->size();
 
  784               updateFrameQueue(channel);
 
  788               JErrorStream(logErrorRun) << 
"Receiving data while not running.";
 
  790               number_of_packets_discarded += 1;
 
  798         catch(
const exception& error) {
 
  800           JNoticeStream(logger) << 
"Disconnecting channel " << channel->getFileDescriptor() << 
' ' << error.what(); 
 
  804           channel = channelList.erase(channel);
 
  809       if (serversocket.is_valid()) {
 
  811         if (mask.
has(*serversocket)) {
 
  815           socket.
accept(serversocket->getFileDescriptor());
 
  830       if (!timeslices.empty() && ((timeslices[0].size()      >=  frames_per_slice) ||
 
  831                                   (timeslices.size()         >=  2
u                &&
 
  832                                    timeslices[1].size()      >=  frames_per_slice) ||
 
  833                                   (timeslices.size()         >=  maxQueueDepth)    ||
 
  840         minFrameNumber      = min(minFrameNumber, pending_slice.
getFrameIndex());
 
  841         maxFrameNumber      = max(maxFrameNumber, pending_slice.
getFrameIndex());
 
  843         if (pending_slice.size() > frames_per_slice) {
 
  845           JErrorStream(logger) << 
"More frames in timeslice than expected " 
  846                                << pending_slice.size() << 
" > " << frames_per_slice;
 
  848           if (pending_slice.size() <= maximum_frames_per_slice) { 
 
  850             JErrorStream(logger) << 
"Adjusting expected frames per timeslice to " << pending_slice.size();
 
  852             frames_per_slice = pending_slice.size();
 
  856         if (!pending_slice.empty()) {
 
  860           processTimeSlice(pending_slice);
 
  864           numberOfTimeslicesProcessed += 1;
 
  868           if (pending_slice.size() < frames_per_slice) {
 
  870             numberOfIncompleteTimeslicesProcessed += 1;
 
  874             error << 
"Timeout -> processed incomplete timeslice: "  
  876                   << 
"Size of timeslice = " << pending_slice.size()          << 
';' 
  877                   << 
"Queue depth = "       << timeslices.size()             << 
';' 
  880             if ((timeslices.size()         >=  2
u                &&
 
  881                  timeslices[1].size()      >=  frames_per_slice)) {
 
  883               error << 
" intermittent problem -> continues as-is";
 
  887               error << 
" adjusting expected frames per timeslice from " << frames_per_slice << 
" to " << pending_slice.size();
 
  889               frames_per_slice = pending_slice.size();
 
  896         timeslices.pop_front();
 
  928       if (preamble.getLength() != channel->size()) {
 
  930         JErrorStream(logErrorRun) << 
"Size of received data does not match size reported by preamble: "  
  931                                   << 
"preamble.getLength() = " << preamble.getLength() << 
';' 
  932                                   << 
"channel->size(): "       << channel->size()      << 
';';
 
  934         number_of_packets_discarded += 1;
 
  941         JErrorStream(logErrorRun) << 
"Run number " << header.getRunNumber()
 
  943                                   << 
" -> Dropping frame.";
 
  945         number_of_packets_discarded += 1;
 
  950       if (header.getFrameIndex() <= current_slice_index) {
 
  952         JErrorStream(logErrorIndex) << 
"Frame index " << header.getFrameIndex() << 
" <= " << current_slice_index
 
  953                                     << 
" module "     << header.getModuleID() 
 
  954                                     << 
" -> Dropping frame.";
 
  956         number_of_packets_discarded += 1;
 
  958         if (frames_per_slice < maximum_frames_per_slice) {
 
  962           JErrorStream(logErrorIndex) << 
"Increase number of frames expected to: " << frames_per_slice;
 
  968       if (current_slice_index != -1 && header.getFrameIndex() > current_slice_index + maximal_frame_index) {
 
  970         JErrorStream(logErrorIndex) << 
"Frame index " << header.getFrameIndex() << 
" > " << current_slice_index + maximal_frame_index 
 
  971                                     << 
" module "     << header.getModuleID() 
 
  972                                     << 
" -> Dropping frame.";
 
  974         number_of_packets_discarded += 1;
 
  979       deque<JDAQTimesliceL0>::iterator timesliceIterator = timeslices.begin();
 
  981       while (timesliceIterator != timeslices.end() && timesliceIterator->getFrameIndex() < header.getFrameIndex()) {
 
  985       if (timesliceIterator != timeslices.end() && timesliceIterator->getFrameIndex() == header.getFrameIndex()) {
 
  993         timesliceIterator = timeslices.insert(timesliceIterator, 
JDAQTimesliceL0());
 
  995         timesliceIterator->setDAQChronometer(header.getDAQChronometer());
 
 1002       in >> 
static_cast<JDAQFrame&
>(*(timesliceIterator->rbegin()));
 
 1015       using namespace std;
 
 1019         timesliceRouter->configure(timeslice);
 
 1033             c_buffer.is_enabled()) {
 
 1042           for (JDAQTimesliceL0::const_iterator frame = timeslice.begin(); frame != timeslice.end(); ++frame) {
 
 1044             if (moduleRouter->hasModule(frame->getModuleID())) {
 
 1051                                      << 
"module = "      << frame->getModuleID()      << 
";" 
 1052                                      << 
"discard" << (dumpCount < dumpLimit ? 
" and dump" : 
"");
 
 1054                 timesliceTX.push_back(*frame);
 
 1059               const JModule&   module = moduleRouter->getModule(frame->getModuleID()); 
 
 1060               JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame, module);
 
 1076                 if (buffer.begin() != __end) {
 
 1079                                                         frame->getModuleIdentifier(),
 
 1084                   (*buildL1)(buffer.begin(), __end , back_inserter(zbuf));
 
 1086                   (*buildNB)(buffer.begin() , __end, zbuf, back_inserter(*timesliceNB.rbegin()));
 
 1093                                                     frame->getModuleIdentifier(),
 
 1096               (*buildL1)(*timesliceL0.rbegin(), back_inserter(*timesliceL1.rbegin()));
 
 1101                                                     frame->getModuleIdentifier(),
 
 1104               (*buildL2)(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceL2.rbegin()));
 
 1109                                                     frame->getModuleIdentifier(),
 
 1112               (*buildSN)(buffer, *timesliceL1.rbegin(), back_inserter(*timesliceSN.rbegin()));
 
 1116               JErrorStream(logErrorDetector) << 
"No detector information for module " << frame->getModuleID(); 
 
 1120           if (!timesliceTX.empty()) {
 
 1122             if (dumpCount < dumpLimit) {
 
 1124               this->put(timesliceTX);
 
 1136             for (JTriggerInput::const_iterator hit = trigger_input.begin(); hit != trigger_input.end(); ++hit) {
 
 1157           (*trigger3DMuon)  (trigger_input, back_inserter(trigger_output));
 
 1158           (*trigger3DShower)(trigger_input, back_inserter(trigger_output));
 
 1159           (*triggerMXShower)(trigger_input, timesliceL0, back_inserter(trigger_output));
 
 1163           for (JTriggerOutput::const_iterator event = trigger_output.begin(); 
event != trigger_output.end(); ++event) {
 
 1169             numberOfEvents += 1;
 
 1172           if (
parameters.writeL1() || c_buffer.sizeL1 > 0) {
 
 1176             if (
parameters.writeL1)  { this->put(
object);  }
 
 1177             if (c_buffer.sizeL1 > 0) { c_buffer.put(
object); }
 
 1180           if (
parameters.writeL2() || c_buffer.sizeL2 > 0) {
 
 1184             if (
parameters.writeL2)  { this->put(
object); }
 
 1185             if (c_buffer.sizeL2 > 0) { c_buffer.put(
object); }
 
 1188           if (
parameters.writeSN() || c_buffer.sizeSN > 0) {
 
 1192             if (
parameters.writeSN)  { this->put(
object); }
 
 1193             if (c_buffer.sizeSN > 0) { c_buffer.put(
object); }
 
 1196           if (
parameters.writeL0() || c_buffer.sizeL0 > 0) {
 
 1198             if (
parameters.writeL0)  { this->put(timeslice); }
 
 1199             if (c_buffer.sizeL0 > 0) { c_buffer.put(timeslice); }
 
 1203       } 
catch(
const exception& error) {
 
 1205         JErrorStream(logger) << 
"Error = "       << error.what()              << 
";" 
 1208                              << 
"time slice not correctly processed;" 
 1209                              << 
"discard" << (dumpCount < dumpLimit ? 
" and dump" : 
"");
 
 1211         if (dumpCount < dumpLimit) {
 
 1213           this->put(static_cast<const JDAQTimeslice&>(timeslice));
 
 1219       timesliceRouter->reset();
 
 1230       const double T_us = (double) timer.usec_wall;
 
 1232       JStatusStream(logger) << 
"Elapsed real (wall) time [s] "          << T_us / 1e6;
 
 1233       JStatusStream(logger) << 
"Elapsed user CPU time [s] "             << (double) timer.usec_ucpu/ 1e6;
 
 1234       JStatusStream(logger) << 
"Elapsed system CPU time [s] "           << (double) timer.usec_scpu/ 1e6;
 
 1236         JStatusStream(logger) << 
"Elapsed real time per time slice [ms] " << Qt.getMean() * 1.0e-3  << 
" +/- " << Qt.getDeviation() * 1.0e-3;
 
 1238       catch(
const std::exception&) {}
 
 1239       JStatusStream(logger) << 
"Number of packets received/discarded "  << number_of_packets_received << 
"/" << number_of_packets_discarded;
 
 1240       JStatusStream(logger) << 
"Number of events/MB sent "              << numberOfEvents             << 
"/" << numberOfBytes/1e6;
 
 1242       if (number_of_packets_received > 0) {
 
 1243         JStatusStream(logger) << 
"Number of reads/packet " << (double) number_of_reads / (
double) number_of_packets_received;
 
 1247       JStatusStream(logger) << 
"Current number of frames per slice expected: " << frames_per_slice;
 
 1249       JStatusStream(logger) << 
"Number of timeslices processed total/incomplete " << numberOfTimeslicesProcessed << 
"/" << numberOfIncompleteTimeslicesProcessed;
 
 1251       if (numberOfTimeslicesProcessed > 0) {
 
 1252         JStatusStream(logger) << 
"Real time per timeslice [ms] "       << timer.usec_wall / 1000 / numberOfTimeslicesProcessed;
 
 1253         JStatusStream(logger) << 
"User CPU  time per timeslice [ms] "  << timer.usec_ucpu / 1000 / numberOfTimeslicesProcessed;
 
 1254         JStatusStream(logger) << 
"System CPU time per timeslice [ms] " << timer.usec_scpu / 1000 / numberOfTimeslicesProcessed;
 
 1257       const double processedSlicesTime_us   =  numberOfTimeslicesProcessed      * 
getFrameTime() / 1000;
 
 1258       const double processedDetectorTime_us = (maxFrameNumber - minFrameNumber) * 
getFrameTime() / 1000;
 
 1260       if (processedSlicesTime_us   > 0) {
 
 1261         JStatusStream(logger) << 
"Performance factor (inaccurate estimate): "                << T_us / processedSlicesTime_us;
 
 1263       if (processedDetectorTime_us > 0) {
 
 1264         JStatusStream(logger) << 
"Performance factor whole detector (inaccurate estimate): " << T_us / processedDetectorTime_us;
 
 1280       using namespace std;
 
 1286         if (c_buffer.is_open()) {
 
 1288           JStatusStream(logger) << 
"Archive circular buffer in <" << c_buffer.archive << 
">";
 
 1290           c_buffer.close(
true);
 
 1293         if (c_buffer.is_enabled()) {
 
 1297           if (c_buffer.is_open()) {
 
 1299             JStatusStream(logger) << 
"Created circular buffer " << c_buffer;
 
 1305             JErrorStream (logger) << 
"Failed to create circular buffer in directory <" << c_buffer.path << 
">; disable functionality.";
 
 1335         datawriter->put(
object);
 
 1339       catch(
const std::exception& error) {
 
 1340         JErrorStream(logger) << 
"Error \"" << error.what() << 
"\"; trigger ev_error.";
 
 1434   using namespace std;
 
 1435   using namespace JPP;
 
 1436   using namespace KM3NETDAQ;
 
 1453     JParser<> zap(
"Application for real-time filtering of data.");
 
 1455     zap[
'H'] = 
make_field(server,      
"host name of server for command messages")               = 
"localhost";
 
 1456     zap[
'M'] = 
make_field(logger,      
"host name of server for logger messages")                = 
"localhost";
 
 1457     zap[
'D'] = 
make_field(hostname,    
"host name of server of data writer")                     = 
"";
 
 1458     zap[
'u'] = 
make_field(client_name, 
"client name")                                            = 
"%";
 
 1459     zap[
'P'] = 
make_field(port,        
"port to listen for incoming data from data queue");
 
 1460     zap[
'q'] = 
make_field(backlog,     
"back log")                                               =   1024;
 
 1462     zap[
'c'] = 
make_field(use_cout,    
"print to terminal");
 
 1463     zap[
'p'] = 
make_field(
path,        
"directory for temporary storage of circular buffer")     = 
"/tmp/";
 
 1464     zap[
'A'] = 
make_field(archive,     
"directory for permanent archival of circular buffer")    = 
"/tmp/";
 
 1469   catch(
const exception& error) {
 
 1470     FATAL(error.what() << endl);
 
virtual void actionRunning() override
This method is repeatedly called when this client machine is in state Running and the clock interval ...
 
Exception for opening of file. 
 
Message logger with time scheduler. 
 
static bool compare(const JDAQProcess &first, const JDAQProcess &second)
Sort DAQ process by index. 
 
Utility class to parse command line options. 
 
void processTimeSlice(const JDAQTimesliceL0 ×lice)
Process time slice. 
 
int getSizeOfPacket(const KM3NETDAQ::JDAQAbstractPreamble &preamble)
Get size of packeet. 
 
bool read(const JEquation &equation)
Read equation. 
 
JTriggerMask_t getTriggerMask(const unsigned int bit)
Convert trigger bit to trigger mask. 
 
int main(int argc, char *argv[])
 
void close(const bool option)
Close file. 
 
ROOT TTree parameter settings of various packages. 
 
Data structure for a composite optical module. 
 
JSinglePointer< JTriggerNB > triggerNB
 
Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the op...
 
long long int numberOfTimeslicesProcessed
 
JBuildL2< hit_type > JBuildL2_t
 
Message logging based on std::ostream. 
 
std::deque< JDAQTimesliceL0 > timeslices
buffer with pending time slice data 
 
bool has(const int file_descriptor) const 
Has file descriptor. 
 
void set(const int file_descriptor)
Set file descriptor. 
 
JMessageScheduler logErrorIndex
 
JSuperFrame2D< hit_type > JSuperFrame2D_t
 
JSocketInputChannel< JDAQAbstractPreamble > JSocketInputChannel_t
 
Long64_t sizeL1
Number of L1 time slices. 
 
JTag getUniqueTag(const std::string &hostname, const std::string &name)
Get unique tag of run control client. 
 
static const JNET::JTag RC_DFILTER
 
Router for direct addressing of module data in detector data structure. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
Interface for logging messages. 
 
Message logging based on ControlHost. 
 
then echo Enter input within $TIMEOUT_S seconds echo n User name
 
Utility class to parse parameter values. 
 
JSinglePointer< JServerSocket > serversocket
server for data queue connections 
 
static const int HIGH_RATE_VETO_DISABLE
Enable (disable) use of high-rate veto test if this status bit is 0 (1);. 
 
unsigned int maximum_frames_per_slice
 
ROOT TTree object output. 
 
JMessageScheduler logErrorIncomplete
 
*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). 
 
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
 
static const JNET::JTag IO_TRIGGER_PARAMETERS
 
JTriggerParameters parameters
 
Main class for real-time filtering of data. 
 
void run()
Run as run control client following command messages via JNET::JControlHost. 
 
std::string getFullPath(const std::string &path)
Get full path, i.e. add JEEP::PATHNAME_SEPARATOR if necessary. 
 
Basic data structure for time and time over threshold information of hit. 
 
long long int number_of_packets_discarded
 
int getRunNumber() const 
Get run number. 
 
Data structure for detector geometry and calibration. 
 
T * open(const std::string &file_name)
Open file. 
 
Utility class to parse parameter values. 
 
static const JChecksum checksum
Function object to perform check-sum of raw data. 
 
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
 
JCircularBuffer_t(const std::string &path, const std::string &archive, const JTag &tag)
Constructor. 
 
std::string path
Directory for temporary storage. 
 
void disable()
Disable writing. 
 
int getFrameIndex() const 
Get frame index. 
 
JBuildL1< hit_type > JBuildL1_t
 
1-dimensional frame with time calibrated data from one optical module. 
 
JCircularBuffer_t c_buffer
 
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event. 
 
void typeout()
Report status to message logger. 
 
bool is_enabled() const 
Check whether writing of data is enabled. 
 
Basic data structure for L0 hit. 
 
std::string index
index in process list 
 
JSuperFrame1D< hit_type > JSuperFrame1D_t
 
std::string trim(const std::string &buffer)
Trim string. 
 
JSinglePointer< JBuildL2_t > buildL2
 
int getLength() const 
Get length. 
 
JSinglePointer< JTriggerMXShower > triggerMXShower
 
JSinglePointer< JBuildL1_t > buildL1
 
int getFileDescriptor() const 
Get file descriptor. 
 
long long int totalCPURAM
 
JTimeslice< hit_type > JTimeslice_t
 
JSinglePointer< JTrigger3DShower > trigger3DShower
 
Scheduling of actions via fixed latency intervals. 
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DIR $JPP_DIR examples JPhysics set_variable DEBUG set_variable darkcount_Hz set_variable rateL0_Hz set_array rateL1_Hz if do_usage *then usage $script[working directory] fi function typeout()
 
TFile * getFile(const std::string &file_name, const std::string &option="exist")
Get TFile pointer corresponding to give file name. 
 
I/O formatting auxiliaries. 
 
void accept(const int server)
Accept connection from a server. 
 
virtual void actionContinue(int length, const char *buffer) override
 
long long int numberOfBytes
 
Auxiliary class for itemization of process list. 
 
std::vector< JDAQProcess > dataFilters
 
void merge(const JMatch_t &match)
Merge events. 
 
std::vector< JSocketInputChannel_t > JChannelList_t
 
friend std::ostream & operator<<(std::ostream &out, const JCircularBuffer_t &object)
Write circular buffer to output stream. 
 
static const JLocalTime getLocalTime
Function object to get local time in micro seconds. 
 
event< ev_daq > ev_configure
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
void close(std::istream *pf)
Close file. 
 
double getFrameTime()
Get frame time duration. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
int getRunNumber(const std::string &file_name)
Get run number for given file name of data taking run. 
 
JMessageScheduler logErrorDetector
 
static const size_t buffer_size
 
Auxiliary class for method select. 
 
void put(const T &object)
Auxiliary method to send object to data server. 
 
JSinglePointer< JBuildL2_t > buildSN
 
const JDAQChronometer & getDAQChronometer() const 
Get DAQ chronometer. 
 
long long int numberOfIncompleteTimeslicesProcessed
 
static struct JACOUSTICS::@4 compare
Auxiliary data structure to sort transmissions. 
 
Auxiliary class to build JDAQEvent for a triggered event. 
 
void updateFrameQueue(const JChannelList_t::const_iterator channel)
Update queue with data frames. 
 
JTreeWriter object output. 
 
JSinglePointer< JBuildL2_t > buildNB
 
virtual void actionEnter() override
Interface methods for actions corresponding to state transitions. 
 
JTag tag
Unique tag of this process. 
 
Level specific message streamers. 
 
long long int number_of_packets_received
 
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DQSIM<$WORKDIR/ev_configure_dqsimulator.txt > RC_DWRT path
 
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory. 
 
static const long long int MEGABYTE
Number of bytes in a kilo-byte. 
 
const JPosition3D & getPosition() const 
Get position. 
 
Simple data structure for the DAQ preamble required for a correct calculation of the object size for ...
 
virtual void actionQuit(int length, const char *buffer) override
 
Long64_t sizeSN
Number of SN time slices. 
 
Auxiliary class for all subscription. 
 
int port
server socket port 
 
static void reset()
Reset counter of unique instance of this class object. 
 
General purpose messaging. 
 
Auxiliary data structure for sequence of same character. 
 
long long int localtime_t
Type definition of local time. 
 
void setReceiveBufferSize(const int size)
Set receive buffer size. 
 
std::string hostname
host name of data server 
 
unsigned int maxQueueDepth
 
JControlHostObjectOutput< JDAQTypes_t > JControlHost_t
 
static JStat getFileStatus
Function object for file status. 
 
std::vector< JDAQProcess > dataQueues
 
long long int maxQueueSize
 
virtual void actionStart(int length, const char *buffer) override
 
std::string toString() const 
Convert tag to string. 
 
std::vector< value_type >::iterator iterator
 
virtual void actionReset(int length, const char *buffer) override
 
virtual void actionExit() override
 
JSinglePointer< JTimesliceRouter > timesliceRouter
 
static const long long int GIGABYTE
Number of bytes in a mega-byte. 
 
Auxiliary class to build JDAQTimeslice for L1 timeslice. 
 
JChannelList_t channelList
connections to data queue 
 
Control unit client base class. 
 
Auxiliary class for date and time. 
 
Utility class to parse command line options. 
 
static const JNET::JTag RC_ALERT
 
Implemenation of object output through ControlHost. 
 
virtual void actionSelect(const JFileDescriptorMask &mask) override
Action method following last select call. 
 
void applyHighRateVeto(const double rate_Hz)
Apply high-rate veto. 
 
std::vector< std::string > getListOfIPaddresses()
Get list of IP address (decimal-dot notation). 
 
unsigned long long int getRAM()
Get RAM of this CPU. 
 
Long64_t sizeL0
Number of L0 time slices. 
 
JSinglePointer< JTrigger3DMuon > trigger3DMuon
 
JSinglePointer< JControlHost_t > datawriter
controlhost of data server (to which data writer should be connected) 
 
double getMaximalDistance(const JDetector &detector, const bool option=false)
Get maximal distance between modules in detector. 
 
JMessageScheduler logErrorRun
 
virtual bool enter(const JArgs &args)
Enter the state machine. 
 
virtual void actionTagged(const JTag &tag, int length, const char *buffer) override
Tagged action to handle alerts. 
 
JSinglePointer< JModuleRouter > moduleRouter
 
JDataFilter(const std::string &name, const std::string &server, const std::string &hostname, JLogger *logger, const int level, const int port, const int backlog, const int buffer_size, const std::string &path, const std::string &archive)
Constructor. 
 
2-dimensional frame with time calibrated data from one optical module. 
 
void setNonBlocking(const bool on)
Set non-blocking of I/O. 
 
JSocketInputChannel< JPrefix_t > JSocketInputChannel_t
 
const char * getName()
Get ROOT name of given data type. 
 
static const JNET::JTag RC_CMD
 
void setKeepAlive(const bool on)
Set keep alive of socket. 
 
long long int number_of_bytes_received
 
virtual void actionStop(int length, const char *buffer) override
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
KM3NeT DAQ constants, bit handling, etc. 
 
virtual void actionInit(int length, const char *buffer) override
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
Match of two events considering overlap in time. 
 
size_t getSizeof(const JDAQEvent &object)
Get size of object. 
 
virtual void actionPause(int length, const char *buffer) override
 
Hostname and IP address functions. 
 
Long64_t sizeL2
Number of L2 time slices. 
 
Data frame of one optical module. 
 
long long int number_of_reads
 
long long int numberOfEvents
 
unsigned int frames_per_slice
 
Timeslice data structure for L0 data. 
 
Basic data structure for L1 hit. 
 
std::string archive
Directory for permanent archival. 
 
virtual void setSelect(JFileDescriptorMask &mask) const override
Set the file descriptor mask for the select call. 
 
virtual void actionConfigure(int length, const char *buffer) override
 
Time slice with calibrated data.