Remove useless code

This commit is contained in:
Alexey Rybalchenko
2021-05-28 12:44:27 +02:00
committed by Dennis Klein
parent 882edbbdb8
commit 3c4158addb
38 changed files with 51 additions and 158 deletions

View File

@@ -29,16 +29,13 @@ struct TFBuffer
chrono::steady_clock::time_point end;
};
class Receiver : public FairMQDevice
struct Receiver : fair::mq::Device
{
public:
Receiver()
{
OnData("data", &Receiver::HandleData);
}
~Receiver() = default;
void InitTask() override
{
fNumSenders = GetConfig()->GetValue<int>("num-senders");
@@ -46,7 +43,6 @@ class Receiver : public FairMQDevice
fMaxTimeframes = GetConfig()->GetValue<int>("max-timeframes");
}
protected:
bool HandleData(FairMQParts& parts, int /* index */)
{
Header& h = *(static_cast<Header*>(parts.At(0)->GetData()));
@@ -93,6 +89,7 @@ class Receiver : public FairMQDevice
}
}
private:
unordered_map<uint16_t, TFBuffer> fBuffer;
unordered_set<uint16_t> fDiscardedSet;

View File

@@ -17,11 +17,8 @@ using namespace std;
using namespace example_n_m;
namespace bpo = boost::program_options;
class Sender : public FairMQDevice
struct Sender : fair::mq::Device
{
public:
Sender() = default;
void InitTask() override
{
fIndex = GetConfig()->GetProperty<int>("sender-index");

View File

@@ -15,11 +15,8 @@
using namespace std;
namespace bpo = boost::program_options;
class Synchronizer : public FairMQDevice
struct Synchronizer : fair::mq::Device
{
public:
Synchronizer() = default;
bool ConditionalRun() override
{
FairMQMessagePtr msg(NewSimpleMessage(fTimeframeId));
@@ -35,6 +32,7 @@ class Synchronizer : public FairMQDevice
return true;
}
private:
uint16_t fTimeframeId = 0;
};