mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Apply modernize-use-default-member-init
This commit is contained in:
committed by
Dennis Klein
parent
e1b229522c
commit
acf63d3c1b
@@ -16,15 +16,12 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
// register a handler for data arriving on "data" channel
|
||||
OnData("data", &Sink::HandleData);
|
||||
@@ -46,8 +44,8 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -18,15 +18,12 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
|
@@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
// register a handler for data arriving on "data2" channel
|
||||
OnData("data2", &Sink::HandleData);
|
||||
@@ -45,8 +43,8 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -18,12 +18,7 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fNumDataChannels(0)
|
||||
, fCounter(0)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
@@ -56,10 +51,10 @@ class Sampler : public FairMQDevice
|
||||
}
|
||||
|
||||
|
||||
int fNumDataChannels;
|
||||
uint64_t fCounter;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
int fNumDataChannels = 0;
|
||||
uint64_t fCounter = 0;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("data", &Sink::HandleData);
|
||||
}
|
||||
@@ -44,8 +42,8 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -17,8 +17,6 @@ class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fIterations(0)
|
||||
, fCounter(0)
|
||||
{}
|
||||
|
||||
void InitTask() override
|
||||
@@ -53,8 +51,8 @@ class Sampler : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fIterations;
|
||||
uint64_t fCounter;
|
||||
uint64_t fIterations = 0;
|
||||
uint64_t fCounter = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -17,8 +17,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fIterations(0)
|
||||
, fCounter(0)
|
||||
{
|
||||
OnData("data2", &Sink::HandleData);
|
||||
}
|
||||
@@ -45,8 +43,8 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fIterations;
|
||||
uint64_t fCounter;
|
||||
uint64_t fIterations = 0;
|
||||
uint64_t fCounter = 0;
|
||||
};
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
{
|
||||
|
@@ -20,10 +20,7 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(5)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
@@ -81,8 +78,8 @@ class Sampler : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 5;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -19,10 +19,7 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
@@ -64,8 +61,8 @@ class Sampler : public FairMQDevice
|
||||
|
||||
protected:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -18,10 +18,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fReceivedData(false)
|
||||
, fReceivedBroadcast(false)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("broadcast", &Sink::HandleBroadcast);
|
||||
OnData("data", &Sink::HandleData);
|
||||
@@ -61,10 +57,10 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
bool fReceivedData;
|
||||
bool fReceivedBroadcast;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
bool fReceivedData = false;
|
||||
bool fReceivedBroadcast = false;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -16,11 +16,7 @@ namespace bpo = boost::program_options;
|
||||
class Sampler1 : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler1()
|
||||
: fAckListener()
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler1() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
@@ -73,8 +69,8 @@ class Sampler1 : public FairMQDevice
|
||||
}
|
||||
|
||||
std::thread fAckListener;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -16,10 +16,7 @@ namespace bpo = boost::program_options;
|
||||
class Sampler2 : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler2()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sampler2() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
@@ -47,8 +44,8 @@ class Sampler2 : public FairMQDevice
|
||||
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -15,9 +15,6 @@ class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations1(0)
|
||||
, fNumIterations2(0)
|
||||
{
|
||||
// register a handler for data arriving on "data" channel
|
||||
OnData("data1", &Sink::HandleData1);
|
||||
@@ -65,9 +62,9 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations1;
|
||||
uint64_t fNumIterations2;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations1 = 0;
|
||||
uint64_t fNumIterations2 = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -33,12 +33,6 @@ class Receiver : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Receiver()
|
||||
: fBuffer()
|
||||
, fDiscardedSet()
|
||||
, fNumSenders(0)
|
||||
, fBufferTimeoutInMs(5000)
|
||||
, fMaxTimeframes(0)
|
||||
, fTimeframeCounter(0)
|
||||
{
|
||||
OnData("data", &Receiver::HandleData);
|
||||
}
|
||||
@@ -102,10 +96,10 @@ class Receiver : public FairMQDevice
|
||||
unordered_map<uint16_t, TFBuffer> fBuffer;
|
||||
unordered_set<uint16_t> fDiscardedSet;
|
||||
|
||||
int fNumSenders;
|
||||
int fBufferTimeoutInMs;
|
||||
int fMaxTimeframes;
|
||||
int fTimeframeCounter;
|
||||
int fNumSenders = 0;
|
||||
int fBufferTimeoutInMs = 5000;
|
||||
int fMaxTimeframes = 0;
|
||||
int fTimeframeCounter = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -20,15 +20,8 @@ namespace bpo = boost::program_options;
|
||||
class Sender : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sender()
|
||||
: fNumReceivers(0)
|
||||
, fIndex(0)
|
||||
, fSubtimeframeSize(10000)
|
||||
{}
|
||||
Sender() {}
|
||||
|
||||
~Sender() = default;
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fIndex = GetConfig()->GetProperty<int>("sender-index");
|
||||
@@ -64,9 +57,9 @@ class Sender : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
int fNumReceivers;
|
||||
unsigned int fIndex;
|
||||
int fSubtimeframeSize;
|
||||
int fNumReceivers = 0;
|
||||
unsigned int fIndex = 0;
|
||||
int fSubtimeframeSize = 10000;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -18,12 +18,8 @@ namespace bpo = boost::program_options;
|
||||
class Synchronizer : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Synchronizer()
|
||||
: fTimeframeId(0)
|
||||
{}
|
||||
~Synchronizer() = default;
|
||||
Synchronizer() {}
|
||||
|
||||
protected:
|
||||
bool ConditionalRun() override
|
||||
{
|
||||
FairMQMessagePtr msg(NewSimpleMessage(fTimeframeId));
|
||||
@@ -39,7 +35,7 @@ class Synchronizer : public FairMQDevice
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t fTimeframeId;
|
||||
uint16_t fTimeframeId = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& /* options */) {}
|
||||
|
@@ -18,15 +18,8 @@ namespace bpo = boost::program_options;
|
||||
class Readout : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Readout()
|
||||
: fMsgSize(10000)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
, fRegion(nullptr)
|
||||
, fNumUnackedMsgs(0)
|
||||
{}
|
||||
Readout() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fMsgSize = fConfig->GetProperty<int>("msg-size");
|
||||
@@ -65,6 +58,7 @@ class Readout : public FairMQDevice
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ResetTask() override
|
||||
{
|
||||
// if not all messages acknowledged, wait for a bit. But only once, since receiver could be already dead.
|
||||
@@ -77,11 +71,11 @@ class Readout : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
int fMsgSize;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
FairMQUnmanagedRegionPtr fRegion;
|
||||
std::atomic<uint64_t> fNumUnackedMsgs;
|
||||
int fMsgSize = 10000;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
FairMQUnmanagedRegionPtr fRegion = nullptr;
|
||||
std::atomic<uint64_t> fNumUnackedMsgs = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -14,12 +14,8 @@ namespace bpo = boost::program_options;
|
||||
class Receiver : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Receiver()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Receiver() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
// Get the fMaxIterations value from the command line options (via fConfig)
|
||||
@@ -43,8 +39,8 @@ class Receiver : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -16,9 +16,7 @@ namespace bpo = boost::program_options;
|
||||
class Sender : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sender()
|
||||
: fInputChannelName()
|
||||
{}
|
||||
Sender() {}
|
||||
|
||||
void Init() override
|
||||
{
|
||||
|
@@ -18,16 +18,8 @@ namespace bpo = boost::program_options;
|
||||
class Sampler : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sampler()
|
||||
: fMsgSize(10000)
|
||||
, fLinger(100)
|
||||
, fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
, fRegion(nullptr)
|
||||
, fNumUnackedMsgs(0)
|
||||
{}
|
||||
Sampler() {}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
fMsgSize = fConfig->GetProperty<int>("msg-size");
|
||||
@@ -102,13 +94,13 @@ class Sampler : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
int fMsgSize;
|
||||
uint32_t fLinger;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
FairMQUnmanagedRegionPtr fRegion;
|
||||
int fMsgSize = 10000;
|
||||
uint32_t fLinger = 100;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
FairMQUnmanagedRegionPtr fRegion = nullptr;
|
||||
std::mutex fMtx;
|
||||
uint64_t fNumUnackedMsgs;
|
||||
uint64_t fNumUnackedMsgs = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -14,10 +14,7 @@ namespace bpo = boost::program_options;
|
||||
class Sink : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Sink()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Sink() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
@@ -56,8 +53,8 @@ class Sink : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -18,10 +18,7 @@ namespace bpo = boost::program_options;
|
||||
class Client : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Client()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{}
|
||||
Client() {}
|
||||
|
||||
void InitTask() override
|
||||
{
|
||||
@@ -66,8 +63,8 @@ class Client : public FairMQDevice
|
||||
|
||||
private:
|
||||
std::string fText;
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
@@ -17,13 +17,10 @@ class Server : public FairMQDevice
|
||||
{
|
||||
public:
|
||||
Server()
|
||||
: fMaxIterations(0)
|
||||
, fNumIterations(0)
|
||||
{
|
||||
OnData("data", &Server::HandleData);
|
||||
}
|
||||
|
||||
protected:
|
||||
void InitTask() override
|
||||
{
|
||||
// Get the fMaxIterations value from the command line options (via fConfig)
|
||||
@@ -56,8 +53,8 @@ class Server : public FairMQDevice
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t fMaxIterations;
|
||||
uint64_t fNumIterations;
|
||||
uint64_t fMaxIterations = 0;
|
||||
uint64_t fNumIterations = 0;
|
||||
};
|
||||
|
||||
void addCustomOptions(bpo::options_description& options)
|
||||
|
Reference in New Issue
Block a user