diff --git a/fairmq/FairMQDevice.cxx b/fairmq/FairMQDevice.cxx index af27cdbf..17498e4f 100644 --- a/fairmq/FairMQDevice.cxx +++ b/fairmq/FairMQDevice.cxx @@ -482,32 +482,6 @@ void FairMQDevice::InitTaskWrapper() ChangeState(Transition::Auto); } -bool FairMQDevice::SortSocketsByAddress(const FairMQChannel &lhs, const FairMQChannel &rhs) -{ - return lhs.fAddress < rhs.fAddress; -} - -void FairMQDevice::SortChannel(const string& name, const bool reindex) -{ - if (fChannels.find(name) != fChannels.end()) - { - sort(fChannels.at(name).begin(), fChannels.at(name).end(), SortSocketsByAddress); - - if (reindex) - { - for (auto vi = fChannels.at(name).begin(); vi != fChannels.at(name).end(); ++vi) - { - // set channel name: name + vector index - vi->fName = tools::ToString(name, "[", vi - fChannels.at(name).begin(), "]"); - } - } - } - else - { - LOG(error) << "Sorting failed: no channel with the name \"" << name << "\"."; - } -} - void FairMQDevice::RunWrapper() { LOG(info) << "DEVICE: Running..."; diff --git a/fairmq/FairMQDevice.h b/fairmq/FairMQDevice.h index cfb08d2d..0d82e9ef 100644 --- a/fairmq/FairMQDevice.h +++ b/fairmq/FairMQDevice.h @@ -115,11 +115,6 @@ class FairMQDevice /// Outputs the socket transfer rates virtual void LogSocketRates(); - /// Sorts a channel by address, with optional reindexing of the sorted values - /// @param name Channel name - /// @param reindex Should reindexing be done - void SortChannel(const std::string& name, const bool reindex = true); - template void Serialize(FairMQMessage& msg, DataType&& data, Args&&... args) const { @@ -312,11 +307,6 @@ class FairMQDevice return fConfig; } - /// Implements the sort algorithm used in SortChannel() - /// @param lhs Right hand side value for comparison - /// @param rhs Left hand side value for comparison - static bool SortSocketsByAddress(const FairMQChannel &lhs, const FairMQChannel &rhs); - // overload to easily bind member functions template void OnData(const std::string& channelName, bool (T::* memberFunction)(FairMQMessagePtr& msg, int index))