Rename device property to have a common format and some code cleanup.

FairMQDevice: Rename property for socket rate logging to have common format (old name is still available for compatibility).
FairMQ: Avoid using std namespace in class headers (may require adding std namespace to some child devices).
FairMQ: A bit of code cleanup
FairMQConfigurable: Stop with an error if a property assignment failed due to incorrect key.
This commit is contained in:
Alexey Rybalchenko
2015-03-26 15:03:14 +01:00
committed by Florian Uhlig
parent 61f24eb73a
commit 26a1033e9d
30 changed files with 164 additions and 164 deletions

View File

@@ -17,45 +17,40 @@ class GenericProcessor: public FairMQDevice,
public TaskPolicy
{
public:
GenericProcessor() : InputPolicy(), OutputPolicy(), TaskPolicy()
{}
virtual ~GenericProcessor()
{}
void SetTransport(FairMQTransportFactory* transport)
{
FairMQDevice::SetTransport(transport);
//InputPolicy::SetTransport(transport);
//OutputPolicy::SetTransport(transport);
}
template <typename... Args>
void InitTask(Args... args)
{
TaskPolicy::InitTask(std::forward<Args>(args)...);
}
template <typename... Args>
void InitInputContainer(Args... args)
{
InputPolicy::InitContainer(std::forward<Args>(args)...);
}
template <typename... Args>
void InitOutputContainer(Args... args)
{
OutputPolicy::InitContainer(std::forward<Args>(args)...);
}
//void SendPart();
//bool ReceivePart();
void SendPart()
{
fPayloadOutputs->at(0)->Send(OutputPolicy::SerializeMsg(TaskPolicy::GetData()), "snd-more");
@@ -81,7 +76,7 @@ class GenericProcessor: public FairMQDevice,
}
}
*/
protected:
virtual void Init()
{
@@ -91,7 +86,7 @@ class GenericProcessor: public FairMQDevice,
//fProcessorTask->SetSendPart(boost::bind(&FairMQProcessor::SendPart, this));
//fProcessorTask->SetReceivePart(boost::bind(&FairMQProcessor::ReceivePart, this));
}
virtual void Run()
{
MQLOG(INFO) << ">>>>>>> Run <<<<<<<";
@@ -100,7 +95,7 @@ class GenericProcessor: public FairMQDevice,
int receivedMsgs = 0;
int sentMsgs = 0;
int received = 0;
while ( fState == RUNNING )
{
FairMQMessage* msg = fTransportFactory->CreateMessage();
@@ -148,7 +143,6 @@ class GenericProcessor: public FairMQDevice,
fRunningCondition.notify_one();
}
};
//#include "GenericSampler.tpl"