Commit Graph

320 Commits

Author SHA1 Message Date
NicolasWinckler
3a7175f8e8 add lmd sampler-unpacker-sink chain in example/MQ/lmdSampler 2015-11-04 11:03:11 +01:00
NicolasWinckler
323033c9eb Add CRTP base class for the policies of the generic device 2015-11-04 11:02:32 +01:00
NicolasWinckler
559c7babca add doc for the generic devices 2015-11-04 11:02:11 +01:00
NicolasWinckler
fe91aa1634 add typedef for policies in host class, and make the sampler task container optional. 2015-11-04 11:02:10 +01:00
NicolasWinckler
946f1c9d00 add doc for the tutorial7 and the generic device 2015-11-04 11:01:40 +01:00
Alexey Rybalchenko
daba1771fa Fix return values of nanomsg send/receive calls 2015-11-03 16:07:15 +01:00
Alexey Rybalchenko
4be6ba6e66 Check return values of Receive calls in the examples 2015-11-03 16:07:15 +01:00
Alexey Rybalchenko
6dc4dc84b3 Add proper return value in set timeout 2015-11-03 16:07:15 +01:00
Alexey Rybalchenko
ada23500be Return if an unknown exception has been cought in Channel 2015-11-03 16:07:15 +01:00
Mohammad Al-Turany
d52d7d4ebc Merge branch 'sink-io-threads' of https://github.com/rbx/FairRoot into rbx-sink-io-threads 2015-11-02 19:54:36 +01:00
Giulio Eulisse
7ee479084c Add missing return statement 2015-11-02 16:56:28 +01:00
Alexey Rybalchenko
6000e86e74 Remove redundant io-threads cmd option from Sink 2015-11-02 09:27:12 +01:00
Florian Uhlig
af70d03ab0 Add missing include directories for ZeroMQ and NanoMsg. They have been found by chance when the packages are in SIMPATH. They are not found if they are in another path. 2015-10-21 17:12:04 +02:00
Alexey Rybalchenko
8f59db1283 Add methods to set timeout on blocking Send/Receive 2015-10-19 09:52:53 +02:00
Alexey Rybalchenko
91d3f013c0 Fix setting of ZeroMQ I/O Threads (setting was not propagated before) 2015-10-12 13:51:09 +02:00
Alexey Rybalchenko
023d88d0ef Add FairMQ Example 6 - Working with multiple channels 2015-10-07 16:46:10 +02:00
Alexey Rybalchenko
0b11ad9274 Fix the type mismatch in the multi-channel poller 2015-10-07 16:46:09 +02:00
Alexey Rybalchenko
19afacb504 FairMQ Examples cleanup
- Rename Tutorial3 MQ files for uniform naming.
  - Add search for dylib in FindDDS.cmake (OSX).
  - Add more detail to the DDS example readme.
  - MQ Example 3 (DDS): choose network interface via command line option.
  - Give FairMQ examples their own CMakeLists.txt for clarity.
  - Remove C++11 checks in Tutorial3 from the code (they are now in CMake).
  - Add Serializer for device properties (FairMQDevice::ListProperties()).
2015-10-05 18:06:55 +02:00
winckler
a75486f3ec * split log console output sink into two sinks, one for cout and one for cerr.
* remove logger_oldboost_version files and add ifdef boost version in logger.cxx instead

* change default logger level in FairMqProgOptions
2015-09-29 17:51:14 +02:00
Alexey Rybalchenko
54e1777c00 Small adjustments for the new logger.
Both FairMQLogger and FairMQStateMachine use Boost Fusion internaly.
Because the state machine needs FUSION_MAX_VECTOR_SIZE 20 defined,
same value has to be defined in the logger, otherwise Fusion is not
properly compiled.
2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
5136c88d3a Simplify Tutorial3 structure.
Use same executable for bin/boost/protobuf/root data format,
configured now via `--data-format <binary/boost/protobuf/tmessage>`
command line parameter.
2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
8b71e4d20b Use FairMQDevice::CatchSignals for Tutorial7 2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
dc6fb4698c Fix bug in nanomsg implementation of poller check. 2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
35ff6c8fc8 Fix a bug in nanomsg implementation when sending empty messages. 2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
f13bb5995d Add FairMQ tests (PUB-SUB, PUSH-PULL, REQ-REP). 2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
fbf7dbf2ba Add orthogonal OK/ERROR states.
Replace state check mutex with atomic.

