mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Cleanup examples
This commit is contained in:
committed by
Mohammad Al-Turany
parent
edcc7a4ee3
commit
622a11a32d
@@ -2,6 +2,6 @@
|
||||
# source setup.sh
|
||||
@bash_end@
|
||||
|
||||
sampler, username@localhost, , /path/to/dds-work-dir/, 1
|
||||
processor, username@localhost, , /path/to/dds-work-dir/, 10
|
||||
sink, username@localhost, , /path/to/dds-work-dir/, 1
|
||||
sampler, orybalch@localhost, , /home/orybalch/dds-work/, 1
|
||||
processor, orybalch@localhost, , /home/orybalch/dds-work/, 10
|
||||
sink, orybalch@localhost, , /home/orybalch/dds-work/, 1
|
||||
|
@@ -17,23 +17,18 @@
|
||||
#include "FairMQProgOptions.h"
|
||||
#include "FairMQExample3Processor.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace boost::program_options;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
FairMQExample3Processor processor;
|
||||
processor.CatchSignals();
|
||||
|
||||
FairMQProgOptions config;
|
||||
|
||||
try
|
||||
{
|
||||
FairMQProgOptions config;
|
||||
if (config.ParseAll(argc, argv))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
FairMQExample3Processor processor;
|
||||
processor.CatchSignals();
|
||||
processor.SetConfig(config);
|
||||
|
||||
processor.ChangeState("INIT_DEVICE");
|
||||
@@ -45,11 +40,10 @@ int main(int argc, char** argv)
|
||||
|
||||
runDDSStateHandler(processor);
|
||||
}
|
||||
catch (exception& e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(ERROR) << e.what();
|
||||
LOG(INFO) << "Command line options are the following: ";
|
||||
config.PrintHelp();
|
||||
LOG(ERROR) << "Unhandled Exception reached the top of main: "
|
||||
<< e.what() << ", application will now exit";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -17,23 +17,18 @@
|
||||
#include "FairMQProgOptions.h"
|
||||
#include "FairMQExample3Sampler.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace boost::program_options;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
FairMQExample3Sampler sampler;
|
||||
sampler.CatchSignals();
|
||||
|
||||
FairMQProgOptions config;
|
||||
|
||||
try
|
||||
{
|
||||
FairMQProgOptions config;
|
||||
if (config.ParseAll(argc, argv))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
FairMQExample3Sampler sampler;
|
||||
sampler.CatchSignals();
|
||||
sampler.SetConfig(config);
|
||||
|
||||
sampler.ChangeState("INIT_DEVICE");
|
||||
@@ -45,11 +40,10 @@ int main(int argc, char** argv)
|
||||
|
||||
runDDSStateHandler(sampler);
|
||||
}
|
||||
catch (exception& e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(ERROR) << e.what();
|
||||
LOG(INFO) << "Command line options are the following: ";
|
||||
config.PrintHelp();
|
||||
LOG(ERROR) << "Unhandled Exception reached the top of main: "
|
||||
<< e.what() << ", application will now exit";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@@ -17,23 +17,18 @@
|
||||
#include "FairMQProgOptions.h"
|
||||
#include "FairMQExample3Sink.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace boost::program_options;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
FairMQExample3Sink sink;
|
||||
sink.CatchSignals();
|
||||
|
||||
FairMQProgOptions config;
|
||||
|
||||
try
|
||||
{
|
||||
FairMQProgOptions config;
|
||||
if (config.ParseAll(argc, argv))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
FairMQExample3Sink sink;
|
||||
sink.CatchSignals();
|
||||
sink.SetConfig(config);
|
||||
|
||||
sink.ChangeState("INIT_DEVICE");
|
||||
@@ -45,11 +40,10 @@ int main(int argc, char** argv)
|
||||
|
||||
runDDSStateHandler(sink);
|
||||
}
|
||||
catch (exception& e)
|
||||
catch (std::exception& e)
|
||||
{
|
||||
LOG(ERROR) << e.what();
|
||||
LOG(INFO) << "Command line options are the following: ";
|
||||
config.PrintHelp();
|
||||
LOG(ERROR) << "Unhandled Exception reached the top of main: "
|
||||
<< e.what() << ", application will now exit";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user