Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Typedefs | Functions
JDataFilter.cc File Reference

Application for real-time filtering of data. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <list>
#include <limits>
#include <algorithm>
#include "JLang/JSinglePointer.hh"
#include "JLang/JLangToolkit.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JProperties.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JTimekeeper.hh"
#include "Jeep/JMessage.hh"
#include "JLogger/JMessageScheduler.hh"
#include "JDAQ/JDAQ.hh"
#include "JDAQ/JDAQTags.hh"
#include "JDAQ/JDAQEvent.hh"
#include "JDAQ/JDAQTimeslice.hh"
#include "JDAQ/JDAQAbstractPreamble.hh"
#include "JDAQ/JDAQPreamble.hh"
#include "JDAQ/JDAQSuperFrame.hh"
#include "JDAQ/JDAQFrame.hh"
#include "JDAQ/JDAQSummaryslice.hh"
#include "JTrigger/JHit.hh"
#include "JTrigger/JHitToolkit.hh"
#include "JTrigger/JSuperFrame1D.hh"
#include "JTrigger/JSuperFrame2D.hh"
#include "JTrigger/JTimeslice.hh"
#include "JTrigger/JHitL0.hh"
#include "JTrigger/JHitL1.hh"
#include "JTrigger/JBuildL1.hh"
#include "JTrigger/JBuildL2.hh"
#include "JTrigger/JTrigger3DShower.hh"
#include "JTrigger/JTriggerMXShower.hh"
#include "JTrigger/JTrigger3DMuon.hh"
#include "JTrigger/JTriggerBits.hh"
#include "JTrigger/JEventOverlap.hh"
#include "JTrigger/JTimesliceRouter.hh"
#include "JTrigger/JTriggeredEvent.hh"
#include "JTrigger/JTimesliceL1.hh"
#include "JTrigger/JTriggerParameters.hh"
#include "JTrigger/JTriggerToolkit.hh"
#include "JRuncontrol/JDAQClient.hh"
#include "JRuncontrol/JRuncontrolToolkit.hh"
#include "JNet/JControlHost.hh"
#include "JNet/JControlHostObjectOutput.hh"
#include "JNet/JSocket.hh"
#include "JNet/JSocketChannel.hh"
#include "JNet/JServerSocket.hh"
#include "JTools/JConstants.hh"
#include "JSupport/JSupport.hh"
#include "JSystem/JSystemToolkit.hh"
#include "JSystem/JNetwork.hh"

Go to the source code of this file.

Classes

class  JDataFilter
 

Namespaces

 JNET
 Interprocess communication.
 

Typedefs

typedef
JNET::JSocketInputChannel
< KM3NETDAQ::JDAQAbstractPreamble
JSocketInputChannel_t
 
typedef std::vector
< JSocketInputChannel_t
JChannelList_t
 
typedef double hit_type
 
typedef vector< hit_typeJFrameL1_t
 
typedef JSuperFrame1D< hit_typeJSuperFrame1D_t
 
typedef JSuperFrame2D< hit_typeJSuperFrame2D_t
 
typedef JTimeslice< hit_typeJTimeslice_t
 
typedef JBuildL1< hit_typeJBuildL1_t
 
typedef JBuildL2< hit_typeJBuildL2_t
 

Functions

bool processIndexSorter (const JDAQProcess &a, const JDAQProcess &b)
 
template<>
int JNET::getSizeOfPacket (const KM3NETDAQ::JDAQAbstractPreamble &preamble)
 
int main (int argc, char *argv[])
 

Detailed Description

Application for real-time filtering of data.

Author
rbruijn

Definition in file JDataFilter.cc.

Typedef Documentation

Definition at line 87 of file JDataFilter.cc.

Definition at line 88 of file JDataFilter.cc.

typedef double hit_type

Definition at line 89 of file JDataFilter.cc.

Definition at line 91 of file JDataFilter.cc.

Definition at line 92 of file JDataFilter.cc.

Definition at line 93 of file JDataFilter.cc.

Definition at line 94 of file JDataFilter.cc.

Definition at line 95 of file JDataFilter.cc.

Definition at line 96 of file JDataFilter.cc.

Function Documentation

bool processIndexSorter ( const JDAQProcess a,
const JDAQProcess b 
)

Definition at line 73 of file JDataFilter.cc.

74 {
75  return a.index<b.index;
76 }
std::string index
index in process list
int main ( int  argc,
char *  argv[] 
)

Definition at line 957 of file JDataFilter.cc.

958 {
959  using namespace std;
960 
961  string server;
962  string logger;
963  string hostname;
964  string client_name;
965  int port;
966  int backlog;
967  int buffer_size;
968  bool use_cout;
969  int debug;
970 
971 
972  try {
973 
974  JParser<> zap("Application for real-time filtering of data.");
975 
976  zap['H'] = make_field(server) = "localhost";
977  zap['M'] = make_field(logger) = "localhost";
978  zap['D'] = make_field(hostname) = "";
979  zap['u'] = make_field(client_name) = "JDataFilter";
980  zap['P'] = make_field(port);
981  zap['q'] = make_field(backlog) = 1024;
982  zap['s'] = make_field(buffer_size) = 8*1024*1024; // TCP buffer of 8 MB
983  zap['c'] = make_field(use_cout);
984  zap['d'] = make_field(debug) = 0;
985 
986  zap(argc, argv);
987  }
988  catch(const exception& error) {
989  FATAL(error.what() << endl);
990  }
991 
992 
993  JLogger* out = NULL;
994 
995  if (use_cout)
996  out = new JStreamLogger(cout);
997  else
998  out = new JControlHostLogger(logger);
999 
1000  JDataFilter dfilter(client_name,
1001  server,
1002  hostname,
1003  out,
1004  debug,
1005  port,
1006  backlog,
1007  buffer_size);
1008 
1009  dfilter.enter();
1010  dfilter.run();
1011 }
Utility class to parse command line options.
Definition: JParser.hh:1410
Message logging based on std::ostream.
Interface for logging messages.
Definition: JLogger.hh:22
Message logging based on ControlHost.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1836
static const size_t buffer_size
int debug
debug level
Definition: JSirene.cc:59
#define FATAL(A)
Definition: JMessage.hh:65