Update DDS example documentation.
2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
a7ab33a10e Add new Send/Receive methods with smart pointers and no flag checks. 2015-09-28 12:17:24 +02:00
Alexey Rybalchenko
105e734808 Add DDS and Copy+Push examples. 2015-09-28 12:17:24 +02:00
winckler
96cd2afac7 fix missing header issue in fairmq/logger 2015-09-28 12:17:24 +02:00
winckler
5212dd4ce1 move back the empty deleter in the logger.cxx 2015-09-28 12:17:23 +02:00
winckler
a0388c084e remove boost and tutorial7 -Wshadow warnings and install null deleter file in FairRoot installation 2015-09-28 12:17:23 +02:00
winckler
ca7a76110d add an other fairmq logger implementation in case boost version < 1.56 for backward compability 2015-09-28 12:17:23 +02:00
Alexey Rybalchenko
74f7c5873a Fix the logger installation 2015-09-28 12:17:23 +02:00
winckler
e0ca1f62b3 - Replace the fairmq logger with one based on Boost.Log
- Adapt FairProgOptions to the new logger
2015-09-28 12:17:23 +02:00
Florian Uhlig
bea05ea6c1 Add missing include statement. 2015-09-28 12:17:22 +02:00
Alexey Rybalchenko
1302e77a16 Several FairMQ fixes and improvements:
- FairMQ: add possibility to poll on multiple channels.
- FairMQ: include command channel when polling on blocking calls (for unblocking without termination).
- FairMQ: move signal handler inside of FairMQDevice class (call FairMQDevice::CatchSignals() in the main function).
- FairMQ: add 'bool CheckCurrentState(statename)' (instead of 'GetCurrentState() == statename' that cannot be thread safe).
- FairMQDevice: add 'InteractiveStateLoop()' method that can be used to change states from the command line.
- FairMQDevice: add automatic transition to IDLE state if Run() exits without an external event.
- FairMQDevice: implement device reset.
- FairMQDevice: use unordered_map for device channels.
- FairMQChannel: improve address validation for channels.
- FairMQChannel: add ExpectsAnotherPart() method to check if another msg part is expected (old approach still works).
- FairMQ: remove invalid transition from the run files.
- FairMQFileSink: disable ROOT termination signal handler.
- Tutorial3: spawn xterm windows from start scripts without overlapping for better visibility.
- FairMQ Examples: update protobuf test and move its files to a common directory.
- FairMQStateMachine: improve feedback on invalid transitions (more readable).
2015-09-28 12:17:22 +02:00
winckler
d1bba61939 - FairMQ options:
a) move the XML parser into the FairMQ/options/FairMQParser.h
b) add a routine in FairMQProgOption to check whether the necessary XML or JSON input files are there, and send an error message if not there

- Policy based devices:
a) rename GenericSampler to base_GenericSampler and use an alias template named GenericSampler
b) in base_GenericSampler, rename template parameter to simple variables <T,U,… > and use typedef for clarity
c) introduce an anonymous function container in the base_GenericSampler host class with a register task template member function and an Executetasks()
d) add two new template parameters in base_GenericSampler for the anonymous function container map. parameter is K for the key type (default=int) and L for the value type (default=std::function<void()>)

- Tutorial7:
a) use FairMQProgOption to configure devices in tutorial7
b) introduce several template functions helper in tutorial7 to reduce code redundancy
c) show examples in tutorial7 of task registration with callback and lambda expression for the sampler devices
d) separate the executable build of the tutorial7 data generator to remove the Roofit banner when executing the MQdevices
2015-09-28 12:17:21 +02:00
Alexey Rybalchenko
6ed9cc3da1 Fixed a typo in example config 2015-06-30 16:48:36 +02:00
winckler
b855f77060 - fix coverity issues
- clean code and typo in comments
2015-06-26 18:04:10 +02:00
Alexey Rybalchenko
4db91a52eb Fix Coverity issues 2015-06-26 18:01:40 +02:00
Alexey Rybalchenko
2656d8098c Add first two simple FairMQ examples
fairmq/examples/1-sampler-sink
fairmq/examples/2-sampler-processor-sink
2015-06-22 16:35:00 +02:00
Alexey Rybalchenko
5f20a28b04 Correct mistake in channel validation 2015-06-19 14:49:32 +02:00
Alexey Rybalchenko
252acf41c8 Add WaitForInitialValidation() 2015-06-19 12:33:10 +02:00
Alexey Rybalchenko
e5313d03fe Fix uncaught exceptions 2015-06-19 12:33:06 +02:00
Alexey Rybalchenko
d6a413534a Thread safe initialization of the channels 2015-06-19 12:32:56 +02:00
Alexey Rybalchenko
295d9bba57 add WaitForEndOfStateForMs(state, duration) 2015-06-17 16:01:11 +02:00
Mohammad Al-Turany
6cd1e53b13 Add missing license information 2015-06-16 15:31:23 +02:00
Alexey Rybalchenko
a3d919b763 Use FairMQProgOptions for Sink and BenchmarkSampler 2015-06-16 12:43:23 +02:00
Alexey Rybalchenko
7fda980710 Update FairMQStateMachine & introduce FairMQChannels
Organize sockets as a map of vectors of FairMQChannels.

Update FairMQStateMachine by removing SETTINGINPUT, SETTINGOUTPUT,
BIND and CONNECT states and by adding INITIALIZING_TASK, RESETTING_TASK
and RESETTING_DEVICE states. Run states functions in their own thread.
2015-06-16 09:29:53 +02:00
winckler
a2ebbbe450 move fairmq json parser to fairmq/options 2015-06-15 15:59:12 +02:00