mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 21:21:37 +00:00
refactor(examples): use the property API of ProgOptions
- Replace GetValue<T>() with GetProperty<T>(). All read keys are declared options, so GetProperty<T>() without a default fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ struct Sampler : fair::mq::Device
|
|||||||
{
|
{
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
fIterations = fConfig->GetValue<uint64_t>("iterations");
|
fIterations = fConfig->GetProperty<uint64_t>("iterations");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConditionalRun() override
|
bool ConditionalRun() override
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ struct Sink : fair::mq::Device
|
|||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
fIterations = fConfig->GetValue<uint64_t>("iterations");
|
fIterations = fConfig->GetProperty<uint64_t>("iterations");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HandleData(fair::mq::MessagePtr& msg, int)
|
bool HandleData(fair::mq::MessagePtr& msg, int)
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ struct Receiver : fair::mq::Device
|
|||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
fNumSenders = GetConfig()->GetValue<int>("num-senders");
|
fNumSenders = GetConfig()->GetProperty<int>("num-senders");
|
||||||
fBufferTimeoutInMs = GetConfig()->GetValue<int>("buffer-timeout");
|
fBufferTimeoutInMs = GetConfig()->GetProperty<int>("buffer-timeout");
|
||||||
fMaxTimeframes = GetConfig()->GetValue<int>("max-timeframes");
|
fMaxTimeframes = GetConfig()->GetProperty<int>("max-timeframes");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HandleData(fair::mq::Parts& parts, int /* index */)
|
bool HandleData(fair::mq::Parts& parts, int /* index */)
|
||||||
|
|||||||
Reference in New Issue
Block a user