add boost::serialization and template features in tutorial3 and fairmq. Require to modifie base/event/fairtimestamp and fairhit.

This commit is contained in:
NicolasWinckler 2014-02-28 16:24:52 +01:00 committed by Florian Uhlig
parent 9a0ed2ca72
commit 005321f63c

View File

@ -256,10 +256,10 @@ void FairMQDevice::LogSocketRates()
double* messagesPerSecondOutput = new double[fNumOutputs]; double* messagesPerSecondOutput = new double[fNumOutputs];
// Temp stuff for process termination // Temp stuff for process termination
bool receivedSomething = false; // bool receivedSomething = false;
bool sentSomething = false; // bool sentSomething = false;
int didNotReceiveFor = 0; // int didNotReceiveFor = 0;
int didNotSendFor = 0; // int didNotSendFor = 0;
// End of temp stuff // End of temp stuff
int i = 0; int i = 0;
@ -299,14 +299,14 @@ void FairMQDevice::LogSocketRates()
LOG(DEBUG) << "#" << fId << "." << (*itr)->GetId() << ": " << messagesPerSecondInput[i] << " msg/s, " << megabytesPerSecondInput[i] << " MB/s"; LOG(DEBUG) << "#" << fId << "." << (*itr)->GetId() << ": " << messagesPerSecondInput[i] << " msg/s, " << megabytesPerSecondInput[i] << " MB/s";
// Temp stuff for process termination // Temp stuff for process termination
if ( !receivedSomething && messagesPerSecondInput[i] > 0 ) { // if ( !receivedSomething && messagesPerSecondInput[i] > 0 ) {
receivedSomething = true; // receivedSomething = true;
} // }
if ( receivedSomething && messagesPerSecondInput[i] == 0 ) { // if ( receivedSomething && messagesPerSecondInput[i] == 0 ) {
cout << "Did not receive anything on socket " << i << " for " << didNotReceiveFor++ << " seconds." << endl; // cout << "Did not receive anything on socket " << i << " for " << didNotReceiveFor++ << " seconds." << endl;
} else { // } else {
didNotReceiveFor = 0; // didNotReceiveFor = 0;
} // }
// End of temp stuff // End of temp stuff
++i; ++i;
@ -330,28 +330,28 @@ void FairMQDevice::LogSocketRates()
LOG(DEBUG) << "#" << fId << "." << (*itr)->GetId() << ": " << messagesPerSecondOutput[i] << " msg/s, " << megabytesPerSecondOutput[i] << " MB/s"; LOG(DEBUG) << "#" << fId << "." << (*itr)->GetId() << ": " << messagesPerSecondOutput[i] << " msg/s, " << megabytesPerSecondOutput[i] << " MB/s";
// Temp stuff for process termination // Temp stuff for process termination
if ( !sentSomething && messagesPerSecondOutput[i] > 0 ) { // if ( !sentSomething && messagesPerSecondOutput[i] > 0 ) {
sentSomething = true; // sentSomething = true;
} // }
if ( sentSomething && messagesPerSecondOutput[i] == 0 ) { // if ( sentSomething && messagesPerSecondOutput[i] == 0 ) {
cout << "Did not send anything on socket " << i << " for " << didNotSendFor++ << " seconds." << endl; // cout << "Did not send anything on socket " << i << " for " << didNotSendFor++ << " seconds." << endl;
} else { // } else {
didNotSendFor = 0; // didNotSendFor = 0;
} // }
// End of temp stuff // End of temp stuff
++i; ++i;
} }
// Temp stuff for process termination // Temp stuff for process termination
if (receivedSomething && didNotReceiveFor > 5) { // if (receivedSomething && didNotReceiveFor > 5) {
cout << "stopping because nothing was received for 5 seconds." << endl; // cout << "stopping because nothing was received for 5 seconds." << endl;
ChangeState(STOP); // ChangeState(STOP);
} // }
if (sentSomething && didNotSendFor > 5) { // if (sentSomething && didNotSendFor > 5) {
cout << "stopping because nothing was sent for 5 seconds." << endl; // cout << "stopping because nothing was sent for 5 seconds." << endl;
ChangeState(STOP); // ChangeState(STOP);
} // }
// End of temp stuff // End of temp stuff
t0 = t1; t0 = t1;