From a607bee681e1182317593e44eb9b40ba2f25f2ed Mon Sep 17 00:00:00 2001 From: mfasDa Date: Thu, 30 Jul 2015 17:51:44 +0200 Subject: [PATCH 01/34] Add operators for + and += --- its/Digit.cxx | 12 ++++++++++++ its/Digit.h | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/its/Digit.cxx b/its/Digit.cxx index 9d507f54c93b4..0431abc71da4c 100644 --- a/its/Digit.cxx +++ b/its/Digit.cxx @@ -28,6 +28,18 @@ fLabels() Digit::~Digit(){} +Digit &Digit::operator+=(const Digit &other){ + fCharge += other.fCharge; + return *this; +} + +const Digit Digit::operator+(const Digit &other){ + Digit result(*this); + result += other; + return result; +} + + std::ostream &Digit::Print(std::ostream &output) const{ output << "ITS Digit of chip index [" << fChipIndex << "] and pixel [" << fPixelIndex << "]with charge " << fCharge << " at time stamp" << fTimeStamp; return output; diff --git a/its/Digit.h b/its/Digit.h index 9010a7aa25ada..4a2c930b7d5fb 100644 --- a/its/Digit.h +++ b/its/Digit.h @@ -16,6 +16,9 @@ namespace AliceO2{ namespace ITS{ + /// \class Digit + /// \brief Digit class for the ITS + /// class Digit : public FairTimeStamp { public: @@ -32,6 +35,19 @@ namespace AliceO2{ /// Destructor virtual ~Digit(); + /// Addition operator + /// Adds the charge of 2 digits + /// @param lhs First digit for addition (also serves as time stamp) + /// @param rhs Second digit for addition + /// @return Digit with the summed charge of two digits and the time stamp of the first one + const Digit operator+(const Digit &other); + + /// Operator += + /// Adds charge in other digit to this digit + /// @param other Digit added to this digit + /// @return Digit after addition + Digit &operator+=(const Digit &other); + /// Get the index of the chip /// @return Index of the chip ULong_t GetChipIndex() const { return fChipIndex; } From ffcef878447d35865389a48b6785e42271ba3d56 Mon Sep 17 00:00:00 2001 From: mfasDa Date: Wed, 5 Aug 2015 11:32:36 +0200 Subject: [PATCH 02/34] Change error handling to exceptions Instead of warnings and boolean return values use exception in case of out of range errors. Two types of exceptions are implemented: - InvalidPixelException dealing with pixels out of range - OutOfActiveAreaException dealing with local (chip) coordinates exceeding the active area of the chip Functions to which these cases might apply are updaged in the way that they throw exceptions in case of errors and do not return any value. --- its/Segmentation.h | 117 ++++++++++++++++++++++++++++++- its/UpgradeSegmentationPixel.cxx | 26 ++++--- its/UpgradeSegmentationPixel.h | 3 +- 3 files changed, 130 insertions(+), 16 deletions(-) diff --git a/its/Segmentation.h b/its/Segmentation.h index 2308ba4147992..542d18d096298 100644 --- a/its/Segmentation.h +++ b/its/Segmentation.h @@ -4,6 +4,9 @@ #ifndef ALICEO2_ITS_SEGMENTATION_H_ #define ALICEO2_ITS_SEGMENTATION_H_ +#include +#include + #include class TF1; @@ -18,6 +21,116 @@ namespace ITS { class Segmentation : public TObject { public: + /// Error handling in case a point in local coordinates + /// exceeds limits in any direction + class OutOfActiveAreaException : public std::exception { + public: + /// Definition of direction in which the boundary is exceeded + enum Direction { + kX = 0, ///< Local X + kZ = 1 ///< Local Z + }; + /// Constructor + /// Settting necessary information for the error handling + /// @param dir Direction in which the range exception happened + /// @param val Value of the exception + /// @param lower Lower limit in the direction + /// @param upper Upper limit in the direction + OutOfActiveAreaException(Direction dir, Double_t val, Double_t lower, Double_t upper) : + fErrorMessage(), fDirection(dir), fValue(val), fLower(lower), fUpper(upper) + { + std::stringstream errormessage; + errormessage << "Range exceeded in " << (fDirection == kX ? "x" : "z") << "-direction, value " << fValue << ", limits [" << fLower << "|" << fUpper << "]"; + fErrorMessage = errormessage.str(); + } + /// Destructor + virtual ~OutOfActiveAreaException() throw() {} + + /// Get the value for which the exception was raised + /// @return Value (point in one direction) + Double_t GetValue() const { return fValue; } + /// Get the lower limit in direction for which the exception + /// was raised + /// @return Lower limit of the direction + Double_t GetLowerLimit() const { return fLower; } + /// Get the upper limit in direction for which the exception + /// was raised + /// @return Upper limit of the direction + Double_t GetUpperLimit() const { return fUpper; } + /// Check whether exception was raised in x-directon + /// @return True if exception was raised in x-direction, false otherwise + Bool_t IsX() const { return fDirection == kX; } + /// Check whether exception was raised in z-direction + /// @return True if exception was raised in z-direction, false otherwise + Bool_t IsZ() const { return fDirection == kZ; } + + /// Provide error message string containing direction, + /// value of the point, and limits + /// @return Error message + const char *what() const noexcept { + return fErrorMessage.c_str(); + } + + private: + std::string fErrorMessage; ///< Error message connected to the exception + Direction fDirection; ///< Direction in which the exception was raised + Double_t fValue; ///< Value which exceeds limit + Double_t fLower; ///< Lower limit in direction + Double_t fUpper; ///< Upper limit in direction + }; + + /// Error handling in case of access to an invalid pixel ID + /// (pixel ID in direction which exceeds the range of valid pixel IDs) + class InvalidPixelException : public std::exception{ + public: + /// Definition of direction in which the boundary is exceeded + enum Direction { + kX = 0, ///< Local X + kZ = 1 ///< Local Z + }; + /// Constructor + /// Setting necessary information for the error handling + /// @param dir Direction in which the exception occurs + /// @param pixelID Index of the pixel (in direction) which is out of scope + /// @param maxPixelID Maximum amount of pixels in direction + InvalidPixelException(Direction dir, Int_t pixelID, Int_t maxPixelID): + fErrorMessage(), fDirection(dir), fValue(pixelID), fMaxPixelID(maxPixelID) + { + std::stringstream errormessage; + errormessage << "Obtained " << (fDirection == kX ? "row" : "col") << " " << fValue << " is not in range [0:" << fMaxPixelID << ")"; + fErrorMessage = errormessage.str(); + } + + /// Destructor + virtual ~InvalidPixelException() {} + + /// Get the ID of the pixel which raised the exception + /// @return ID of the pixel + Int_t GetPixelID() const { return fValue; } + /// Get the maximum number of pixels in a given direction + /// @return Max. number of pixels + Int_t GetMaxNumberOfPixels() const { return fMaxPixelID; } + /// Check whether exception was raised in x-directon + /// @return True if exception was raised in x-direction, false otherwise + Bool_t IsX() const { return fDirection == kX; } + /// Check whether exception was raised in z-direction + /// @return True if exception was raised in z-direction, false otherwise + Bool_t IsZ() const { return fDirection == kZ; } + + /// Provide error message string containing direction, + /// index of the pixel out of range, and the maximum pixel ID + const char *what() const noexcept { + return fErrorMessage.c_str(); + } + + private: + std::string fErrorMessage; ///< Error message connected to this exception + Direction fDirection; ///< Direction in which the pixel index is out of range + Int_t fValue; ///< Value of the pixel ID which is out of range + Int_t fMaxPixelID; ///< Maximum amount of pixels in direction; + }; + + /// Default constructor Segmentation(); @@ -101,10 +214,12 @@ class Segmentation : public TObject { /// Transformation from Geant cm detector center local coordinates /// to detector segmentation/cell coordiantes starting from (0,0). - virtual Bool_t localToDetector(Float_t, Float_t, Int_t&, Int_t&) const = 0; + /// @throw OutOfActiveAreaException if the point is outside the active area in any of the directions + virtual void localToDetector(Float_t, Float_t, Int_t&, Int_t&) const = 0; /// Transformation from detector segmentation/cell coordiantes starting /// from (0,0) to Geant cm detector center local coordinates. + /// @throw InvalidPixelException in case the pixel ID in any direction is out of range virtual void detectorToLocal(Int_t, Int_t, Float_t&, Float_t&) const = 0; /// Initialisation diff --git a/its/UpgradeSegmentationPixel.cxx b/its/UpgradeSegmentationPixel.cxx index e4b3fbe650d6b..1b20918421e89 100644 --- a/its/UpgradeSegmentationPixel.cxx +++ b/its/UpgradeSegmentationPixel.cxx @@ -250,20 +250,22 @@ void UpgradeSegmentationPixel::neighbours(Int_t iX, Int_t iZ, Int_t* nlist, Int_ zlist[7] = iZ - 1; } -Bool_t UpgradeSegmentationPixel::localToDetector(Float_t x, Float_t z, Int_t& ix, Int_t& iz) const +void UpgradeSegmentationPixel::localToDetector(Float_t x, Float_t z, Int_t& ix, Int_t& iz) const { x += 0.5 * dxActive() + mShiftLocalX; // get X,Z wrt bottom/left corner z += 0.5 * dzActive() + mShiftLocalZ; ix = iz = -1; if (x < 0 || x > dxActive()) { - return kFALSE; // outside x range. + throw OutOfActiveAreaException(OutOfActiveAreaException::kX, x, 0, dxActive()); + //return kFALSE; // outside x range. } if (z < 0 || z > dzActive()) { - return kFALSE; // outside z range. + throw OutOfActiveAreaException(OutOfActiveAreaException::kZ, z, 0, dzActive()); + //return kFALSE; // outside z range. } ix = int(x / mPitchX); iz = zToColumn(z); - return kTRUE; // Found ix and iz, return. + //return kTRUE; // Found ix and iz, return. } void UpgradeSegmentationPixel::detectorToLocal(Int_t ix, Int_t iz, Float_t& x, Float_t& z) const @@ -271,20 +273,15 @@ void UpgradeSegmentationPixel::detectorToLocal(Int_t ix, Int_t iz, Float_t& x, F x = -0.5 * dxActive(); // default value. z = -0.5 * dzActive(); // default value. if (ix < 0 || ix >= mNumberOfRows) { - LOG(WARNING) << "Obtained row " << ix << " is not in range [0:" << mNumberOfRows << ")" - << FairLogger::endl; - return; + throw InvalidPixelException(InvalidPixelException::kX, ix, mNumberOfRows); } // outside of detector if (iz < 0 || iz >= mNumberOfColumns) { - LOG(WARNING) << "Obtained col " << ix << " is not in range [0:" << mNumberOfColumns << ")" - << FairLogger::endl; - return; + throw InvalidPixelException(InvalidPixelException::kZ, iz, mNumberOfColumns); } // outside of detector x += (ix + 0.5) * mPitchX - mShiftLocalX; // RS: we go to the center of the pad, i.e. + pitch/2, not // to the boundary as in SPD z += columnToZ(iz) - mShiftLocalZ; - return; // Found x and z, return. } void UpgradeSegmentationPixel::cellBoundries(Int_t ix, Int_t iz, Double_t& xl, Double_t& xu, @@ -310,8 +307,7 @@ void UpgradeSegmentationPixel::cellBoundries(Int_t ix, Int_t iz, Double_t& xl, D Int_t UpgradeSegmentationPixel::getChipFromChannel(Int_t, Int_t iz) const { if (iz >= mNumberOfColumns || iz < 0) { - LOG(WARNING) << "Bad cell number" << FairLogger::endl; - return -1; + throw InvalidPixelException(InvalidPixelException::kZ, iz, mNumberOfColumns); } return iz / mNumberOfColumnsPerChip; } @@ -319,7 +315,9 @@ Int_t UpgradeSegmentationPixel::getChipFromChannel(Int_t, Int_t iz) const Int_t UpgradeSegmentationPixel::getChipFromLocal(Float_t, Float_t zloc) const { Int_t ix0, iz; - if (!localToDetector(0, zloc, ix0, iz)) { + try { + localToDetector(0, zloc, ix0, iz); + } catch (OutOfActiveAreaException &e) { LOG(WARNING) << "Bad local coordinate" << FairLogger::endl; return -1; } diff --git a/its/UpgradeSegmentationPixel.h b/its/UpgradeSegmentationPixel.h index 2f6f5a34c1c39..d2c106ca29031 100644 --- a/its/UpgradeSegmentationPixel.h +++ b/its/UpgradeSegmentationPixel.h @@ -20,6 +20,7 @@ namespace ITS { class UpgradeSegmentationPixel : public Segmentation { public: + UpgradeSegmentationPixel(UInt_t id = 0, int nchips = 0, int ncol = 0, int nrow = 0, float pitchX = 0, float pitchZ = 0, float thickness = 0, float pitchLftC = -1, float pitchRgtC = -1, float edgL = 0, float edgR = 0, float edgT = 0, float edgB = 0); @@ -64,7 +65,7 @@ class UpgradeSegmentationPixel : public Segmentation { /// the center of the sensitive volulme. /// \param Int_t ix Detector x cell coordinate. Has the range 0 <= ix < mNumberOfRows /// \param Int_t iz Detector z cell coordinate. Has the range 0 <= iz < mNumberOfColumns - virtual Bool_t localToDetector(Float_t x, Float_t z, Int_t& ix, Int_t& iz) const; + virtual void localToDetector(Float_t x, Float_t z, Int_t& ix, Int_t& iz) const; /// Transformation from Detector cell coordiantes to Geant detector centered /// local coordinates (cm) From cdae7afb81ff6b3ce058db6085eef6e27e3961de Mon Sep 17 00:00:00 2001 From: pzhristov Date: Thu, 6 Aug 2015 12:06:06 +0200 Subject: [PATCH 03/34] Change in the DDS namespaces --- devices/aliceHLTwrapper/aliceHLTEventSampler.cxx | 8 ++++---- devices/aliceHLTwrapper/aliceHLTWrapper.cxx | 8 ++++---- .../flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx | 6 +++--- .../flp2epn-distributed/runO2Prototype/runFLPSender.cxx | 8 ++++---- .../runO2Prototype/runFLPSyncSampler.cxx | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx b/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx index 26e18eee05c86..70e326b57d258 100644 --- a/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx +++ b/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx @@ -549,7 +549,7 @@ int sendSocketPropertiesDDS(vector& sockets) ddsmsg << sit->address; #ifdef ENABLE_DDS - dds::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue ddsKeyValue; ddsKeyValue.putValue(sit->ddsprop, ddsmsg.str()); #endif @@ -567,8 +567,8 @@ int readSocketPropertiesDDS(vector& sockets) if (sit->ddscount==0) continue; // the previously inserted duplicates #ifdef ENABLE_DDS - dds::CKeyValue ddsKeyValue; - dds::CKeyValue::valuesMap_t values; + dds::key_value::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue::valuesMap_t values; std::string hostaddress=sit->address; vector::iterator workit=sit; @@ -588,7 +588,7 @@ int readSocketPropertiesDDS(vector& sockets) ddsKeyValue.getValues(sit->ddsprop.c_str(), &values); cout << "Info: DDS getValues received " << values.size() << " value(s) of property " << sit->ddsprop << " " << sit->ddscount-socketPropertiesToRead << " of " << sit->ddscount << " sockets processed" << endl; - for (dds::CKeyValue::valuesMap_t::const_iterator vit = values.begin(); + for (dds::key_value::CKeyValue::valuesMap_t::const_iterator vit = values.begin(); vit!=values.end(); vit++) { if (usedProperties.find(vit->first)!=usedProperties.end()) continue; // already processed cout << "Info: processing property " << vit->first << ", value " << vit->second << " on host " << hostaddress << endl; diff --git a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx index 34469bb9faad9..e577721a240c0 100644 --- a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx +++ b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx @@ -576,7 +576,7 @@ int sendSocketPropertiesDDS(vector& sockets) ddsmsg << sit->address; #ifdef ENABLE_DDS - dds::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue ddsKeyValue; ddsKeyValue.putValue(sit->ddsprop, ddsmsg.str()); #endif @@ -594,8 +594,8 @@ int readSocketPropertiesDDS(vector& sockets) if (sit->ddscount==0) continue; // the previously inserted duplicates #ifdef ENABLE_DDS - dds::CKeyValue ddsKeyValue; - dds::CKeyValue::valuesMap_t values; + dds::key_value::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue::valuesMap_t values; std::string hostaddress=sit->address; vector::iterator workit=sit; @@ -615,7 +615,7 @@ int readSocketPropertiesDDS(vector& sockets) ddsKeyValue.getValues(sit->ddsprop.c_str(), &values); cout << "Info: DDS getValues received " << values.size() << " value(s) of property " << sit->ddsprop << " " << sit->ddscount-socketPropertiesToRead << " of " << sit->ddscount << " sockets processed" << endl; - for (dds::CKeyValue::valuesMap_t::const_iterator vit = values.begin(); + for (dds::key_value::CKeyValue::valuesMap_t::const_iterator vit = values.begin(); vit!=values.end(); vit++) { if (usedProperties.find(vit->first)!=usedProperties.end()) continue; // already processed cout << "Info: processing property " << vit->first << ", value " << vit->second << " on host " << hostaddress << endl; diff --git a/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx b/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx index 0e4a7e321fa84..0b2a372d0fb69 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx @@ -241,7 +241,7 @@ int main(int argc, char** argv) epn.ChangeState("INIT_DEVICE"); epn.WaitForInitialValidation(); - dds::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue ddsKeyValue; ddsKeyValue.putValue("EPNReceiverInputAddress", epn.fChannels["data-in"].at(0).GetAddress()); if (options.testMode == 0) { @@ -249,7 +249,7 @@ int main(int argc, char** argv) ddsKeyValue.putValue("EPNReceiverOutputAddress", epn.fChannels["data-out"].at(options.numFLPs).GetAddress()); } - dds::CKeyValue::valuesMap_t values; + dds::key_value::CKeyValue::valuesMap_t values; { mutex keyMutex; condition_variable keyCondition; @@ -264,7 +264,7 @@ int main(int argc, char** argv) } } - dds::CKeyValue::valuesMap_t::const_iterator it_values = values.begin(); + dds::key_value::CKeyValue::valuesMap_t::const_iterator it_values = values.begin(); for (int i = 0; i < options.numFLPs; ++i) { epn.fChannels["data-out"].at(i).UpdateAddress(it_values->second); it_values++; diff --git a/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx b/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx index 0687baebdd770..9c898896d30cc 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx @@ -163,8 +163,8 @@ int main(int argc, char** argv) // DDS // Waiting for properties - dds::CKeyValue ddsKeyValue; - dds::CKeyValue::valuesMap_t values; + dds::key_value::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue::valuesMap_t values; // In test mode, retreive the output address of FLPSyncSampler to connect to if (options.testMode == 1) { @@ -236,7 +236,7 @@ int main(int argc, char** argv) ddsKeyValue.putValue("FLPSenderHeartbeatInputAddress", flp.fChannels["data-in"].at(1).GetAddress()); - dds::CKeyValue::valuesMap_t values2; + dds::key_value::CKeyValue::valuesMap_t values2; // Receive the EPNReceiver input addresses from DDS. { @@ -253,7 +253,7 @@ int main(int argc, char** argv) } // Assign the received EPNReceiver input addresses to the device. - dds::CKeyValue::valuesMap_t::const_iterator it_values2 = values2.begin(); + dds::key_value::CKeyValue::valuesMap_t::const_iterator it_values2 = values2.begin(); for (int i = 0; i < options.numOutputs; ++i) { flp.fChannels["data-out"].at(i).UpdateAddress(it_values2->second); it_values2++; diff --git a/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx b/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx index de641bf8b64f1..b7f61c634c654 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx @@ -173,7 +173,7 @@ int main(int argc, char** argv) sampler.WaitForInitialValidation(); // Advertise the bound addresses via DDS properties - dds::CKeyValue ddsKeyValue; + dds::key_value::CKeyValue ddsKeyValue; ddsKeyValue.putValue("FLPSyncSamplerOutputAddress", sampler.fChannels["data-out"].at(0).GetAddress()); ddsKeyValue.putValue("FLPSyncSamplerInputAddress", sampler.fChannels["data-in"].at(0).GetAddress()); From 1420f78c05764eeeb2e9fa2ed336d52e9c06431f Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Thu, 2 Jul 2015 17:30:13 +0200 Subject: [PATCH 04/34] Code cleanup and small bugfix after change of FairMQ state machine - handling of addresses for connecting sockets in DDS mode - printout of some additional information - moved user init to new InitTask function - removed Shutdown function which becomes non-virtual soon --- devices/aliceHLTwrapper/WrapperDevice.cxx | 12 +++----- devices/aliceHLTwrapper/WrapperDevice.h | 4 +-- devices/aliceHLTwrapper/aliceHLTWrapper.cxx | 34 +++++++++++++++++++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/devices/aliceHLTwrapper/WrapperDevice.cxx b/devices/aliceHLTwrapper/WrapperDevice.cxx index 28992fc588f88..c6c61b3006ab2 100644 --- a/devices/aliceHLTwrapper/WrapperDevice.cxx +++ b/devices/aliceHLTwrapper/WrapperDevice.cxx @@ -67,6 +67,10 @@ WrapperDevice::~WrapperDevice() } void WrapperDevice::Init() +{ +} + +void WrapperDevice::InitTask() { /// inherited from FairMQDevice @@ -310,14 +314,6 @@ void WrapperDevice::Pause() FairMQDevice::Pause(); } -void WrapperDevice::Shutdown() -{ - /// inherited from FairMQDevice - int iResult=0; - // TODO: shutdown component and delete instance - FairMQDevice::Shutdown(); -} - void WrapperDevice::SetProperty(const int key, const string& value) { /// inherited from FairMQDevice diff --git a/devices/aliceHLTwrapper/WrapperDevice.h b/devices/aliceHLTwrapper/WrapperDevice.h index b29523c7bfac0..49dbad53ed777 100644 --- a/devices/aliceHLTwrapper/WrapperDevice.h +++ b/devices/aliceHLTwrapper/WrapperDevice.h @@ -48,12 +48,12 @@ class WrapperDevice : public FairMQDevice { /// inherited from FairMQDevice virtual void Init(); /// inherited from FairMQDevice + virtual void InitTask(); + /// inherited from FairMQDevice virtual void Run(); /// inherited from FairMQDevice virtual void Pause(); /// inherited from FairMQDevice - virtual void Shutdown(); - /// inherited from FairMQDevice /// handle device specific properties and forward to FairMQDevice::SetProperty virtual void SetProperty(const int key, const std::string& value); /// inherited from FairMQDevice diff --git a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx index e577721a240c0..2d38092ad9232 100644 --- a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx +++ b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx @@ -85,6 +85,21 @@ struct SocketProperties_t { {} }; +ostream& operator<<(ostream &out, const SocketProperties_t& me) +{ + out << "Socket configuration:" + << " type = " << me.type + << " size = " << me.size + << " method = " << me.method + << " address = " << me.address + << " ddsprop = " << me.ddsprop + << " ddscount = " << me.ddscount + << " ddsminport = " << me.ddsminport + << " ddsmaxport = " << me.ddsmaxport + ; + return out; +} + FairMQDevice* gDevice = NULL; static void s_signal_handler(int signal) { @@ -382,7 +397,16 @@ int main(int argc, char** argv) if (pollingPeriod > 0) device.SetProperty(ALICE::HLT::WrapperDevice::PollingPeriod, pollingPeriod); if (skipProcessing) device.SetProperty(ALICE::HLT::WrapperDevice::SkipProcessing, skipProcessing); for (unsigned iInput = 0; iInput < numInputs; iInput++) { - FairMQChannel inputChannel(inputSockets[iInput].type.c_str(), inputSockets[iInput].method.c_str(), inputSockets[iInput].address.c_str()); + std::cout << "input socket " << iInput << " " << inputSockets[iInput] << endl; + // if running in DDS mode, the address contains now the IP address of the host + // machine in order to check if a DDS property comes from the same machine. + // This will be obsolete as soon as DDS propagates properties only within + // collections. Then the address can be empty for connecting sockets and + // can be directly used in the creation of the channel. The next two lines are + // then obsolete + std::string address=inputSockets[iInput].address.c_str(); + if (inputSockets[iInput].method.compare("connect")==0 && bUseDDS) address=""; + FairMQChannel inputChannel(inputSockets[iInput].type.c_str(), inputSockets[iInput].method.c_str(), address); // set High-water-mark for the sockets. in ZMQ, depending on the socket type, some // have only send buffers (PUB, PUSH), some only receive buffers (SUB, PULL), and // some have both (DEALER, ROUTER, PAIR, REQ, REP) @@ -392,7 +416,12 @@ int main(int argc, char** argv) device.fChannels["data-in"].push_back(inputChannel); } for (unsigned iOutput = 0; iOutput < numOutputs; iOutput++) { - FairMQChannel outputChannel(outputSockets[iOutput].type.c_str(), outputSockets[iOutput].method.c_str(), outputSockets[iOutput].address.c_str()); + std::cout << "output socket " << iOutput << " " << outputSockets[iOutput] << endl; + // see comment above, next two lines obsolete if DDS implements property + // propagation within collections + std::string address=outputSockets[iOutput].address.c_str(); + if (outputSockets[iOutput].method.compare("connect")==0 && bUseDDS) address=""; + FairMQChannel outputChannel(outputSockets[iOutput].type.c_str(), outputSockets[iOutput].method.c_str(), address); // we set both snd and rcv to the same value for the moment, see above outputChannel.UpdateSndBufSize(outputSockets[iOutput].size); outputChannel.UpdateRcvBufSize(outputSockets[iOutput].size); @@ -438,6 +467,7 @@ int main(int argc, char** argv) device.fChannels["data-out"].at(iOutput).UpdateAddress(outputSockets[iOutput].address.c_str()); } } + cout << "finnished fetching properties from DDS, now waiting for end of state INIT_DEVICE ..." << endl; device.WaitForEndOfState("INIT_DEVICE"); #endif device.ChangeState("INIT_TASK"); From 47cdb4b3b4c3415d4972d83539aa49bc522cca5b Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Thu, 2 Jul 2015 17:40:07 +0200 Subject: [PATCH 05/34] Extending topology to use collection - FLP and EPN tasks defined in collections and multiplied by groups - small setup of 2 FLP and 4 EPN nodes on HLT dev cluster - replacing the FileWriter by a BlockFilter to simply collect the processing brahces --- topologies/o2prototype_topology.xml | 52 ++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/topologies/o2prototype_topology.xml b/topologies/o2prototype_topology.xml index cfbe580ec6e38..7e70f38cf4628 100644 --- a/topologies/o2prototype_topology.xml +++ b/topologies/o2prototype_topology.xml @@ -30,30 +30,28 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - + - - + + - + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper ClusterPublisher 1 --dds --poll-period 100 --output type=push,size=5000,method=bind,address=dummy,property=DataPublisherOutputAddress,min-port=48000 --library libAliHLTUtil.so --component FilePublisher --run 167808 --parameter '-datafilelist /tmp/tpc-cluster-publisher.conf' - flphosts DataPublisherOutputAddress - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Relay 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=DataPublisherOutputAddress,count=1,global --output type=push,size=5000,method=connect,property=FLPSenderInputAddress,count=1 --library libAliHLTUtil.so --component BlockFilter --run 167808 --parameter '-loglevel=0x79' - flphosts + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Relay 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=DataPublisherOutputAddress,count=1,global --output type=push,size=5000,method=connect,property=FLPSenderInputAddress,count=1 --library libAliHLTUtil.so --component BlockFilter --run 167808 --parameter '-loglevel=0x79' -s 10000000 DataPublisherOutputAddress FLPSenderInputAddress @@ -61,8 +59,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id 0 --event-size 593750 --num-inputs 3 --num-outputs 1 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --output-socket-type push --output-buff-size 10 --output-method connect --output-rate-logging 1 - flphosts + $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id 0 --event-size 593750 --num-inputs 3 --num-outputs 4 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --output-socket-type push --output-buff-size 10 --output-method connect --output-rate-logging 1 FLPSenderInputAddress FLPSenderHeartbeatInputAddress @@ -71,8 +68,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN0 --num-outputs 2 --num-flps 1 --input-socket-type pull --input-buff-size 10 --input-method bind --input-rate-logging 1 --output-socket-type pub --output-buff-size 10 --output-method connect --output-rate-logging 0 --nextstep-socket-type push --nextstep-buff-size 10 --nextstep-method bind --nextstep-rate-logging 1 - epnhosts + $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN0 --num-outputs 3 --num-flps 2 --input-socket-type pull --input-buff-size 10 --input-method bind --input-rate-logging 1 --output-socket-type pub --output-buff-size 10 --output-method connect --output-rate-logging 0 --nextstep-socket-type push --nextstep-buff-size 10 --nextstep-method bind --nextstep-rate-logging 1 FLPSenderHeartbeatInputAddress EPNReceiverInputAddress @@ -82,7 +78,6 @@ The following parameters need adjustment when extending the FLP-EPN configuratio $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Tracker 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=EPNReceiverOutputAddress,count=1 --output type=push,size=500,method=bind,property=TrackingOutputAddress,min-port=48000 --library libAliHLTTPC.so --component TPCCATracker --run 167808 --parameter '-GlobalTracking -allowGPU -GPUHelperThreads 4 -loglevel=0x7c' - epnhosts EPNReceiverOutputAddress @@ -92,7 +87,6 @@ The following parameters need adjustment when extending the FLP-EPN configuratio $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper GlobalMerger 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=TrackingOutputAddress,count=1 --output type=push,size=500,method=connect,property=CollectorInputAddress,count=1,global --library libAliHLTTPC.so --component TPCCAGlobalMerger --run 167808 --parameter '-loglevel=0x7c' - epnhosts TrackingOutputAddress @@ -101,26 +95,38 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Collector 1 --dds --poll-period 100 --input type=pull,size=500,method=bind,property=CollectorInputAddress,min-port=48000 --library libAliHLTUtil.so --component FileWriter --run 167808 --parameter '-directory tracker-output -subdir -idfmt=%04d -specfmt=_%08x -blocknofmt= -loglevel=0x7c -write-all-blocks -publisher-conf tracker-output/datablocks.txt' + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Collector 1 --dds --poll-period 100 --input type=pull,size=500,method=bind,property=CollectorInputAddress,min-port=48000 --library libAliHLTUtil.so --component BlockFilter --run 167808 --parameter '-origin SKIP' -s 1000000 collectorhosts CollectorInputAddress - + + flphosts + + dataPublisher + relay + flpSender + + + + + epnhosts + + epnReceiver + tracker + merger + +
collector - - dataPublisher - relay - flpSender + + flpcollection - - epnReceiver - tracker - merger + + epncollection
From f1c66a57cd7b4241558b15edff31ba06a08bd6e2 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Fri, 3 Jul 2015 16:15:32 +0200 Subject: [PATCH 06/34] extending O2 prototype topology - adding task and collection index in the device id - using collection index to determine the configuration file of the ClusterPublisher --- topologies/o2prototype_topology.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/topologies/o2prototype_topology.xml b/topologies/o2prototype_topology.xml index 7e70f38cf4628..e9a30c5a1273e 100644 --- a/topologies/o2prototype_topology.xml +++ b/topologies/o2prototype_topology.xml @@ -44,14 +44,14 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper ClusterPublisher 1 --dds --poll-period 100 --output type=push,size=5000,method=bind,address=dummy,property=DataPublisherOutputAddress,min-port=48000 --library libAliHLTUtil.so --component FilePublisher --run 167808 --parameter '-datafilelist /tmp/tpc-cluster-publisher.conf' + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper ClusterPublisher_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --output type=push,size=5000,method=bind,address=dummy,property=DataPublisherOutputAddress,min-port=48000 --library libAliHLTUtil.so --component FilePublisher --run 167808 --parameter '-datafilelist /home/richterm/workdir/dds-rundir/data-configuration/tpc-cluster-publisher_slice%collectionIndex%.conf' DataPublisherOutputAddress - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Relay 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=DataPublisherOutputAddress,count=1,global --output type=push,size=5000,method=connect,property=FLPSenderInputAddress,count=1 --library libAliHLTUtil.so --component BlockFilter --run 167808 --parameter '-loglevel=0x79' -s 10000000 + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Relay_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=DataPublisherOutputAddress,count=1,global --output type=push,size=5000,method=connect,property=FLPSenderInputAddress,count=1 --library libAliHLTUtil.so --component BlockFilter --run 167808 --parameter '-loglevel=0x79' -s 10000000 DataPublisherOutputAddress FLPSenderInputAddress @@ -59,7 +59,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id 0 --event-size 593750 --num-inputs 3 --num-outputs 4 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --output-socket-type push --output-buff-size 10 --output-method connect --output-rate-logging 1 + $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id flpSender_%collectionIndex%_%taskIndex% --event-size 593750 --num-inputs 3 --num-outputs 4 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --output-socket-type push --output-buff-size 10 --output-method connect --output-rate-logging 1 FLPSenderInputAddress FLPSenderHeartbeatInputAddress @@ -68,7 +68,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN0 --num-outputs 3 --num-flps 2 --input-socket-type pull --input-buff-size 10 --input-method bind --input-rate-logging 1 --output-socket-type pub --output-buff-size 10 --output-method connect --output-rate-logging 0 --nextstep-socket-type push --nextstep-buff-size 10 --nextstep-method bind --nextstep-rate-logging 1 + $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN_%collectionIndex%_%taskIndex% --num-outputs 3 --num-flps 2 --input-socket-type pull --input-buff-size 10 --input-method bind --input-rate-logging 1 --output-socket-type pub --output-buff-size 10 --output-method connect --output-rate-logging 0 --nextstep-socket-type push --nextstep-buff-size 10 --nextstep-method bind --nextstep-rate-logging 1 FLPSenderHeartbeatInputAddress EPNReceiverInputAddress @@ -77,7 +77,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Tracker 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=EPNReceiverOutputAddress,count=1 --output type=push,size=500,method=bind,property=TrackingOutputAddress,min-port=48000 --library libAliHLTTPC.so --component TPCCATracker --run 167808 --parameter '-GlobalTracking -allowGPU -GPUHelperThreads 4 -loglevel=0x7c' + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper Tracker_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=EPNReceiverOutputAddress,count=1 --output type=push,size=500,method=bind,property=TrackingOutputAddress,min-port=48000 --library libAliHLTTPC.so --component TPCCATracker --run 167808 --parameter '-GlobalTracking -allowGPU -GPUHelperThreads 4 -loglevel=0x7c' EPNReceiverOutputAddress @@ -86,7 +86,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper GlobalMerger 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=TrackingOutputAddress,count=1 --output type=push,size=500,method=connect,property=CollectorInputAddress,count=1,global --library libAliHLTTPC.so --component TPCCAGlobalMerger --run 167808 --parameter '-loglevel=0x7c' + $ALICEO2_INSTALL_DIR/bin/aliceHLTWrapper GlobalMerger_%collectionIndex%_%taskIndex% 1 --dds --poll-period 100 --input type=pull,size=5000,method=connect,property=TrackingOutputAddress,count=1 --output type=push,size=500,method=connect,property=CollectorInputAddress,count=1,global --library libAliHLTTPC.so --component TPCCAGlobalMerger --run 167808 --parameter '-loglevel=0x7c' TrackingOutputAddress From 807832fe0069e6c9a08de0f58a5b3270abc5494a Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 2 Sep 2015 11:26:57 +0200 Subject: [PATCH 07/34] Disable module 'Generators' if Phythia8 not available --- Generators/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Generators/CMakeLists.txt b/Generators/CMakeLists.txt index 3f0131a60a19a..958674cc86334 100644 --- a/Generators/CMakeLists.txt +++ b/Generators/CMakeLists.txt @@ -2,6 +2,7 @@ # the array . # The extension is already found. Any number of sources could be listed here. +if(PYTHIA8_INCLUDE_DIR) set(INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR}/Generators ) @@ -38,3 +39,6 @@ set(LIBRARY_NAME O2Gen) set(DEPENDENCIES Base O2Data pythia8 Pythia6) GENERATE_LIBRARY() +else(PYTHIA8_INCLUDE_DIR) + message(STATUS "module 'Generators' requires Pythia8 ... deactivated") +endif(PYTHIA8_INCLUDE_DIR) From 91a4a0b92fdbf3fa682aed18e2da61f483c99afa Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Wed, 2 Sep 2015 11:27:55 +0200 Subject: [PATCH 08/34] Build system enhancement: find FAIRROOTPATH from fairroot-config --- CMakeLists.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8b388a8cf899..fef94d6b635ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,23 @@ project(ALICEO2) Option(ALICEO2_MODULAR_BUILD "Modular build without environment variables" OFF) if(NOT ALICEO2_MODULAR_BUILD) IF(NOT DEFINED ENV{FAIRROOTPATH}) - MESSAGE(FATAL_ERROR "You did not define the environment variable FAIRROOTPATH which is needed to find FairRoot. Please set this variable and execute cmake again.") + FIND_PROGRAM(FAIRROOT_CONFIG_EXECUTABLE NAMES fairroot-config + ) + + IF(FAIRROOT_CONFIG_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${FAIRROOT_CONFIG_EXECUTABLE} --fairsoft_path + OUTPUT_VARIABLE FAIRROOTPATH + ) + ENDIF(FAIRROOT_CONFIG_EXECUTABLE) + STRING(STRIP ${FAIRROOTPATH} FAIRROOTPATH) + + IF(DEFINED FAIRROOTPATH) + SET(ENV{FAIRROOTPATH} ${FAIRROOTPATH}) + ELSE(DEFINED FAIRROOTPATH) + MESSAGE(FATAL_ERROR "Can not find FairRoot. Either set variable FAIRROOTPATH or make sure the installation path is in variable PATH, and execute cmake again.") + ENDIF(DEFINED FAIRROOTPATH) + ELSE(NOT DEFINED ENV{FAIRROOTPATH}) + SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) ENDIF(NOT DEFINED ENV{FAIRROOTPATH}) IF(NOT DEFINED ENV{SIMPATH}) @@ -42,7 +58,6 @@ if(NOT ALICEO2_MODULAR_BUILD) ENDIF(NOT DEFINED ENV{SIMPATH}) SET(SIMPATH $ENV{SIMPATH}) - SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ # is checked @@ -52,6 +67,7 @@ if(NOT ALICEO2_MODULAR_BUILD) Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks") else(NOT ALICEO2_MODULAR_BUILD) + message(FATAL_ERROR "build option 'ALICEO2_MODULAR_BUILD' not supported yet") find_package(Boost REQUIRED) endif(NOT ALICEO2_MODULAR_BUILD) From efc16346a5aacd04372b39623ab1d7b8328699d1 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Sun, 16 Aug 2015 16:49:02 +0200 Subject: [PATCH 09/34] Return 0 rather than a random value. Otherwise this causes an error when compiling on Mac with the latest xcode. --- its/ContainerFactory.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/its/ContainerFactory.cxx b/its/ContainerFactory.cxx index f5f117c6a6809..a9615f2196420 100644 --- a/its/ContainerFactory.cxx +++ b/its/ContainerFactory.cxx @@ -39,4 +39,5 @@ FairParSet* ContainerFactory::createContainer(FairContainer* c) // c->GetTitle(),c->getContext()); //} // return p; + return 0; } From a17fba6268cae18a880394d45dbdca4de77ad6cb Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:14:15 +0200 Subject: [PATCH 10/34] Fix undefined behaviour. - Return 0 to avoid random result. - Assert in case code cannot / should not be reached. --- Data/MCTrack.cxx | 1 + devices/flp2epn-distributed/FLPSender.cxx | 2 ++ devices/flp2epn-dynamic/O2FLPex.cxx | 2 ++ passive/PassiveContFact.cxx | 1 + tpc/ContainerFactory.cxx | 1 + 5 files changed, 7 insertions(+) diff --git a/Data/MCTrack.cxx b/Data/MCTrack.cxx index 5b0a9b5341801..049ce9970127f 100644 --- a/Data/MCTrack.cxx +++ b/Data/MCTrack.cxx @@ -118,6 +118,7 @@ Int_t MCTrack::getNumberOfPoints(DetectorId detId) const // return 0; // } // + return 0; } void MCTrack::setNumberOfPoints(Int_t iDet, Int_t nPoints) diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index 2e39541c9707e..107807ea2d9d7 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -7,6 +7,7 @@ #include #include // UINT64_MAX +#include #include #include @@ -298,4 +299,5 @@ ptime FLPSender::GetProperty(const int key, const ptime default_, const int slot case OutputHeartbeat: return fOutputHeartbeat.at(slot); } + assert(false); } diff --git a/devices/flp2epn-dynamic/O2FLPex.cxx b/devices/flp2epn-dynamic/O2FLPex.cxx index d63cb1421bef2..1c18dc212e5fc 100644 --- a/devices/flp2epn-dynamic/O2FLPex.cxx +++ b/devices/flp2epn-dynamic/O2FLPex.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include "O2FLPex.h" #include "FairMQLogger.h" @@ -188,4 +189,5 @@ boost::posix_time::ptime O2FLPex::GetProperty(const int key, const boost::posix_ case OutputHeartbeat: return fOutputHeartbeat.at(slot); } + assert(false); } diff --git a/passive/PassiveContFact.cxx b/passive/PassiveContFact.cxx index b50006dab3a61..a936b636a1179 100644 --- a/passive/PassiveContFact.cxx +++ b/passive/PassiveContFact.cxx @@ -71,5 +71,6 @@ FairParSet* PassiveContFact::createContainer(FairContainer* c) } return p; */ + return 0; } diff --git a/tpc/ContainerFactory.cxx b/tpc/ContainerFactory.cxx index 7a5abc3cbb5f5..337d53a9029fe 100644 --- a/tpc/ContainerFactory.cxx +++ b/tpc/ContainerFactory.cxx @@ -51,4 +51,5 @@ FairParSet* ContainerFactory::createContainer(FairContainer* c) } return p; */ + return 0; } From 9bfa449626a1e6536e5525e5137e7a05dbf193bb Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:16:14 +0200 Subject: [PATCH 11/34] Add missing dependencies on ZMQ and ROOT. ZMQ headers referred, but ZMQ not added to include path. --- devices/flp2epn-distributed/CMakeLists.txt | 1 + devices/flp2epn-dynamic/CMakeLists.txt | 1 + devices/flp2epn/CMakeLists.txt | 1 + devices/hough/CMakeLists.txt | 2 ++ devices/roundtrip/CMakeLists.txt | 1 + o2cdb/CMakeLists.txt | 1 + 6 files changed, 7 insertions(+) diff --git a/devices/flp2epn-distributed/CMakeLists.txt b/devices/flp2epn-distributed/CMakeLists.txt index 6a5a9f169089e..c04de292c0d3c 100644 --- a/devices/flp2epn-distributed/CMakeLists.txt +++ b/devices/flp2epn-distributed/CMakeLists.txt @@ -5,6 +5,7 @@ set(INCLUDE_DIRECTORIES set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/devices/flp2epn-dynamic/CMakeLists.txt b/devices/flp2epn-dynamic/CMakeLists.txt index b3ce32a0ce626..c6d07842dda8f 100644 --- a/devices/flp2epn-dynamic/CMakeLists.txt +++ b/devices/flp2epn-dynamic/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ) include_directories(${INCLUDE_DIRECTORIES}) diff --git a/devices/flp2epn/CMakeLists.txt b/devices/flp2epn/CMakeLists.txt index b2f0dc338bc9d..47cf5c76988ff 100644 --- a/devices/flp2epn/CMakeLists.txt +++ b/devices/flp2epn/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/devices/hough/CMakeLists.txt b/devices/hough/CMakeLists.txt index a324ecb692d41..44308c5c90bb3 100644 --- a/devices/hough/CMakeLists.txt +++ b/devices/hough/CMakeLists.txt @@ -1,6 +1,7 @@ set(INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} + ${ROOT_INCLUDE_DIR} ${ALIROOT}/include ${SIMPATH}/include/root ) @@ -9,6 +10,7 @@ include_directories(SYSTEM ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${Boost_LIBRARY_DIRS} + ${ROOT_LIBRARY_DIR} ${ALIROOT}/lib ${SIMPATH}/lib/root ) diff --git a/devices/roundtrip/CMakeLists.txt b/devices/roundtrip/CMakeLists.txt index 7d5d0ba8cafa7..a5129d982aa0b 100644 --- a/devices/roundtrip/CMakeLists.txt +++ b/devices/roundtrip/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${FAIRROOT_INCLUDE_DIR} + ${ZMQ_INCLUDE_DIR} ${AlFa_DIR}/include ) diff --git a/o2cdb/CMakeLists.txt b/o2cdb/CMakeLists.txt index 1e01431b69d4e..23527baf72d59 100644 --- a/o2cdb/CMakeLists.txt +++ b/o2cdb/CMakeLists.txt @@ -6,6 +6,7 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${BASE_INCLUDE_DIRECTORIES} ${Boost_INCLUDE_DIR} ${ROOT_INCLUDE_DIR} + ${FAIRROOT_INCLUDE_DIR} ) include_directories(${INCLUDE_DIRECTORIES}) From 7cdb92b82187a6924eb41f7a1fe576ae5cb2790d Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Tue, 18 Aug 2015 00:47:25 +0200 Subject: [PATCH 12/34] Get rid of warning about implicit namespace. std:: is not really defined yet, so clang on mac actually complains about an implicitly defined namespace in the using statement. --- devices/aliceHLTwrapper/AliHLTDataTypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/devices/aliceHLTwrapper/AliHLTDataTypes.h b/devices/aliceHLTwrapper/AliHLTDataTypes.h index d36e3cae6a41b..bb7cb7b1412b2 100644 --- a/devices/aliceHLTwrapper/AliHLTDataTypes.h +++ b/devices/aliceHLTwrapper/AliHLTDataTypes.h @@ -1433,6 +1433,7 @@ extern "C" { } +namespace std {} using namespace std; ////////////////////////////////////////////////////////////////////////// From 92fc4d6a391e42c8031376d183c26b43574a6443 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 19 Aug 2015 10:04:23 +0200 Subject: [PATCH 13/34] Silence warning. --- devices/aliceHLTwrapper/Component.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/aliceHLTwrapper/Component.cxx b/devices/aliceHLTwrapper/Component.cxx index ebbcc2de66762..e0f173f4afef1 100644 --- a/devices/aliceHLTwrapper/Component.cxx +++ b/devices/aliceHLTwrapper/Component.cxx @@ -305,7 +305,7 @@ int Component::process(vector& dataArray, for (; ci != inputBlocks.end(); ci++) { AliHLTUInt8_t* pInputBufferStart = reinterpret_cast(ci->fPtr); AliHLTUInt8_t* pInputBufferEnd = pInputBufferStart + ci->fSize; - if (bValid = (pStart >= pInputBufferStart && pEnd <= pInputBufferEnd)) { + if ((bValid = (pStart >= pInputBufferStart && pEnd <= pInputBufferEnd))) { break; } } From 63525dec9b6b38e8987774ed65fb6b10c27b868c Mon Sep 17 00:00:00 2001 From: Giulio Eulisse Date: Wed, 19 Aug 2015 10:17:59 +0200 Subject: [PATCH 14/34] Adjust Pythia8 so that it works both with 8175 and 82XX. Since 82XX there is only Pythia::init(). This mimicks the old, multi-argument Pythia::init(..). --- Generators/Pythia8Generator.cxx | 14 ++++++++++++-- Generators/Pythia8Generator.h | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Generators/Pythia8Generator.cxx b/Generators/Pythia8Generator.cxx index 29e850e90305a..c2cadc4d22c34 100644 --- a/Generators/Pythia8Generator.cxx +++ b/Generators/Pythia8Generator.cxx @@ -12,7 +12,7 @@ #include #include "TROOT.h" -#include "Pythia.h" +#include "Pythia8/Pythia.h" #include "FairPrimaryGenerator.h" //#include "FairGenerator.h" @@ -40,7 +40,17 @@ Bool_t Pythia8Generator::Init() fPythia.setRndmEnginePtr(fRandomEngine); cout<<"Beam Momentum "< Date: Wed, 19 Aug 2015 15:04:53 +0200 Subject: [PATCH 15/34] Add PYTHIA6 library path. --- Generators/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Generators/CMakeLists.txt b/Generators/CMakeLists.txt index 958674cc86334..bc59b0825b7c4 100644 --- a/Generators/CMakeLists.txt +++ b/Generators/CMakeLists.txt @@ -22,6 +22,8 @@ include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${FAIRROOT_LIBRARY_DIR} +${Pythia6_LIBRARY_DIR} +${PYTHIA8_LIBRARY_DIR} ${AlFa_DIR}/lib ${SIMPATH}/lib ) From eeafb150da5e6b038d2a23ebd055bd34ac5ccf97 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Mon, 28 Sep 2015 11:14:40 +0200 Subject: [PATCH 16/34] Adjustments to use the new FairMQLogger --- devices/aliceHLTwrapper/CMakeLists.txt | 20 +++++++++++++++----- devices/flp2epn-distributed/CMakeLists.txt | 19 ++++++++++++++----- devices/flp2epn-dynamic/CMakeLists.txt | 19 ++++++++++++++----- devices/flp2epn/CMakeLists.txt | 19 ++++++++++++++----- devices/roundtrip/CMakeLists.txt | 19 ++++++++++++++----- 5 files changed, 71 insertions(+), 25 deletions(-) diff --git a/devices/aliceHLTwrapper/CMakeLists.txt b/devices/aliceHLTwrapper/CMakeLists.txt index c67bcc14ad833..6e583e9ddfceb 100644 --- a/devices/aliceHLTwrapper/CMakeLists.txt +++ b/devices/aliceHLTwrapper/CMakeLists.txt @@ -64,11 +64,21 @@ set(DEPENDENCIES # ${ZMQ_LIBRARY_SHARED} ) -set(DEPENDENCIES - ${DEPENDENCIES} -# ${CMAKE_THREAD_LIBS_INIT} - boost_thread boost_system boost_chrono FairMQ -) +if(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + ${FAIRMQ_DEPENDENCIES} + boost_chrono + FairMQ + ) +else(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + boost_chrono boost_date_time boost_thread boost_timer boost_system boost_program_options FairMQ + ) +endif(FAIRMQ_DEPENDENCIES) set(LIBRARY_NAME ALICEHLT) diff --git a/devices/flp2epn-distributed/CMakeLists.txt b/devices/flp2epn-distributed/CMakeLists.txt index c04de292c0d3c..cbaf0957dc700 100644 --- a/devices/flp2epn-distributed/CMakeLists.txt +++ b/devices/flp2epn-distributed/CMakeLists.txt @@ -55,11 +55,20 @@ set(SRCS EPNReceiver.cxx ) -set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - boost_date_time boost_thread boost_timer boost_system boost_program_options FairMQ -) +if(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + ${FAIRMQ_DEPENDENCIES} + FairMQ + ) +else(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + boost_date_time boost_thread boost_timer boost_system boost_program_options boost_chrono FairMQ + ) +endif(FAIRMQ_DEPENDENCIES) if(DDS_LOCATION) set(DEPENDENCIES diff --git a/devices/flp2epn-dynamic/CMakeLists.txt b/devices/flp2epn-dynamic/CMakeLists.txt index c6d07842dda8f..ea0fb17badfe6 100644 --- a/devices/flp2epn-dynamic/CMakeLists.txt +++ b/devices/flp2epn-dynamic/CMakeLists.txt @@ -27,11 +27,20 @@ set(SRCS O2EPNex.cxx ) -set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - boost_date_time boost_thread boost_timer boost_system boost_program_options FairMQ -) +if(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + ${FAIRMQ_DEPENDENCIES} + FairMQ + ) +else(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + boost_date_time boost_thread boost_timer boost_system boost_program_options boost_chrono FairMQ + ) +endif(FAIRMQ_DEPENDENCIES) set(LIBRARY_NAME FLP2EPNex_dynamic) diff --git a/devices/flp2epn/CMakeLists.txt b/devices/flp2epn/CMakeLists.txt index 47cf5c76988ff..95c654203df63 100644 --- a/devices/flp2epn/CMakeLists.txt +++ b/devices/flp2epn/CMakeLists.txt @@ -32,11 +32,20 @@ set(SRCS O2EpnMerger.cxx ) -set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - boost_thread boost_timer boost_system boost_program_options FairMQ -) +if(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + ${FAIRMQ_DEPENDENCIES} + FairMQ + ) +else(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + boost_date_time boost_thread boost_timer boost_system boost_program_options boost_chrono FairMQ + ) +endif(FAIRMQ_DEPENDENCIES) set(LIBRARY_NAME FLP2EPNex) diff --git a/devices/roundtrip/CMakeLists.txt b/devices/roundtrip/CMakeLists.txt index a5129d982aa0b..34bc16def7ab3 100644 --- a/devices/roundtrip/CMakeLists.txt +++ b/devices/roundtrip/CMakeLists.txt @@ -30,11 +30,20 @@ set(SRCS RoundtripServer.cxx ) -set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - boost_date_time boost_thread boost_timer boost_system boost_program_options FairMQ -) +if(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + ${FAIRMQ_DEPENDENCIES} + FairMQ + ) +else(FAIRMQ_DEPENDENCIES) + set(DEPENDENCIES + ${DEPENDENCIES} + ${CMAKE_THREAD_LIBS_INIT} + boost_date_time boost_thread boost_timer boost_system boost_program_options boost_chrono FairMQ + ) +endif(FAIRMQ_DEPENDENCIES) set(LIBRARY_NAME RoundtripTest) From 63763012572a04f1256e811851397d110a2707b6 Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Mon, 5 Oct 2015 16:56:31 +0200 Subject: [PATCH 17/34] Reconstruction only configuration Geant3 is not reqiured anymore if the Pythia 6 & 8 not found we do not build the Generators if AliRoot is not found we do not build the HLT-Wrappers --- CMakeLists.txt | 26 ++++++-------------------- devices/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fef94d6b635ba..610a935ffe8d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,23 +34,7 @@ project(ALICEO2) Option(ALICEO2_MODULAR_BUILD "Modular build without environment variables" OFF) if(NOT ALICEO2_MODULAR_BUILD) IF(NOT DEFINED ENV{FAIRROOTPATH}) - FIND_PROGRAM(FAIRROOT_CONFIG_EXECUTABLE NAMES fairroot-config - ) - - IF(FAIRROOT_CONFIG_EXECUTABLE) - EXECUTE_PROCESS(COMMAND ${FAIRROOT_CONFIG_EXECUTABLE} --fairsoft_path - OUTPUT_VARIABLE FAIRROOTPATH - ) - ENDIF(FAIRROOT_CONFIG_EXECUTABLE) - STRING(STRIP ${FAIRROOTPATH} FAIRROOTPATH) - - IF(DEFINED FAIRROOTPATH) - SET(ENV{FAIRROOTPATH} ${FAIRROOTPATH}) - ELSE(DEFINED FAIRROOTPATH) - MESSAGE(FATAL_ERROR "Can not find FairRoot. Either set variable FAIRROOTPATH or make sure the installation path is in variable PATH, and execute cmake again.") - ENDIF(DEFINED FAIRROOTPATH) - ELSE(NOT DEFINED ENV{FAIRROOTPATH}) - SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) + MESSAGE(FATAL_ERROR "You did not define the environment variable FAIRROOTPATH which is needed to find FairRoot. Please set this variable and execute cmake again.") ENDIF(NOT DEFINED ENV{FAIRROOTPATH}) IF(NOT DEFINED ENV{SIMPATH}) @@ -58,6 +42,7 @@ if(NOT ALICEO2_MODULAR_BUILD) ENDIF(NOT DEFINED ENV{SIMPATH}) SET(SIMPATH $ENV{SIMPATH}) + SET(FAIRROOTPATH $ENV{FAIRROOTPATH}) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ # is checked @@ -67,7 +52,6 @@ if(NOT ALICEO2_MODULAR_BUILD) Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks") else(NOT ALICEO2_MODULAR_BUILD) - message(FATAL_ERROR "build option 'ALICEO2_MODULAR_BUILD' not supported yet") find_package(Boost REQUIRED) endif(NOT ALICEO2_MODULAR_BUILD) @@ -124,7 +108,7 @@ CHECK_EXTERNAL_PACKAGE_INSTALL_DIR() # mandatory find_package(ROOT 5.32.00 REQUIRED) -find_package(Pythia8) +find_package(Pythian) find_package(Pythia6) if(ALICEO2_MODULAR_BUILD) # Geant3, Geant4 installed via cmake @@ -132,7 +116,7 @@ if(ALICEO2_MODULAR_BUILD) find_package(Geant4 REQUIRED) else(ALICEO2_MODULAR_BUILD) # For old versions of VMC packages (to be removed) - find_package(GEANT3 REQUIRED) + find_package(GEANT3) find_package(GEANT4) find_package(GEANT4DATA) find_package(GEANT4VMC) @@ -224,7 +208,9 @@ endif(NOT ALICEO2_MODULAR_BUILD) add_subdirectory (Base) add_subdirectory (Data) +if (PYTHIA8_FOUND AND Pythia6_FOUND) add_subdirectory (Generators) +Endif () add_subdirectory (its) add_subdirectory (tpc) add_subdirectory (passive) diff --git a/devices/CMakeLists.txt b/devices/CMakeLists.txt index d97fe3352d27a..ff0497e62e4cc 100644 --- a/devices/CMakeLists.txt +++ b/devices/CMakeLists.txt @@ -1,8 +1,8 @@ -add_subdirectory (aliceHLTwrapper) add_subdirectory (flp2epn) add_subdirectory (flp2epn-dynamic) add_subdirectory (flp2epn-distributed) if(ALIROOT) add_subdirectory (hough) + add_subdirectory (aliceHLTwrapper) endif(ALIROOT) add_subdirectory (roundtrip) From d3eb67445176c13346708a241e6089be14a71ab9 Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Mon, 5 Oct 2015 21:23:22 +0200 Subject: [PATCH 18/34] Correct typo in CMakeList.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 610a935ffe8d4..6b8903205f3cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ CHECK_EXTERNAL_PACKAGE_INSTALL_DIR() # mandatory find_package(ROOT 5.32.00 REQUIRED) -find_package(Pythian) +find_package(Pythia8) find_package(Pythia6) if(ALICEO2_MODULAR_BUILD) # Geant3, Geant4 installed via cmake From 0352dd31fc3459a47ca8f46311ac00eb3ba69054 Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Wed, 7 Oct 2015 15:25:53 +0200 Subject: [PATCH 19/34] Remove unused header file from the include list. --- passive/Cave.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/passive/Cave.cxx b/passive/Cave.cxx index 548a822c3ea9a..c94a8170b605c 100644 --- a/passive/Cave.cxx +++ b/passive/Cave.cxx @@ -16,11 +16,9 @@ #include "FairGeoInterface.h" // for FairGeoInterface #include "FairGeoLoader.h" // for FairGeoLoader #include "FairGeoNode.h" // for FairGeoNode -#include "FairGeoPassivePar.h" // for FairGeoPassivePar #include "FairGeoVolume.h" // for FairGeoVolume #include "FairRun.h" // for FairRun #include "FairRuntimeDb.h" // for FairRuntimeDb - #include "TList.h" // for TListIter, TList (ptr only) #include "TObjArray.h" // for TObjArray #include "TString.h" // for TString From 95ca76b2b69793025a50c0190cad719e47c50cdb Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Wed, 7 Oct 2015 21:56:58 +0200 Subject: [PATCH 20/34] Implement target checkHEADERS to use the include-what-you-use tool. Copy ROOTMacros.cmake from FairRoot to cmake/modules. Do some small change in the cmake script which is needed to find all include directories. Change the directory order of the CMAKE_MODULE_PATH such that cmake/modules has highest priority. Search for package IWYU and create build target to use it. --- CMakeLists.txt | 9 +- cmake/modules/ROOTMacros.cmake | 352 +++++++++++++++++++++++++++++++++ 2 files changed, 359 insertions(+), 2 deletions(-) create mode 100644 cmake/modules/ROOTMacros.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b8903205f3cd..5e7b1bfe3d81c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,9 +46,9 @@ if(NOT ALICEO2_MODULAR_BUILD) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ # is checked - set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules_old" ${CMAKE_MODULE_PATH}) + set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) Set(CheckSrcDir "${FAIRROOTPATH}/share/fairbase/cmake/checks") else(NOT ALICEO2_MODULAR_BUILD) @@ -124,7 +124,7 @@ else(ALICEO2_MODULAR_BUILD) endif(ALICEO2_MODULAR_BUILD) find_package(CERNLIB) find_package(HEPMC) - +find_package(IWYU) if(NOT BOOST_ROOT) Set(Boost_NO_SYSTEM_PATHS TRUE) @@ -229,6 +229,11 @@ if(BUILD_DOXYGEN) endif(BUILD_DOXYGEN) +If(IWYU_FOUND) + ADD_CUSTOM_TARGET(checkHEADERS + DEPENDS $ENV{ALL_HEADER_RULES} + ) +EndIf() WRITE_CONFIG_FILE(config.sh) diff --git a/cmake/modules/ROOTMacros.cmake b/cmake/modules/ROOTMacros.cmake new file mode 100644 index 0000000000000..d28c36d410668 --- /dev/null +++ b/cmake/modules/ROOTMacros.cmake @@ -0,0 +1,352 @@ + ################################################################################ + # Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH # + # # + # This software is distributed under the terms of the # + # GNU Lesser General Public Licence version 3 (LGPL) version 3, # + # copied verbatim in the file "LICENSE" # + ################################################################################ +Function(Format _output input prefix suffix) + +# DevNotes - input should be put in quotes or the complete list does not get passed to the function + set(format) + foreach(arg ${input}) + set(item ${arg}) + if(prefix) + string(REGEX MATCH "^${prefix}" pre ${arg}) + endif(prefix) + if(suffix) + string(REGEX MATCH "${suffix}$" suf ${arg}) + endif(suffix) + if(NOT pre) + set(item "${prefix}${item}") + endif(NOT pre) + if(NOT suf) + set(item "${item}${suffix}") + endif(NOT suf) + list(APPEND format ${item}) + endforeach(arg) + set(${_output} ${format} PARENT_SCOPE) + +endfunction(Format) + + + ########################################### + # + # Macros for building ROOT dictionary + # + ########################################### +Macro(ROOT_GENERATE_DICTIONARY) + + # Macro to switch between the old implementation with parameters + # and the new implementation without parameters. + # For the new implementation some CMake variables has to be defined + # before calling the macro. + + If(${ARGC} EQUAL 0) +# Message("New Version") + ROOT_GENERATE_DICTIONARY_NEW() + Else(${ARGC} EQUAL 0) + If(${ARGC} EQUAL 4) +# Message("Old Version") + ROOT_GENERATE_DICTIONARY_OLD("${ARGV0}" "${ARGV1}" "${ARGV2}" "${ARGV3}") + Else(${ARGC} EQUAL 4) + Message(FATAL_ERROR "Has to be implemented") + EndIf(${ARGC} EQUAL 4) + EndIf(${ARGC} EQUAL 0) + +EndMacro(ROOT_GENERATE_DICTIONARY) + +Macro(ROOT_GENERATE_DICTIONARY_NEW) + + # All Arguments needed for this new version of the macro are defined + # in the parent scope, namely in the CMakeLists.txt of the submodule + set(Int_LINKDEF ${LINKDEF}) + set(Int_DICTIONARY ${DICTIONARY}) + +# Message("DEFINITIONS: ${DEFINITIONS}") + set(Int_INC ${INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRECTORIES}) + set(Int_HDRS ${HDRS}) + set(Int_DEF ${DEFINITIONS}) + + # Convert the values of the variable to a semi-colon separated list + separate_arguments(Int_INC) + separate_arguments(Int_HDRS) + separate_arguments(Int_DEF) + + # Format neccesary arguments + # Add -I and -D to include directories and definitions + Format(Int_INC "${Int_INC}" "-I" "") + Format(Int_DEF "${Int_DEF}" "-D" "") + + #---call rootcint / cling -------------------------------- + set(OUTPUT_FILES ${Int_DICTIONARY}) + if (ROOT_FOUND_VERSION GREATER 59999) + set(EXTRA_DICT_PARAMETERS "") + set(Int_ROOTMAPFILE ${LIBRARY_OUTPUT_PATH}/lib${Int_LIB}.rootmap) + set(Int_PCMFILE G__${Int_LIB}Dict_rdict.pcm) + set(OUTPUT_FILES ${OUTPUT_FILES} ${Int_PCMFILE} ${Int_ROOTMAPFILE}) + set(EXTRA_DICT_PARAMETERS ${EXTRA_DICT_PARAMETERS} + -inlineInputHeader -rmf ${Int_ROOTMAPFILE} + -rml ${Int_LIB}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set_source_files_properties(${OUTPUT_FILES} PROPERTIES GENERATED TRUE) + If (CMAKE_SYSTEM_NAME MATCHES Linux) + add_custom_command(OUTPUT ${OUTPUT_FILES} + COMMAND LD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:${_intel_lib_dirs}:$ENV{LD_LIBRARY_PATH} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} -f ${Int_DICTIONARY} ${EXTRA_DICT_PARAMETERS} -c ${Int_DEF} ${Int_INC} ${Int_HDRS} ${Int_LINKDEF} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${Int_PCMFILE} ${LIBRARY_OUTPUT_PATH}/${Int_PCMFILE} + DEPENDS ${Int_HDRS} ${Int_LINKDEF} + ) + Else (CMAKE_SYSTEM_NAME MATCHES Linux) + If (CMAKE_SYSTEM_NAME MATCHES Darwin) + add_custom_command(OUTPUT ${OUTPUT_FILES} + COMMAND DYLD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{DYLD_LIBRARY_PATH} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} -f ${Int_DICTIONARY} ${EXTRA_DICT_PARAMETERS} -c ${Int_DEF} ${Int_INC} ${Int_HDRS} ${Int_LINKDEF} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${Int_PCMFILE} ${LIBRARY_OUTPUT_PATH}/${Int_PCMFILE} + DEPENDS ${Int_HDRS} ${Int_LINKDEF} + ) + EndIf (CMAKE_SYSTEM_NAME MATCHES Darwin) + EndIf (CMAKE_SYSTEM_NAME MATCHES Linux) + install(FILES ${LIBRARY_OUTPUT_PATH}/${Int_PCMFILE} ${Int_ROOTMAPFILE} DESTINATION lib) + else (ROOT_FOUND_VERSION GREATER 59999) + + If (CMAKE_SYSTEM_NAME MATCHES Linux) + add_custom_command(OUTPUT ${OUTPUT_FILES} + COMMAND LD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:${_intel_lib_dirs}:$ENV{LD_LIBRARY_PATH} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} -f ${Int_DICTIONARY} -c ${Int_DEF} ${Int_INC} ${Int_HDRS} ${Int_LINKDEF} + DEPENDS ${Int_HDRS} ${Int_LINKDEF} + ) + Else (CMAKE_SYSTEM_NAME MATCHES Linux) + If (CMAKE_SYSTEM_NAME MATCHES Darwin) + add_custom_command(OUTPUT ${OUTPUT_FILES} + COMMAND DYLD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{DYLD_LIBRARY_PATH} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} -f ${Int_DICTIONARY} -c ${Int_DEF} ${Int_INC} ${Int_HDRS} ${Int_LINKDEF} + DEPENDS ${Int_HDRS} ${Int_LINKDEF} + ) + EndIf (CMAKE_SYSTEM_NAME MATCHES Darwin) + EndIf (CMAKE_SYSTEM_NAME MATCHES Linux) + endif (ROOT_FOUND_VERSION GREATER 59999) + + +endmacro(ROOT_GENERATE_DICTIONARY_NEW) + + +MACRO (ROOT_GENERATE_DICTIONARY_OLD INFILES LINKDEF_FILE OUTFILE INCLUDE_DIRS_IN) + + set(INCLUDE_DIRS) + + foreach (_current_FILE ${INCLUDE_DIRS_IN}) + set(INCLUDE_DIRS ${INCLUDE_DIRS} -I${_current_FILE}) + endforeach (_current_FILE ${INCLUDE_DIRS_IN}) + +# Message("Definitions: ${DEFINITIONS}") +# MESSAGE("INFILES: ${INFILES}") +# MESSAGE("OutFILE: ${OUTFILE}") +# MESSAGE("LINKDEF_FILE: ${LINKDEF_FILE}") +# MESSAGE("INCLUDE_DIRS: ${INCLUDE_DIRS}") + + STRING(REGEX REPLACE "^(.*)\\.(.*)$" "\\1.h" bla "${OUTFILE}") +# MESSAGE("BLA: ${bla}") + SET (OUTFILES ${OUTFILE} ${bla}) + + + if (CMAKE_SYSTEM_NAME MATCHES Linux) + ADD_CUSTOM_COMMAND(OUTPUT ${OUTFILES} + COMMAND LD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:${_intel_lib_dirs} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} + ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${INCLUDE_DIRS} ${INFILES} ${LINKDEF_FILE} DEPENDS ${INFILES} ${LINKDEF_FILE}) + else (CMAKE_SYSTEM_NAME MATCHES Linux) + if (CMAKE_SYSTEM_NAME MATCHES Darwin) + ADD_CUSTOM_COMMAND(OUTPUT ${OUTFILES} + COMMAND DYLD_LIBRARY_PATH=${ROOT_LIBRARY_DIR} ROOTSYS=${ROOTSYS} ${ROOT_CINT_EXECUTABLE} + ARGS -f ${OUTFILE} -c -DHAVE_CONFIG_H ${INCLUDE_DIRS} ${INFILES} ${LINKDEF_FILE} DEPENDS ${INFILES} ${LINKDEF_FILE}) + endif (CMAKE_SYSTEM_NAME MATCHES Darwin) + endif (CMAKE_SYSTEM_NAME MATCHES Linux) + +ENDMACRO (ROOT_GENERATE_DICTIONARY_OLD) + +MACRO (GENERATE_ROOT_TEST_SCRIPT SCRIPT_FULL_NAME) + + get_filename_component(path_name ${SCRIPT_FULL_NAME} PATH) + get_filename_component(file_extension ${SCRIPT_FULL_NAME} EXT) + get_filename_component(file_name ${SCRIPT_FULL_NAME} NAME_WE) + set(shell_script_name "${file_name}.sh") + + #MESSAGE("PATH: ${path_name}") + #MESSAGE("Ext: ${file_extension}") + #MESSAGE("Name: ${file_name}") + #MESSAGE("Shell Name: ${shell_script_name}") + + string(REPLACE ${PROJECT_SOURCE_DIR} + ${PROJECT_BINARY_DIR} new_path ${path_name} + ) + + #MESSAGE("New PATH: ${new_path}") + + file(MAKE_DIRECTORY ${new_path}/data) + + CONVERT_LIST_TO_STRING(${LD_LIBRARY_PATH}) + set(MY_LD_LIBRARY_PATH ${output}) + set(my_script_name ${SCRIPT_FULL_NAME}) + + + IF(FAIRROOTPATH) + configure_file(${FAIRROOTPATH}/share/fairbase/cmake/scripts/root_macro.sh.in + ${new_path}/${shell_script_name} + ) + ELSE(FAIRROOTPATH) + + configure_file(${PROJECT_SOURCE_DIR}/cmake/scripts/root_macro.sh.in + ${new_path}/${shell_script_name} + ) + ENDIF(FAIRROOTPATH) + + EXEC_PROGRAM(/bin/chmod ARGS "u+x ${new_path}/${shell_script_name}") + +ENDMACRO (GENERATE_ROOT_TEST_SCRIPT) + + +Macro(ROOT_GENERATE_ROOTMAP) + + # All Arguments needed for this new version of the macro are defined + # in the parent scope, namely in the CMakeLists.txt of the submodule + if (DEFINED LINKDEF) + foreach(l ${LINKDEF}) + If( IS_ABSOLUTE ${l}) + Set(Int_LINKDEF ${Int_LINKDEF} ${l}) + Else( IS_ABSOLUTE ${l}) + Set(Int_LINKDEF ${Int_LINKDEF} ${CMAKE_CURRENT_SOURCE_DIR}/${l}) + EndIf( IS_ABSOLUTE ${l}) + endforeach() + + foreach(d ${DEPENDENCIES}) + get_filename_component(_ext ${d} EXT) + If(NOT _ext MATCHES a$) + if(_ext) + set(Int_DEPENDENCIES ${Int_DEPENDENCIES} ${d}) + else() + set(Int_DEPENDENCIES ${Int_DEPENDENCIES} lib${d}.so) + endif() + Else() + Message("Found Static library with extension ${_ext}") + EndIf() + endforeach() + + set(Int_LIB ${LIBRARY_NAME}) + set(Int_OUTFILE ${LIBRARY_OUTPUT_PATH}/lib${Int_LIB}.rootmap) + + add_custom_command(OUTPUT ${Int_OUTFILE} + COMMAND ${RLIBMAP_EXECUTABLE} -o ${Int_OUTFILE} -l ${Int_LIB} + -d ${Int_DEPENDENCIES} -c ${Int_LINKDEF} + DEPENDS ${Int_LINKDEF} ${RLIBMAP_EXECUTABLE} ) + add_custom_target( lib${Int_LIB}.rootmap ALL DEPENDS ${Int_OUTFILE}) + set_target_properties(lib${Int_LIB}.rootmap PROPERTIES FOLDER RootMaps ) + #---Install the rootmap file------------------------------------ + #install(FILES ${Int_OUTFILE} DESTINATION lib COMPONENT libraries) + install(FILES ${Int_OUTFILE} DESTINATION lib) + endif(DEFINED LINKDEF) +EndMacro(ROOT_GENERATE_ROOTMAP) + +Macro(GENERATE_LIBRARY) + + set(Int_LIB ${LIBRARY_NAME}) + + Set(RuleName "${Int_LIB}_RULES") + Set(HeaderRuleName "${Int_LIB}_HEADER_RULES") + Set(DictName "G__${Int_LIB}Dict.cxx") + + If(NOT DICTIONARY) + Set(DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/${DictName}) + EndIf(NOT DICTIONARY) + + If( IS_ABSOLUTE ${DICTIONARY}) + Set(DICTIONARY ${DICTIONARY}) + Else( IS_ABSOLUTE ${DICTIONARY}) + Set(Int_DICTIONARY ${CMAKE_CURRENT_SOURCE_DIR}/${DICTIONARY}) + EndIf( IS_ABSOLUTE ${DICTIONARY}) + + Set(Int_SRCS ${SRCS}) + + If(HEADERS) + Set(HDRS ${HEADERS}) + Else(HEADERS) + CHANGE_FILE_EXTENSION(*.cxx *.h HDRS "${SRCS}") + EndIf(HEADERS) + +# Message("RuleName: ${RuleName}") + If(RULE_CHECKER_FOUND) + CHECK_RULES("${Int_SRCS}" "${INCLUDE_DIRECTORIES}" ${RuleName}) + EndIf(RULE_CHECKER_FOUND) + + If(IWYU_FOUND) + Set(_INCLUDE_DIRS ${INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRECTORIES}) + Message("DIRS: ${_INCLUDE_DIRS}") + CHECK_HEADERS("${Int_SRCS}" "${_INCLUDE_DIRS}" ${HeaderRuleName}) + EndIf(IWYU_FOUND) + + install(FILES ${HDRS} DESTINATION include) + + If(LINKDEF) + If( IS_ABSOLUTE ${LINKDEF}) + Set(Int_LINKDEF ${LINKDEF}) + Else( IS_ABSOLUTE ${LINKDEF}) + Set(Int_LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/${LINKDEF}) + EndIf( IS_ABSOLUTE ${LINKDEF}) + ROOT_GENERATE_DICTIONARY() + SET(Int_SRCS ${Int_SRCS} ${DICTIONARY}) + EndIf(LINKDEF) + + + If (ROOT_FOUND_VERSION LESS 59999) + ROOT_GENERATE_ROOTMAP() + EndIf() + + set(Int_DEPENDENCIES) + foreach(d ${DEPENDENCIES}) + get_filename_component(_ext ${d} EXT) + If(NOT _ext MATCHES a$) + set(Int_DEPENDENCIES ${Int_DEPENDENCIES} ${d}) + Else() + Message("Found Static library with extension ${_ext}") + get_filename_component(_lib ${d} NAME_WE) + set(Int_DEPENDENCIES ${Int_DEPENDENCIES} ${_lib}) + EndIf() + endforeach() + + ############### build the library ##################### + If(${CMAKE_GENERATOR} MATCHES Xcode) + Add_Library(${Int_LIB} SHARED ${Int_SRCS} ${NO_DICT_SRCS} ${HDRS} ${LINKDEF}) + Else() + Add_Library(${Int_LIB} SHARED ${Int_SRCS} ${NO_DICT_SRCS} ${LINKDEF}) + EndIf() + target_link_libraries(${Int_LIB} ${Int_DEPENDENCIES}) + set_target_properties(${Int_LIB} PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES}) + + ############### install the library ################### + install(TARGETS ${Int_LIB} DESTINATION lib) + + Set(LIBRARY_NAME) + Set(DICTIONARY) + Set(LINKDEF) + Set(SRCS) + Set(HEADERS) + Set(NO_DICT_SRCS) + Set(DEPENDENCIES) + +EndMacro(GENERATE_LIBRARY) + + +Macro(GENERATE_EXECUTABLE) + +# If(IWYU_FOUND) +# Set(HeaderRuleName "${EXE_NAME}_HEADER_RULES") +# CHECK_HEADERS("${SRCS}" "${INCLUDE_DIRECTORIES}" ${HeaderRuleName}) +# EndIf(IWYU_FOUND) + + ############### build the library ##################### + Add_Executable(${EXE_NAME} ${SRCS}) + target_link_libraries(${EXE_NAME} ${DEPENDENCIES}) + + ############### install the library ################### + install(TARGETS ${EXE_NAME} DESTINATION bin) + + Set(EXE_NAME) + Set(SRCS) + Set(DEPENDENCIES) + +EndMacro(GENERATE_EXECUTABLE) + From c4d503a322bb7d535a0aa92addef7e67350acaf0 Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Thu, 8 Oct 2015 11:30:25 +0200 Subject: [PATCH 21/34] Clean the includes Use the tool include-what-you-use to clean the include files --- Base/Detector.cxx | 5 +- Base/Detector.h | 3 +- Base/TrackReference.cxx | 6 +-- Base/TrackReference.h | 6 ++- Data/Stack.cxx | 28 ++++------ Generators/Pythia6Generator.h | 9 ++-- Generators/Pythia8Generator.h | 13 +++-- MathUtils/Chebyshev3D.cxx | 23 ++++---- MathUtils/Chebyshev3D.h | 22 ++++---- MathUtils/Chebyshev3DCalc.cxx | 6 +-- MathUtils/Chebyshev3DCalc.h | 7 ++- devices/flp2epn-distributed/EPNReceiver.cxx | 9 ++-- devices/flp2epn-distributed/EPNReceiver.h | 6 +-- devices/flp2epn-distributed/FLPSender.cxx | 20 +++---- devices/flp2epn-distributed/FLPSender.h | 6 +-- .../flp2epn-distributed/FLPSyncSampler.cxx | 18 ++++--- devices/flp2epn-distributed/FLPSyncSampler.h | 7 +-- devices/flp2epn/O2EPNex.cxx | 1 - devices/roundtrip/RoundtripClient.cxx | 8 +-- field/MagneticField.cxx | 17 +++--- field/MagneticField.h | 14 +++-- field/MagneticWrapperChebyshev.cxx | 15 ++++-- field/MagneticWrapperChebyshev.h | 17 +++--- its/Chip.cxx | 12 ++--- its/Chip.h | 8 +-- its/ContainerFactory.cxx | 6 +-- its/ContainerFactory.h | 4 +- its/Detector.cxx | 52 +++++++++---------- its/Detector.h | 28 ++++++---- its/Digit.h | 10 ++-- its/DigitContainer.cxx | 11 ++-- its/DigitContainer.h | 6 ++- its/DigitStave.cxx | 7 ++- its/DigitWriteoutBuffer.cxx | 9 ++-- its/DigitWriteoutBuffer.h | 11 ++-- its/Digitizer.cxx | 20 +++---- its/Digitizer.h | 11 ++-- its/DigitizerTask.cxx | 13 +++-- its/DigitizerTask.h | 6 ++- its/GeometryManager.cxx | 25 ++++----- its/GeometryManager.h | 10 ++-- its/Point.h | 8 ++- its/Segmentation.cxx | 3 +- its/Segmentation.h | 5 +- its/UpgradeGeometryTGeo.cxx | 36 +++++++------ its/UpgradeGeometryTGeo.h | 16 +++--- its/UpgradeSegmentationPixel.cxx | 17 +++--- its/UpgradeSegmentationPixel.h | 7 +-- its/UpgradeV1Layer.cxx | 33 ++++++------ its/UpgradeV1Layer.h | 14 ++--- its/V11Geometry.cxx | 36 +++++++------ its/V11Geometry.h | 19 ++++--- o2cdb/Condition.cxx | 5 +- o2cdb/Condition.h | 10 +++- o2cdb/ConditionId.cxx | 8 +-- o2cdb/ConditionId.h | 8 +-- o2cdb/ConditionMetaData.cxx | 12 +++-- o2cdb/ConditionMetaData.h | 7 ++- o2cdb/FileStorage.cxx | 27 ++++++---- o2cdb/FileStorage.h | 15 ++++-- o2cdb/GridStorage.cxx | 40 ++++++++------ o2cdb/GridStorage.h | 14 +++-- o2cdb/IdPath.cxx | 12 ++--- o2cdb/IdPath.h | 6 ++- o2cdb/IdRunRange.cxx | 4 +- o2cdb/IdRunRange.h | 3 +- o2cdb/LocalStorage.cxx | 31 ++++++----- o2cdb/LocalStorage.h | 11 +++- o2cdb/Manager.cxx | 48 ++++++++++------- o2cdb/Manager.h | 21 ++++++-- o2cdb/Storage.cxx | 24 +++++---- o2cdb/Storage.h | 16 +++--- o2cdb/XmlHandler.cxx | 12 ++--- o2cdb/XmlHandler.h | 9 +++- passive/Cave.cxx | 17 ++---- passive/GeoCave.cxx | 2 - passive/GeoCave.h | 8 ++- passive/Magnet.cxx | 22 +++----- passive/Pipe.cxx | 13 ++--- passive/Pipe.h | 4 +- test/its/HitAnalysis.cxx | 26 +++++----- test/its/HitAnalysis.h | 10 ++-- tpc/ContainerFactory.cxx | 6 ++- tpc/ContainerFactory.h | 4 +- tpc/Detector.cxx | 26 ++++------ tpc/Detector.h | 13 ++--- tpc/Point.h | 7 ++- 87 files changed, 638 insertions(+), 572 deletions(-) diff --git a/Base/Detector.cxx b/Base/Detector.cxx index 28e3e1c1b12fb..743314dcb454b 100644 --- a/Base/Detector.cxx +++ b/Base/Detector.cxx @@ -2,9 +2,8 @@ /// \brief Implementation of the Detector class #include "Detector.h" - -#include -#include +#include // for TVirtualMC, gMC +#include "TString.h" // for TString using std::endl; using std::cout; diff --git a/Base/Detector.h b/Base/Detector.h index b1a1507c490e9..628178830f126 100644 --- a/Base/Detector.h +++ b/Base/Detector.h @@ -4,7 +4,8 @@ #ifndef ALICEO2_BASE_DETECTOR_H_ #define ALICEO2_BASE_DETECTOR_H_ -#include "FairDetector.h" +#include "FairDetector.h" // for FairDetector +#include "Rtypes.h" // for Float_t, Int_t, Double_t, Detector::Class, etc namespace AliceO2 { namespace Base { diff --git a/Base/TrackReference.cxx b/Base/TrackReference.cxx index 5828423819908..56ce9317da3e0 100644 --- a/Base/TrackReference.cxx +++ b/Base/TrackReference.cxx @@ -2,16 +2,16 @@ /// \brief Implementation of the TrackReference class /// \author Sylwester Radomski (S.Radomski@gsi.de) GSI, Jan 31, 2003 -#include "TVirtualMC.h" -#include "TParticle.h" - #include "TrackReference.h" +#include "TVirtualMC.h" // for TVirtualMC, gMC #include using std::endl; using std::cout; + using namespace AliceO2::Base; + ClassImp(AliceO2::Base::TrackReference) TrackReference::TrackReference() diff --git a/Base/TrackReference.h b/Base/TrackReference.h index cf80b51930548..8f69fd0c4457b 100644 --- a/Base/TrackReference.h +++ b/Base/TrackReference.h @@ -5,8 +5,10 @@ #ifndef ALICEO2_BASE_TRACKREFERENCE_H_ #define ALICEO2_BASE_TRACKREFERENCE_H_ -#include "TObject.h" -#include "TMath.h" +#include "Rtypes.h" // for Float_t, Int_t, TrackReference::Class, Bool_t, etc +#include "TMath.h" // for Pi, Sqrt, ATan2, Cos, Sin, ACos +#include "TObject.h" // for TObject + namespace AliceO2 { namespace Base { diff --git a/Data/Stack.cxx b/Data/Stack.cxx index 88904aac48bee..e0b02d2df1ca7 100644 --- a/Data/Stack.cxx +++ b/Data/Stack.cxx @@ -3,23 +3,17 @@ /// \author M. Al-Turany - June 2014 #include "Stack.h" - -#include "FairDetector.h" -#include "FairLink.h" -#include "FairMCPoint.h" -#include "MCTrack.h" -#include "FairRootManager.h" -#include "FairLogger.h" - -#include "Riosfwd.h" -#include "TClonesArray.h" -#include "TIterator.h" -#include "TLorentzVector.h" -#include "TParticle.h" -#include "TRefArray.h" - -#include -#include +#include // for NULL +#include "FairDetector.h" // for FairDetector +#include "FairLogger.h" // for MESSAGE_ORIGIN, FairLogger +#include "FairMCPoint.h" // for FairMCPoint +#include "FairRootManager.h" // for FairRootManager +#include "MCTrack.h" // for MCTrack +#include "TClonesArray.h" // for TClonesArray +#include "TIterator.h" // for TIterator +#include "TLorentzVector.h" // for TLorentzVector +#include "TParticle.h" // for TParticle +#include "TRefArray.h" // for TRefArray using std::cout; using std::endl; diff --git a/Generators/Pythia6Generator.h b/Generators/Pythia6Generator.h index df68f7bc72f7d..4fa08703c3cf3 100644 --- a/Generators/Pythia6Generator.h +++ b/Generators/Pythia6Generator.h @@ -62,11 +62,10 @@ #define PND_PYTHIAGENERATOR_H -#include "FairGenerator.h" - -class TDatabasePDG; -class FairPrimaryGenerator; - +#include // for FILE +#include "FairGenerator.h" // for FairGenerator +#include "Rtypes.h" // for Int_t, Pythia6Generator::Class, Bool_t, etc +class FairPrimaryGenerator; // lines 68-68 class Pythia6Generator : public FairGenerator diff --git a/Generators/Pythia8Generator.h b/Generators/Pythia8Generator.h index 2fa567b58c4c3..4fd3b6c1ed7b2 100644 --- a/Generators/Pythia8Generator.h +++ b/Generators/Pythia8Generator.h @@ -13,11 +13,14 @@ #ifndef PNDP8GENERATOR_H #define PNDP8GENERATOR_H 1 -#include "TROOT.h" -#include "FairGenerator.h" -#include "Pythia8/Pythia.h" -#include "TRandom1.h" -#include "TRandom3.h" +#include "Basics.h" // for RndmEngine +#include "FairGenerator.h" // for FairGenerator +#include "Pythia8/Pythia.h" // for Pythia +#include "Rtypes.h" // for Double_t, Bool_t, Int_t, etc +#include "TRandom.h" // for TRandom +#include "TRandom1.h" // for TRandom1 +#include "TRandom3.h" // for TRandom3, gRandom +class FairPrimaryGenerator; // lines 22-22 class FairPrimaryGenerator; using namespace Pythia8; diff --git a/MathUtils/Chebyshev3D.cxx b/MathUtils/Chebyshev3D.cxx index 1e34a588f7d00..02e9224c7c89b 100644 --- a/MathUtils/Chebyshev3D.cxx +++ b/MathUtils/Chebyshev3D.cxx @@ -2,17 +2,20 @@ /// \brief Implementation of the Cheb3D class /// \author ruben.shahoyan@cern.ch 09/09/2006 -#include -#include -#include -#include -#include -#include -#include -#include #include "Chebyshev3D.h" -#include "Chebyshev3DCalc.h" -#include "FairLogger.h" +#include // for TH1D, TH1 +#include // for Cos, Pi +#include // for TMethodCall +#include // for TROOT, gROOT +#include // for TRandom, gRandom +#include // for TString +#include // for TSystem, gSystem +#include // for printf, fprintf, FILE, fclose, fflush, etc +#include "Chebyshev3DCalc.h" // for Chebyshev3DCalc, etc +#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN +#include "TMathBase.h" // for Max, Abs +#include "TNamed.h" // for TNamed +#include "TObjArray.h" // for TObjArray using namespace AliceO2::MathUtils; diff --git a/MathUtils/Chebyshev3D.h b/MathUtils/Chebyshev3D.h index b12a578c3fa08..acee048aa7989 100644 --- a/MathUtils/Chebyshev3D.h +++ b/MathUtils/Chebyshev3D.h @@ -5,19 +5,15 @@ #ifndef ALICEO2_MATHUTILS_CHEBYSHEV3D_H_ #define ALICEO2_MATHUTILS_CHEBYSHEV3D_H_ -#include -#include -#include "Chebyshev3DCalc.h" - -class TString; -class TSystem; -class TRandom; -class TH1; -class TMethodCall; -class TRandom; -class TROOT; -class stdio; -class FairLogger; +#include // for TNamed +#include // for TObjArray +#include // for FILE, stdout +#include "Chebyshev3DCalc.h" // for Chebyshev3DCalc, etc +#include "Rtypes.h" // for Float_t, Int_t, Double_t, Bool_t, etc +#include "TString.h" // for TString +class FairLogger; // lines 20-20 +class TH1; // lines 15-15 +class TMethodCall; // lines 16-16 namespace AliceO2 { diff --git a/MathUtils/Chebyshev3DCalc.cxx b/MathUtils/Chebyshev3DCalc.cxx index c201427d09286..7cbd058104dac 100644 --- a/MathUtils/Chebyshev3DCalc.cxx +++ b/MathUtils/Chebyshev3DCalc.cxx @@ -2,10 +2,10 @@ /// \brief Implementation of the Cheb3DCalc class /// \author ruben.shahoyan@cern.ch 09/09/2006 -#include -#include #include "Chebyshev3DCalc.h" - +#include // for TSystem, gSystem +#include "TNamed.h" // for TNamed +#include "TString.h" // for TString, TString::EStripType::kBoth using namespace AliceO2::MathUtils; ClassImp(Chebyshev3DCalc) diff --git a/MathUtils/Chebyshev3DCalc.h b/MathUtils/Chebyshev3DCalc.h index 35eea3eea7682..b1f146a0605d3 100644 --- a/MathUtils/Chebyshev3DCalc.h +++ b/MathUtils/Chebyshev3DCalc.h @@ -5,8 +5,11 @@ #ifndef ALICEO2_MATHUTILS_CHEBYSHEV3DCALC_H_ #define ALICEO2_MATHUTILS_CHEBYSHEV3DCALC_H_ -#include -class TSystem; +#include // for TNamed +#include // for FILE, stdout +#include "Rtypes.h" // for Float_t, UShort_t, Int_t, Double_t, etc +class TString; + // To decrease the compilable code size comment this define. This will exclude the routines // used for the calculation and saving of the coefficients. diff --git a/devices/flp2epn-distributed/EPNReceiver.cxx b/devices/flp2epn-distributed/EPNReceiver.cxx index 0d41ead8db0c6..69466ceffeaca 100644 --- a/devices/flp2epn-distributed/EPNReceiver.cxx +++ b/devices/flp2epn-distributed/EPNReceiver.cxx @@ -5,12 +5,11 @@ * @author D. Klein, A. Rybalchenko, M. Al-Turany, C. Kouzinopoulos */ -#include -#include -#include // writing to file (DEBUG) - #include "EPNReceiver.h" -#include "FairMQLogger.h" +#include <_types/_uint64_t.h> // for uint64_t +#include "boost/preprocessor/seq/enum.hpp" // for BOOST_PP_SEQ_ENUM_1 +#include "boost/preprocessor/seq/size.hpp" +#include "logger/logger.h" // for LOG using namespace std; diff --git a/devices/flp2epn-distributed/EPNReceiver.h b/devices/flp2epn-distributed/EPNReceiver.h index 399e67617e870..5189de03f0a53 100644 --- a/devices/flp2epn-distributed/EPNReceiver.h +++ b/devices/flp2epn-distributed/EPNReceiver.h @@ -11,10 +11,8 @@ #include #include #include - -#include - -#include "FairMQDevice.h" +#include "FairMQDevice.h" // for FairMQDevice, etc +#include "boost/date_time/posix_time/ptime.hpp" // for ptime namespace AliceO2 { namespace Devices { diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index 107807ea2d9d7..ed0e0ca707c50 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -5,17 +5,17 @@ * @author D. Klein, A. Rybalchenko, M. Al-Turany, C. Kouzinopoulos */ -#include -#include // UINT64_MAX -#include - -#include -#include - -#include "FairMQLogger.h" -#include "FairMQPoller.h" - #include "FLPSender.h" +#include <_types/_uint64_t.h> // for uint64_t +#include // for assert +#include +#include "FairMQMessage.h" +#include "FairMQTransportFactory.h" +#include "boost/date_time/posix_time/posix_time_types.hpp" +#include "boost/preprocessor/seq/enum.hpp" +#include "boost/preprocessor/seq/size.hpp" +#include "logger/logger.h" // for LOG +class FairMQPoller; using namespace std; using boost::posix_time::ptime; diff --git a/devices/flp2epn-distributed/FLPSender.h b/devices/flp2epn-distributed/FLPSender.h index 707eaf21392ed..e02532d0c44a6 100644 --- a/devices/flp2epn-distributed/FLPSender.h +++ b/devices/flp2epn-distributed/FLPSender.h @@ -11,10 +11,8 @@ #include #include #include - -#include - -#include "FairMQDevice.h" +#include "FairMQDevice.h" // for FairMQDevice, etc +#include "boost/date_time/posix_time/ptime.hpp" // for ptime namespace AliceO2 { namespace Devices { diff --git a/devices/flp2epn-distributed/FLPSyncSampler.cxx b/devices/flp2epn-distributed/FLPSyncSampler.cxx index 7d696a4455928..a41ba62e336c8 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/FLPSyncSampler.cxx @@ -5,15 +5,17 @@ * @author D. Klein, A. Rybalchenko */ -#include -#include -#include // UINT64_MAX - -#include -#include - -#include "FairMQLogger.h" #include "FLPSyncSampler.h" +#include <_types/_uint64_t.h> +#include +#include "FairMQPoller.h" +#include "boost/date_time/posix_time/posix_time_duration.hpp" +#include "boost/preprocessor/seq/enum.hpp" +#include "boost/preprocessor/seq/size.hpp" +#include "boost/thread/detail/thread.hpp" +#include "boost/thread/exceptions.hpp" +#include "boost/thread/pthread/thread_data.hpp" // for sleep +#include "logger/logger.h" // for LOG using namespace std; using boost::posix_time::ptime; diff --git a/devices/flp2epn-distributed/FLPSyncSampler.h b/devices/flp2epn-distributed/FLPSyncSampler.h index cf48edc8ed332..d228dc831334e 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.h +++ b/devices/flp2epn-distributed/FLPSyncSampler.h @@ -8,11 +8,8 @@ #ifndef ALICEO2_DEVICES_FLPSYNCSAMPLER_H_ #define ALICEO2_DEVICES_FLPSYNCSAMPLER_H_ -#include - -#include - -#include "FairMQDevice.h" +#include "FairMQDevice.h" // for FairMQDevice, etc +#include "boost/date_time/posix_time/ptime.hpp" // for ptime namespace AliceO2 { namespace Devices { diff --git a/devices/flp2epn/O2EPNex.cxx b/devices/flp2epn/O2EPNex.cxx index aabb818fc5fcf..ea373e512bebd 100644 --- a/devices/flp2epn/O2EPNex.cxx +++ b/devices/flp2epn/O2EPNex.cxx @@ -7,7 +7,6 @@ #include #include - #include "O2EPNex.h" #include "FairMQLogger.h" diff --git a/devices/roundtrip/RoundtripClient.cxx b/devices/roundtrip/RoundtripClient.cxx index b8b9ab0da10a4..6a383f8bfeeb1 100644 --- a/devices/roundtrip/RoundtripClient.cxx +++ b/devices/roundtrip/RoundtripClient.cxx @@ -13,11 +13,11 @@ */ #include - -#include - #include "RoundtripClient.h" -#include "FairMQLogger.h" +#include "FairMQMessage.h" +#include "FairMQTransportFactory.h" +#include "boost/date_time/posix_time/posix_time_types.hpp" +#include "boost/date_time/posix_time/ptime.hpp" // for ptime using namespace std; using boost::posix_time::ptime; diff --git a/field/MagneticField.cxx b/field/MagneticField.cxx index 965df32e76c76..136308487bb64 100644 --- a/field/MagneticField.cxx +++ b/field/MagneticField.cxx @@ -2,14 +2,17 @@ /// \brief Implementation of the MagF class /// \author ruben.shahoyan@cern.ch -#include -#include -#include -#include #include "MagneticField.h" -#include "MagneticWrapperChebyshev.h" - -#include "FairLogger.h" +#include // for TFile +#include // for TPRegexp +#include // for TSystem, gSystem +#include // for snprintf +#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN +#include "MagneticWrapperChebyshev.h" // for MagneticWrapperChebyshev +#include "TMathBase.h" // for Abs, Sign +#include "TObject.h" // for TObject +#include "TString.h" // for TString +#include "TVirtualMagField.h" // for TVirtualMagField using namespace AliceO2::Field; diff --git a/field/MagneticField.h b/field/MagneticField.h index 7cdc6de55c564..14f2e1154a9c9 100644 --- a/field/MagneticField.h +++ b/field/MagneticField.h @@ -5,14 +5,12 @@ #ifndef ALICEO2_FIELD_MAGNETICFIELD_H_ #define ALICEO2_FIELD_MAGNETICFIELD_H_ -//#include - -#include - -#include "AliceO2Config.h" - -class FairLogger; - +#include // for TVirtualMagField +#include "AliceO2Config.h" // for O2PROTO1_MAGF_CREATEFIELDMAP_DIR, etc +#include "Rtypes.h" // for Double_t, Char_t, Int_t, Float_t, etc +#include "TNamed.h" // for TNamed +class FairLogger; // lines 14-14 +namespace AliceO2 { namespace Field { class MagneticWrapperChebyshev; } } // lines 19-19 namespace AliceO2 { namespace Field { diff --git a/field/MagneticWrapperChebyshev.cxx b/field/MagneticWrapperChebyshev.cxx index e65922fd79718..abd0192834cb0 100644 --- a/field/MagneticWrapperChebyshev.cxx +++ b/field/MagneticWrapperChebyshev.cxx @@ -3,10 +3,17 @@ /// \author ruben.shahoyan@cern.ch 20/03/2007 #include "MagneticWrapperChebyshev.h" -#include -#include -#include -#include "FairLogger.h" +#include // for TArrayF +#include // for TArrayI +#include // for TSystem, gSystem +#include // for printf, fprintf, fclose, fopen, FILE +#include // for memcpy +#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN +#include "TMath.h" // for BinarySearch, Sort +#include "TMathBase.h" // for Abs +#include "TNamed.h" // for TNamed +#include "TObjArray.h" // for TObjArray +#include "TString.h" // for TString using namespace AliceO2::Field; using namespace AliceO2::MathUtils; diff --git a/field/MagneticWrapperChebyshev.h b/field/MagneticWrapperChebyshev.h index 835ac870306fe..5527567af3d45 100644 --- a/field/MagneticWrapperChebyshev.h +++ b/field/MagneticWrapperChebyshev.h @@ -4,16 +4,13 @@ #ifndef ALICEO2_FIELD_MAGNETICWRAPPERCHEBYSHEV_H_ #define ALICEO2_FIELD_MAGNETICWRAPPERCHEBYSHEV_H_ - -#include -#include -#include -#include "MathUtils/Chebyshev3D.h" - -class TSystem; -class TArrayF; -class TArrayI; -class FairLogger; +#include // for ATan2, Cos, Sin, Sqrt +#include // for TNamed +#include // for TObjArray +#include "MathUtils/Chebyshev3D.h" // for Chebyshev3D +#include "MathUtils/Chebyshev3DCalc.h" // for _INC_CREATION_Chebyshev3D_ +#include "Rtypes.h" // for Double_t, Int_t, Float_t, etc +class FairLogger; // lines 16-16 namespace AliceO2 { namespace Field { diff --git a/its/Chip.cxx b/its/Chip.cxx index fb634fb06b019..e735a26d5c300 100644 --- a/its/Chip.cxx +++ b/its/Chip.cxx @@ -6,13 +6,13 @@ // Adapted from AliITSUChip by Massimo Masera // -#include - -#include "FairLogger.h" - #include "its/Chip.h" -#include "its/Point.h" -#include "its/UpgradeGeometryTGeo.h" +#include // for Sqrt +#include // for memset +#include "TObjArray.h" // for TObjArray +#include "its/Point.h" // for Point +#include "its/UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo + ClassImp(AliceO2::ITS::Chip) diff --git a/its/Chip.h b/its/Chip.h index ba1cb45db328b..9409916d95e21 100644 --- a/its/Chip.h +++ b/its/Chip.h @@ -11,9 +11,11 @@ #include #include - -#include -#include "TObject.h" +#include // for TObjArray +#include "Rtypes.h" // for Double_t, Int_t, ULong_t, Bool_t, etc +#include "TObject.h" // for TObject +namespace AliceO2 { namespace ITS { class Point; } } // lines 22-22 +namespace AliceO2 { namespace ITS { class UpgradeGeometryTGeo; } } // lines 23-23 namespace AliceO2 { diff --git a/its/ContainerFactory.cxx b/its/ContainerFactory.cxx index a9615f2196420..360cfcf4fad7f 100644 --- a/its/ContainerFactory.cxx +++ b/its/ContainerFactory.cxx @@ -2,9 +2,9 @@ /// \brief Implementation of the ContainerFactory class #include "ContainerFactory.h" -#include "FairRuntimeDb.h" - -#include +#include "FairRuntimeDb.h" // for FairRuntimeDb +#include "TString.h" // for TString +class FairParSet; using namespace AliceO2::ITS; diff --git a/its/ContainerFactory.h b/its/ContainerFactory.h index 7dc11bbf73b9c..9cf86c0ca64a3 100644 --- a/its/ContainerFactory.h +++ b/its/ContainerFactory.h @@ -4,7 +4,9 @@ #ifndef ALICEO2_ITS_CONTAINERFACTORY_H_ #define ALICEO2_ITS_CONTAINERFACTORY_H_ -#include "FairContFact.h" +#include "FairContFact.h" // for FairContFact, FairContainer (ptr only) +#include "Rtypes.h" // for ContainerFactory::Class, ClassDef, etc +class FairParSet; class FairContainer; diff --git a/its/Detector.cxx b/its/Detector.cxx index 9b0ea80bb99fc..55c7bcf8fdf1a 100644 --- a/its/Detector.cxx +++ b/its/Detector.cxx @@ -2,34 +2,30 @@ /// \brief Implementation of the Detector class #include "its/Detector.h" - -#include "Point.h" -#include "UpgradeV1Layer.h" -#include "UpgradeGeometryTGeo.h" - -#include "Data/DetectorList.h" -#include "Data/Stack.h" - -#include "field/MagneticField.h" - -#include "FairVolume.h" -#include "FairGeoVolume.h" -#include "FairGeoNode.h" -#include "FairRootManager.h" -#include "FairGeoLoader.h" -#include "FairGeoInterface.h" -#include "FairRun.h" -#include "FairRuntimeDb.h" - -#include "TClonesArray.h" -#include "TGeoManager.h" -#include "TGeoTube.h" -#include "TGeoVolume.h" -#include "TVirtualMC.h" -#include "TGeoGlobalMagField.h" - -#include -#include +#include // for NULL, snprintf +#include "Data/DetectorList.h" // for DetectorId::kAliIts +#include "Data/Stack.h" // for Stack +#include "FairDetector.h" // for FairDetector +#include "FairLogger.h" // for LOG, LOG_IF +#include "FairRootManager.h" // for FairRootManager +#include "FairRun.h" // for FairRun +#include "FairRuntimeDb.h" // for FairRuntimeDb +#include "FairVolume.h" // for FairVolume +#include "GeometryHandler.h" // for GeometryHandler +#include "MisalignmentParameter.h" // for MisalignmentParameter +#include "Point.h" // for Point, etc +#include "TClonesArray.h" // for TClonesArray +#include "TGeoManager.h" // for TGeoManager, gGeoManager +#include "TGeoTube.h" // for TGeoTube +#include "TGeoVolume.h" // for TGeoVolume, TGeoVolumeAssembly +#include "TString.h" // for TString, operator+ +#include "TVirtualMC.h" // for gMC, TVirtualMC +#include "TVirtualMCStack.h" // for TVirtualMCStack +#include "UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo +#include "UpgradeV1Layer.h" // for UpgradeV1Layer +class FairModule; +class TGeoMedium; +class TParticle; using std::cout; using std::endl; diff --git a/its/Detector.h b/its/Detector.h index d838ddd21b001..21df9c41653a5 100644 --- a/its/Detector.h +++ b/its/Detector.h @@ -4,17 +4,23 @@ #ifndef ALICEO2_ITS_DETECTOR_H_ #define ALICEO2_ITS_DETECTOR_H_ -#include "TParticle.h" -#include "TVector3.h" -#include "TLorentzVector.h" - -#include "Base/Detector.h" -#include "GeometryHandler.h" -#include "MisalignmentParameter.h" -#include "UpgradeGeometryTGeo.h" - -class FairVolume; -class TClonesArray; +#include "Base/Detector.h" // for Detector +#include "Rtypes.h" // for Int_t, Double_t, Float_t, Bool_t, etc +#include "TArrayD.h" // for TArrayD +#include "TGeoManager.h" // for gGeoManager, TGeoManager (ptr only) +#include "TLorentzVector.h" // for TLorentzVector +#include "TVector3.h" // for TVector3 +class FairModule; +class FairVolume; // lines 16-16 +class TClonesArray; // lines 17-17 +class TGeoVolume; +class TParticle; +class TString; +namespace AliceO2 { namespace ITS { class GeometryHandler; } } +namespace AliceO2 { namespace ITS { class MisalignmentParameter; } } +namespace AliceO2 { namespace ITS { class Point; } } // lines 22-22 +namespace AliceO2 { namespace ITS { class UpgradeGeometryTGeo; } } +namespace AliceO2 { namespace ITS { class UpgradeV1Layer; } } // lines 23-23 namespace AliceO2 { namespace ITS { diff --git a/its/Digit.h b/its/Digit.h index 4a2c930b7d5fb..cd0ffe7a65aec 100644 --- a/its/Digit.h +++ b/its/Digit.h @@ -4,14 +4,12 @@ #define ALICEO2_ITS_DIGIT_H #ifndef __CINT__ -#include -#include +#include // for base_object #endif -#include "Riosfwd.h" -#include "Rtypes.h" - -#include "FairTimeStamp.h" +#include "FairTimeStamp.h" // for FairTimeStamp +#include "Rtypes.h" // for Double_t, ULong_t, etc +namespace boost { namespace serialization { class access; } } namespace AliceO2{ namespace ITS{ diff --git a/its/DigitContainer.cxx b/its/DigitContainer.cxx index 68cc4a82ceee8..cf20919a534db 100644 --- a/its/DigitContainer.cxx +++ b/its/DigitContainer.cxx @@ -5,12 +5,13 @@ // Created by Markus Fasel on 25.03.15. // // -#include "TClonesArray.h" -#include "FairLogger.h" - -#include "its/Digit.h" -#include "its/DigitLayer.h" #include "its/DigitContainer.h" +#include "FairLogger.h" // for LOG +#include "Rtypes.h" // for Int_t, nullptr +#include "UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo +#include "its/Digit.h" // for Digit +#include "its/DigitLayer.h" // for DigitLayer + using namespace AliceO2::ITS; diff --git a/its/DigitContainer.h b/its/DigitContainer.h index dce004bd617ae..40f9ad8edbc2d 100644 --- a/its/DigitContainer.h +++ b/its/DigitContainer.h @@ -9,9 +9,11 @@ #ifndef _ALICEO2_ITS_DigitContainer_ #define _ALICEO2_ITS_DigitContainer_ -#include "UpgradeGeometryTGeo.h" +class TClonesArray; // lines 14-14 +namespace AliceO2 { namespace ITS { class Digit; } } // lines 19-19 +namespace AliceO2 { namespace ITS { class DigitLayer; } } // lines 20-20 +namespace AliceO2 { namespace ITS { class UpgradeGeometryTGeo; } } -class TClonesArray; namespace AliceO2 { namespace ITS{ diff --git a/its/DigitStave.cxx b/its/DigitStave.cxx index f3b65088e533a..7a69d98ee4c05 100644 --- a/its/DigitStave.cxx +++ b/its/DigitStave.cxx @@ -5,11 +5,10 @@ // Created by Markus Fasel on 26.03.15. // // - -#include "TClonesArray.h" -#include "FairLogger.h" -#include "its/Digit.h" #include "its/DigitStave.h" +#include "FairLogger.h" // for LOG +#include "its/Digit.h" // for Digit +#include "TClonesArray.h" using namespace AliceO2::ITS; diff --git a/its/DigitWriteoutBuffer.cxx b/its/DigitWriteoutBuffer.cxx index 06f3f84c81cb3..f3b235e57ab4d 100644 --- a/its/DigitWriteoutBuffer.cxx +++ b/its/DigitWriteoutBuffer.cxx @@ -5,11 +5,12 @@ // Created by Markus Fasel on 21.07.15. // // -#include - -#include "FairRootManager.h" - #include "its/DigitWriteoutBuffer.h" +#include // for TClonesArray +#include "FairRootManager.h" // for FairRootManager +#include "TString.h" // for TString +class FairTimeStamp; + ClassImp(AliceO2::ITS::DigitWriteoutBuffer) diff --git a/its/DigitWriteoutBuffer.h b/its/DigitWriteoutBuffer.h index 8d47ba547ea33..02a2a0e3215a3 100644 --- a/its/DigitWriteoutBuffer.h +++ b/its/DigitWriteoutBuffer.h @@ -10,12 +10,11 @@ #define ALICEO2_ITS_DIGITWRITEOUTBUFFER_H_ #include - -#include - -#include "FairWriteoutBuffer.h" - -#include "its/Digit.h" +#include // for TString +#include "FairWriteoutBuffer.h" // for FairWriteoutBuffer +#include "Rtypes.h" // for DigitWriteoutBuffer::Class, Bool_t, etc +#include "Digit.h" // for Digit +class FairTimeStamp; namespace AliceO2 { namespace ITS { diff --git a/its/Digitizer.cxx b/its/Digitizer.cxx index c22686402a9c0..07b5babed2c82 100644 --- a/its/Digitizer.cxx +++ b/its/Digitizer.cxx @@ -1,19 +1,15 @@ /// \file AliITSUpgradeDigitizer.cxx /// \brief Digitizer for the upgrated ITS #include - -#include "TClonesArray.h" - -#include "FairLink.h" -#include "FairLogger.h" - -#include "Point.h" -#include "UpgradeGeometryTGeo.h" - -#include "its/Chip.h" -#include "its/Digit.h" #include "its/Digitizer.h" -#include "its/DigitContainer.h" +#include "FairLogger.h" // for LOG +#include "Point.h" // for Point +#include "TClonesArray.h" // for TClonesArray +#include "TCollection.h" // for TIter +#include "UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo +#include "its/Digit.h" // for Digit +#include "its/DigitContainer.h" // for DigitContainer + ClassImp(AliceO2::ITS::Digitizer) diff --git a/its/Digitizer.h b/its/Digitizer.h index c745124227209..53af98e9addd3 100644 --- a/its/Digitizer.h +++ b/its/Digitizer.h @@ -3,14 +3,13 @@ #ifndef ALICEO2_ITS_Digitizer_H_ #define ALICEO2_ITS_Digitizer_H_ -#include - -#include "TObject.h" -#include "Rtypes.h" - +#include "Rtypes.h" // for Digitizer::Class, Double_t, ClassDef, etc +#include "TObject.h" // for TObject #include "its/Chip.h" -class TClonesArray; +class TClonesArray; // lines 13-13 +namespace AliceO2 { namespace ITS { class DigitContainer; } } // lines 19-19 +namespace AliceO2 { namespace ITS { class UpgradeGeometryTGeo; } } // lines 20-20 namespace AliceO2{ diff --git a/its/DigitizerTask.cxx b/its/DigitizerTask.cxx index cd9b4cdd6f919..b73b90566ab36 100644 --- a/its/DigitizerTask.cxx +++ b/its/DigitizerTask.cxx @@ -7,13 +7,12 @@ // #include "its/DigitizerTask.h" -#include "its/DigitContainer.h" -#include "its/Digitizer.h" - -#include - -#include "FairRootManager.h" -#include "FairLogger.h" +#include // for TClonesArray +#include "FairLogger.h" // for LOG +#include "FairRootManager.h" // for FairRootManager +#include "TObject.h" // for TObject +#include "its/DigitContainer.h" // for DigitContainer +#include "its/Digitizer.h" // for Digitizer ClassImp(AliceO2::ITS::DigitizerTask) diff --git a/its/DigitizerTask.h b/its/DigitizerTask.h index 08fa582b0b3db..e4098dd101a53 100644 --- a/its/DigitizerTask.h +++ b/its/DigitizerTask.h @@ -10,8 +10,10 @@ #define __ALICEO2__DigitizerTask__ #include - -#include "FairTask.h" +#include "FairTask.h" // for FairTask, InitStatus +#include "Rtypes.h" // for DigitizerTask::Class, ClassDef, etc +class TClonesArray; +namespace AliceO2 { namespace ITS { class Digitizer; } } // lines 19-19 namespace AliceO2 { namespace ITS{ diff --git a/its/GeometryManager.cxx b/its/GeometryManager.cxx index 99d004666ab71..bf90869caa404 100644 --- a/its/GeometryManager.cxx +++ b/its/GeometryManager.cxx @@ -1,23 +1,16 @@ /// \file GeometryManager.cxx /// \brief Implementation of the GeometryManager class -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "GeometryManager.h" - -#include "FairLogger.h" +#include // for TGeoManager +#include // for TGeoHMatrix +#include // for TGeoPhysicalNode, TGeoPNEntry +#include // for NULL +#include "FairLogger.h" // for LOG +#include "TCollection.h" // for TIter +#include "TGeoNode.h" // for TGeoNode +#include "TObjArray.h" // for TObjArray +#include "TObject.h" // for TObject using namespace AliceO2::ITS; diff --git a/its/GeometryManager.h b/its/GeometryManager.h index a9568222908cf..f04e808147d0a 100644 --- a/its/GeometryManager.h +++ b/its/GeometryManager.h @@ -4,12 +4,10 @@ #ifndef ALICEO2_ITS_GEOMETRYMANAGER_H_ #define ALICEO2_ITS_GEOMETRYMANAGER_H_ -#include - -class TGeoManager; -class TGeoPNEntry; -class TGeoHMatrix; -class TObjArray; +#include // for TObject +#include "Rtypes.h" // for Bool_t, GeometryManager::Class, ClassDef, etc +class TGeoHMatrix; // lines 11-11 +class TGeoManager; // lines 9-9 namespace AliceO2 { namespace ITS { diff --git a/its/Point.h b/its/Point.h index 65bca84625231..e7411a38392b8 100644 --- a/its/Point.h +++ b/its/Point.h @@ -4,11 +4,9 @@ #ifndef ALICEO2_ITS_POINT_H_ #define ALICEO2_ITS_POINT_H_ -#include "FairMCPoint.h" - -#include "TObject.h" -#include "TVector3.h" -//#include "Riosfwd.h" +#include "FairMCPoint.h" // for FairMCPoint +#include "Rtypes.h" // for Bool_t, Double_t, Int_t, Double32_t, etc +#include "TVector3.h" // for TVector3 #include namespace AliceO2 { diff --git a/its/Segmentation.cxx b/its/Segmentation.cxx index abce2884c5d71..029c0429202b1 100644 --- a/its/Segmentation.cxx +++ b/its/Segmentation.cxx @@ -1,8 +1,9 @@ /// \file Segmentation.cxx /// \brief Implementation of the Segmentation class -#include #include "Segmentation.h" +#include // for TF1 + using namespace AliceO2::ITS; diff --git a/its/Segmentation.h b/its/Segmentation.h index 542d18d096298..de860f05bd334 100644 --- a/its/Segmentation.h +++ b/its/Segmentation.h @@ -6,8 +6,9 @@ #include #include - -#include +#include "TObject.h" // for TObject +#include "Rtypes.h" // for Int_t, Float_t, Double_t, Bool_t, etc +class TF1; // lines 12-12 class TF1; diff --git a/its/UpgradeGeometryTGeo.cxx b/its/UpgradeGeometryTGeo.cxx index 8753d6d016036..2892c5f4f9bf5 100644 --- a/its/UpgradeGeometryTGeo.cxx +++ b/its/UpgradeGeometryTGeo.cxx @@ -4,23 +4,27 @@ /// \author ruben.shahoyan@cern.ch - adapted to ITSupg 18/07/2012 // ATTENTION: In opposite to old AliITSgeomTGeo, all indices start from 0, not from 1!!! - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "GeometryManager.h" -#include "Segmentation.h" #include "UpgradeGeometryTGeo.h" -#include "UpgradeSegmentationPixel.h" - -#include "FairLogger.h" +#include // for TGeoBBox +#include // for gGeoManager, TGeoManager +#include // for TGeoPNEntry, TGeoPhysicalNode +#include // for TGeoShape +#include // for Nint, ATan2, RadToDeg +#include // for TString, Form +#include // for isdigit +#include // for snprintf, NULL, printf +#include // for strstr, strlen +#include "FairLogger.h" // for LOG +#include "GeometryManager.h" // for GeometryManager +#include "Segmentation.h" // for Segmentation +#include "TGeoMatrix.h" // for TGeoHMatrix +#include "TGeoNode.h" // for TGeoNode, TGeoNodeMatrix +#include "TGeoVolume.h" // for TGeoVolume +#include "TMathBase.h" // for Max +#include "TObjArray.h" // for TObjArray +#include "TObject.h" // for TObject +#include "UpgradeSegmentationPixel.h" // for UpgradeSegmentationPixel +#include "TClass.h" // for TClass using namespace TMath; using namespace AliceO2::ITS; diff --git a/its/UpgradeGeometryTGeo.h b/its/UpgradeGeometryTGeo.h index 27d0f316bc289..e2be9cfd1e1b9 100644 --- a/its/UpgradeGeometryTGeo.h +++ b/its/UpgradeGeometryTGeo.h @@ -6,16 +6,14 @@ #ifndef ALICEO2_ITS_UPGRADEGEOMETRYTGEO_H_ #define ALICEO2_ITS_UPGRADEGEOMETRYTGEO_H_ -#include -#include -#include -#include +#include // for TGeoHMatrix +#include // for TObjArray +#include // for TObject +#include // for TString +#include "Rtypes.h" // for Int_t, Double_t, Bool_t, UInt_t, etc +#include "Segmentation.h" // for Segmentation +class TGeoPNEntry; // lines 17-17 -// FIXME: This is temporary and you have to remove it to avoid cyclic deps -#include - -class TGeoPNEntry; -class TDatime; namespace AliceO2 { namespace ITS { diff --git a/its/UpgradeSegmentationPixel.cxx b/its/UpgradeSegmentationPixel.cxx index 1b20918421e89..ff0e06fba8c76 100644 --- a/its/UpgradeSegmentationPixel.cxx +++ b/its/UpgradeSegmentationPixel.cxx @@ -1,16 +1,15 @@ /// \file UpgradeSegmentationPixel.cxx /// \brief Implementation of the UpgradeSegmentationPixel class -#include -#include -#include -#include -#include -#include -#include - -#include "UpgradeGeometryTGeo.h" #include "UpgradeSegmentationPixel.h" +#include // for TFile +#include // for TObjArray +#include // for TString +#include // for TSystem, gSystem +#include // for printf +#include "TMathBase.h" // for Abs, Max, Min +#include "TObject.h" // for TObject +#include "UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo using namespace TMath; using namespace AliceO2::ITS; diff --git a/its/UpgradeSegmentationPixel.h b/its/UpgradeSegmentationPixel.h index d2c106ca29031..802a7c7d29702 100644 --- a/its/UpgradeSegmentationPixel.h +++ b/its/UpgradeSegmentationPixel.h @@ -4,9 +4,10 @@ #ifndef ALICEO2_ITS_UPGRADESEGMENTATIONPIXEL_H_ #define ALICEO2_ITS_UPGRADESEGMENTATIONPIXEL_H_ -#include "FairLogger.h" - -#include "Segmentation.h" +#include "FairLogger.h" // for LOG +#include "Rtypes.h" // for Int_t, Float_t, Double_t, UInt_t, etc +#include "Segmentation.h" // for Segmentation +class TObjArray; namespace AliceO2 { namespace ITS { diff --git a/its/UpgradeV1Layer.cxx b/its/UpgradeV1Layer.cxx index 3e46d2dfa0eb8..e25379dab2e63 100644 --- a/its/UpgradeV1Layer.cxx +++ b/its/UpgradeV1Layer.cxx @@ -3,24 +3,23 @@ /// \author Mario Sitta /// \author Chinorat Kobdaj (kobdaj@g.sut.ac.th) -#include -#include -#include -#include -#include -#include // contaings TGeoTubeSeg -#include -#include -#include -#include -#include -#include -#include - #include "UpgradeV1Layer.h" -#include "UpgradeGeometryTGeo.h" - -#include "FairLogger.h" +#include // for TGeoArb8 +#include // for TGeoBBox +#include // for TGeoConeSeg, TGeoCone +#include // for TGeoManager, gGeoManager +#include // for TGeoCombiTrans, TGeoRotation, etc +#include // for TGeoTrd1 +#include // for TGeoTube, TGeoTubeSeg +#include // for TGeoVolume, TGeoVolumeAssembly +#include // for TGeoXtru +#include // for Sin, RadToDeg, DegToRad, Cos, Tan, etc +#include // for snprintf +#include "Detector.h" // for Detector, etc +#include "FairLogger.h" // for LOG +#include "TMathBase.h" // for Abs +#include "UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo +class TGeoMedium; using namespace TMath; using namespace AliceO2::ITS; diff --git a/its/UpgradeV1Layer.h b/its/UpgradeV1Layer.h index 60c9b51d00346..590d965f12769 100644 --- a/its/UpgradeV1Layer.h +++ b/its/UpgradeV1Layer.h @@ -6,13 +6,13 @@ #ifndef ALICEO2_ITS_UPGRADEV1LAYER_H_ #define ALICEO2_ITS_UPGRADEV1LAYER_H_ -#include "V11Geometry.h" -#include "its/Detector.h" -#include -#include -#include - -class TGeoVolume; +#include // for gGeoManager +#include "Rtypes.h" // for Double_t, Int_t, Bool_t, etc +#include "V11Geometry.h" // for V11Geometry +#include "its/Detector.h" // for Detector, Detector::UpgradeModel +class TGeoArb8; +class TGeoCombiTrans; +class TGeoVolume; // lines 15-15 namespace AliceO2 { namespace ITS { diff --git a/its/V11Geometry.cxx b/its/V11Geometry.cxx index e57e70fab95e9..7e7629ca770a4 100644 --- a/its/V11Geometry.cxx +++ b/its/V11Geometry.cxx @@ -1,23 +1,29 @@ /// \file V11Geometry.cxx /// \brief Implementation of the V11Geometry class -#include -#include -#include -#include -#include -#include - -#include -#include -#include // contaings TGeoTubeSeg -#include -#include -#include -#include -#include #include "V11Geometry.h" +#include // for TArc +#include // for TArrow +#include // for TCanvas +#include // for TGeoArb8 +#include // for TGeoElement +#include // for TGeoMixture, TGeoMaterial, etc +#include // for TGeoPcon +#include // for TGeoConSeg +#include // for TLine +#include // for TPolyLine +#include // for TPolyMarker +#include // for TText +#include // for printf, snprintf +#include "FairLogger.h" // for LOG +#include "TMath.h" // for DegToRad, Cos, Sqrt, ATan2, Sin, Tan, Pi, etc +#include "TMathBase.h" // for Max, Min, Abs + + +#include +#include // for TGeoTubeSeg + using std::endl; using std::cout; diff --git a/its/V11Geometry.h b/its/V11Geometry.h index 721ac8deb4d69..94c7d6bc6d7c3 100644 --- a/its/V11Geometry.h +++ b/its/V11Geometry.h @@ -4,16 +4,15 @@ #ifndef ALICEO2_ITS_V11GEOMETRY_H_ #define ALICEO2_ITS_V11GEOMETRY_H_ -#include -#include -#include "FairLogger.h" - -class TGeoArb8; -class TGeoPcon; -class TGeoTube; -class TGeoTubeSeg; -class TGeoConeSeg; -class TGeoBBox; +#include // for DegToRad, Cos, Sin, Tan +#include // for TObject +#include "Rtypes.h" // for Double_t, Int_t, Bool_t, V11Geometry::Class, etc +class TGeoArb8; // lines 11-11 +class TGeoBBox; // lines 16-16 +class TGeoConeSeg; // lines 15-15 +class TGeoPcon; // lines 12-12 +class TGeoTube; // lines 13-13 +class TGeoTubeSeg; // lines 14-14 namespace AliceO2 { namespace ITS { diff --git a/o2cdb/Condition.cxx b/o2cdb/Condition.cxx index a99bfa53f24a5..d99149fd2a9de 100644 --- a/o2cdb/Condition.cxx +++ b/o2cdb/Condition.cxx @@ -1,8 +1,11 @@ /// \file Condition.h /// \brief Implementation of the Condition class (CDB object) containing the condition and its metadata -#include #include "Condition.h" +#include // for LOG +#include // for NULL +namespace AliceO2 { namespace CDB { class IdRunRange; } } + using namespace AliceO2::CDB; diff --git a/o2cdb/Condition.h b/o2cdb/Condition.h index b6dd1f87f0142..b6ce06c00d0b8 100644 --- a/o2cdb/Condition.h +++ b/o2cdb/Condition.h @@ -4,8 +4,14 @@ #ifndef ALICEO2_CDB_ENTRY_H_ #define ALICEO2_CDB_ENTRY_H_ -#include "ConditionId.h" -#include "ConditionMetaData.h" +#include "ConditionId.h" // for ConditionId +#include "ConditionMetaData.h" // for ConditionMetaData +#include "IdPath.h" // for IdPath +#include "Rtypes.h" // for Int_t, kFALSE, Bool_t, etc +#include "TObject.h" // for TObject +#include "TString.h" // for TString +namespace AliceO2 { namespace CDB { class IdRunRange; } } + namespace AliceO2 { namespace CDB { diff --git a/o2cdb/ConditionId.cxx b/o2cdb/ConditionId.cxx index 99b00958d5969..53b4585290487 100644 --- a/o2cdb/ConditionId.cxx +++ b/o2cdb/ConditionId.cxx @@ -1,8 +1,10 @@ + #include "ConditionId.h" +#include // for TObjArray +#include // for TObjString +#include "TCollection.h" // for TIter +#include "TObject.h" // for TObject #include -#include -#include - // using std::endl; // using std::cout; using namespace AliceO2::CDB; diff --git a/o2cdb/ConditionId.h b/o2cdb/ConditionId.h index 895d79af9e4ab..a42278e1c5ce6 100644 --- a/o2cdb/ConditionId.h +++ b/o2cdb/ConditionId.h @@ -3,10 +3,12 @@ // Identity of an object stored into a database: // // path, run validity range, version, subVersion // -#include "IdPath.h" -#include "IdRunRange.h" +#include // for TObject +#include "IdPath.h" // for IdPath +#include "IdRunRange.h" // for IdRunRange +#include "Rtypes.h" // for Int_t, Bool_t, ConditionId::Class, ClassDef, etc +#include "TString.h" // for TString -#include namespace AliceO2 { namespace CDB { diff --git a/o2cdb/ConditionMetaData.cxx b/o2cdb/ConditionMetaData.cxx index fb21406c5a14f..f78be692a6de1 100644 --- a/o2cdb/ConditionMetaData.cxx +++ b/o2cdb/ConditionMetaData.cxx @@ -1,11 +1,13 @@ // Set of data describing the object // // but not used to identify the object // -#include -#include - -#include - #include "ConditionMetaData.h" +#include // for TObjString +#include // for TTimeStamp +#include // for time +#include "TCollection.h" // for TIter +#include "THashTable.h" // for THashTable +#include "TMap.h" // for TMap, TPair +#include "TObject.h" // for TObject using namespace AliceO2::CDB; diff --git a/o2cdb/ConditionMetaData.h b/o2cdb/ConditionMetaData.h index 3bd6a1aec10ca..4917661be2f38 100644 --- a/o2cdb/ConditionMetaData.h +++ b/o2cdb/ConditionMetaData.h @@ -1,8 +1,11 @@ #ifndef ALI_META_DATA_H #define ALI_META_DATA_H -#include -#include +#include // for TMap +#include // for TObject +#include "Rtypes.h" // for UInt_t, ConditionMetaData::Class, Bool_t, etc +#include "TString.h" // for TString + namespace AliceO2 { namespace CDB { diff --git a/o2cdb/FileStorage.cxx b/o2cdb/FileStorage.cxx index 6c8c5cd2a0a2f..b2bcdea27d49f 100644 --- a/o2cdb/FileStorage.cxx +++ b/o2cdb/FileStorage.cxx @@ -1,16 +1,21 @@ // access class to a DataBase in a dump storage (single file) // -#include -#include -#include -#include -#include -#include -#include - -#include - #include "FileStorage.h" -#include "Condition.h" +#include // for LOG +#include // for TFile +#include // for TKey +#include // for TList +#include // for TObjString +#include // for TRegexp +#include // for TSystem, gSystem +#include // for NULL +#include "Condition.h" // for Condition +#include "ConditionId.h" // for ConditionId +#include "IdPath.h" // for IdPath +#include "IdRunRange.h" // for IdRunRange +#include "TCollection.h" // for TIter +#include "TDirectory.h" // for TDirectory, gDirectory, etc +#include "TObjArray.h" // for TObjArray +#include "TObject.h" // for TObject using namespace AliceO2::CDB; diff --git a/o2cdb/FileStorage.h b/o2cdb/FileStorage.h index e92f0b77f947d..1dee437e826d0 100644 --- a/o2cdb/FileStorage.h +++ b/o2cdb/FileStorage.h @@ -1,11 +1,16 @@ #ifndef ALICEO2_CDB_FILEDUMP_H_ #define ALICEO2_CDB_FILEDUMP_H_ -#include "Storage.h" -#include "Manager.h" - -class TDirectory; -class TFile; +#include "Manager.h" // for StorageFactory, StorageParameters +#include "Rtypes.h" // for Bool_t, Int_t, ClassDef, kFALSE, etc +#include "Storage.h" // for Storage +#include "TString.h" // for TString +class TFile; // lines 8-8 +class TList; +class TObject; +namespace AliceO2 { namespace CDB { class Condition; } } +namespace AliceO2 { namespace CDB { class ConditionId; } } +namespace AliceO2 { namespace CDB { class IdRunRange; } } namespace AliceO2 { namespace CDB { diff --git a/o2cdb/GridStorage.cxx b/o2cdb/GridStorage.cxx index fe88af8a0b44e..93aba96e8dc61 100644 --- a/o2cdb/GridStorage.cxx +++ b/o2cdb/GridStorage.cxx @@ -1,21 +1,29 @@ // access class to a DataBase in an AliEn storage // -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "Condition.h" + #include "GridStorage.h" -#include "Manager.h" +#include // for LOG +#include // for TFile +#include // for gGrid, TGrid +#include // for TGridResult +#include // for TList +#include // for TObjArray +#include // for TObjString +#include // for TROOT, gROOT +#include // for TRegexp +#include // for NULL +#include // for sleep +#include "Condition.h" // for Condition +#include "ConditionId.h" // for ConditionId +#include "ConditionMetaData.h" // for ConditionMetaData +#include "IdPath.h" // for IdPath +#include "IdRunRange.h" // for IdRunRange +#include "Manager.h" // for Manager, StorageParameters +#include "TCollection.h" // for TIter +#include "TDirectory.h" // for TDirectory, gDirectory +#include "TMap.h" // for TMap +#include "TObject.h" // for TObject +#include "TSystem.h" // for TSystem, gSystem +#include using namespace AliceO2::CDB; diff --git a/o2cdb/GridStorage.h b/o2cdb/GridStorage.h index 15612ed1f6589..366842d6c58c2 100644 --- a/o2cdb/GridStorage.h +++ b/o2cdb/GridStorage.h @@ -1,9 +1,17 @@ #ifndef ALICEO2_CDB_GRID_H_ #define ALICEO2_CDB_GRID_H_ -#include "Storage.h" -#include "Manager.h" -#include "ConditionMetaData.h" +#include "Manager.h" // for StorageFactory, StorageParameters +#include "Rtypes.h" // for Bool_t, Long64_t, Long_t, Int_t, ClassDef, etc +#include "Storage.h" // for Storage +#include "TString.h" // for TString +class TFile; +class TList; +class TObjArray; +class TObject; +namespace AliceO2 { namespace CDB { class Condition; } } +namespace AliceO2 { namespace CDB { class ConditionId; } } +namespace AliceO2 { namespace CDB { class ConditionMetaData; } } namespace AliceO2 { namespace CDB { diff --git a/o2cdb/IdPath.cxx b/o2cdb/IdPath.cxx index 00fa487dc6dd6..d39276a1545da 100644 --- a/o2cdb/IdPath.cxx +++ b/o2cdb/IdPath.cxx @@ -1,12 +1,12 @@ // Path string identifying the object: // // (example: "ZDC/Calib/Pedestals") // -#include -#include -#include - -#include - #include "IdPath.h" +#include // for LOG +#include // for TObjArray +#include // for TObjString +#include // for TRegexp +#include "TObject.h" // for TObject +#include "TString.h" // for TString, operator==, Form, etc using namespace AliceO2::CDB; diff --git a/o2cdb/IdPath.h b/o2cdb/IdPath.h index 49a797b013b31..d278241c66e60 100644 --- a/o2cdb/IdPath.h +++ b/o2cdb/IdPath.h @@ -4,8 +4,10 @@ // Path string identifying the object: // // "level0/level1/level2" // // (example: "ZDC/Calib/Pedestals") // -#include -#include +#include // for TObject +#include // for TString +#include "Rtypes.h" // for Bool_t, IdPath::Class, ClassDef, etc + namespace AliceO2 { namespace CDB { diff --git a/o2cdb/IdRunRange.cxx b/o2cdb/IdRunRange.cxx index 96881c1e11009..93e7c78f1fb14 100644 --- a/o2cdb/IdRunRange.cxx +++ b/o2cdb/IdRunRange.cxx @@ -1,8 +1,8 @@ // defines the run validity range of the object: // // [mFirstRun, mLastRun] // - -#include #include "IdRunRange.h" +#include // for LOG +#include "TObject.h" // for TObject using namespace AliceO2::CDB; diff --git a/o2cdb/IdRunRange.h b/o2cdb/IdRunRange.h index f4ec3fdc5b608..83450256b2e1c 100644 --- a/o2cdb/IdRunRange.h +++ b/o2cdb/IdRunRange.h @@ -3,7 +3,8 @@ // defines the run validity range of the object: // // [mFirstRun, mLastRun] // -#include +#include // for TObject +#include "Rtypes.h" // for Int_t, Bool_t, IdRunRange::Class, ClassDef, etc namespace AliceO2 { namespace CDB { diff --git a/o2cdb/LocalStorage.cxx b/o2cdb/LocalStorage.cxx index 7857bdf8d5154..57b0208ba8dc5 100644 --- a/o2cdb/LocalStorage.cxx +++ b/o2cdb/LocalStorage.cxx @@ -1,22 +1,25 @@ // access class to a DataBase in a local storage // + +#include "LocalStorage.h" +#include // for LOG +#include // for TFile +#include // for TObjString +#include // for TRegexp +#include // for TSystem, gSystem +#include // for NULL +#include "Condition.h" // for Condition +#include "ConditionId.h" // for ConditionId +#include "ConditionMetaData.h" // for ConditionMetaData +#include "IdPath.h" // for IdPath +#include "IdRunRange.h" // for IdRunRange +#include "TCollection.h" // for TIter +#include "TList.h" // for TList +#include "TObjArray.h" // for TObjArray +#include "TObject.h" // for TObject #include #include #include -#include -#include -#include -#include -#include - -#include - -#include "LocalStorage.h" -#include "Condition.h" -// using namespace std; -// using std::endl; -// using std::cout; - using namespace AliceO2::CDB; ClassImp(LocalStorage) diff --git a/o2cdb/LocalStorage.h b/o2cdb/LocalStorage.h index 322c263b9ebfb..91bee035a21b3 100644 --- a/o2cdb/LocalStorage.h +++ b/o2cdb/LocalStorage.h @@ -3,8 +3,15 @@ // class LocalStorage // // access class to a DataBase in a local storage // -#include "Storage.h" -#include "Manager.h" +#include "Manager.h" // for StorageFactory, StorageParameters +#include "Rtypes.h" // for Bool_t, Int_t, ClassDef, LocalStorage::Class, etc +#include "Storage.h" // for Storage +#include "TString.h" // for TString +class TList; +class TObject; +namespace AliceO2 { namespace CDB { class Condition; } } +namespace AliceO2 { namespace CDB { class ConditionId; } } +namespace AliceO2 { namespace CDB { class IdRunRange; } } namespace AliceO2 { namespace CDB { diff --git a/o2cdb/Manager.cxx b/o2cdb/Manager.cxx index d2a395de35639..1b5412d4dd492 100644 --- a/o2cdb/Manager.cxx +++ b/o2cdb/Manager.cxx @@ -1,24 +1,34 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include #include "Manager.h" -#include "Storage.h" -#include "FileStorage.h" -#include "LocalStorage.h" -#include "GridStorage.h" -#include "Condition.h" -#include "XmlHandler.h" +#include // for LOG +#include // for gGrid, TGrid +#include // for TKey +#include // for TMessage +#include // for TObjString +#include // for TObject +#include // for TRegexp +#include // for TSAXParser +#include // for TString, operator==, Printf, Form, etc +#include // for TUUID +#include // for NULL, strcmp +#include "Condition.h" // for Condition +#include "ConditionId.h" // for ConditionId +#include "FileStorage.h" // for FileStorageFactory +#include "GridStorage.h" // for GridStorageFactory +#include "IdPath.h" // for IdPath +#include "LocalStorage.h" // for LocalStorageFactory +#include "Storage.h" // for Storage +#include "TBuffer.h" // for TBuffer, TBuffer::EMode::kWrite +#include "TCollection.h" // for TIter +#include "TFile.h" // for TFile +#include "THashTable.h" // for THashTable +#include "TList.h" // for TList +#include "TMap.h" // for TMap, TPair +#include "TObjArray.h" // for TObjArray +#include "TSystem.h" // for TSystem, gSystem +#include "TTime.h" // for TTime +#include "XmlHandler.h" // for XmlHandler +#include using namespace AliceO2::CDB; diff --git a/o2cdb/Manager.h b/o2cdb/Manager.h index 4b59eb4f2f069..54314e8f33d1e 100644 --- a/o2cdb/Manager.h +++ b/o2cdb/Manager.h @@ -1,11 +1,22 @@ #ifndef ALICEO2_CDB_MANAGER_H_ #define ALICEO2_CDB_MANAGER_H_ -#include -#include -#include -#include -#include +#include // for TList +#include // for TMap +#include // for TObject +#include // for NULL +#include "Rtypes.h" // for Int_t, Bool_t, kFALSE, kTRUE, ClassDef, etc +#include "TString.h" // for TString +class TFile; +namespace AliceO2 { namespace CDB { class Condition; } } // lines 20-20 +namespace AliceO2 { namespace CDB { class ConditionId; } } // lines 21-21 +namespace AliceO2 { namespace CDB { class ConditionMetaData; } } // lines 24-24 +namespace AliceO2 { namespace CDB { class IdPath; } } // lines 22-22 +namespace AliceO2 { namespace CDB { class IdRunRange; } } // lines 23-23 +namespace AliceO2 { namespace CDB { class Storage; } } // lines 25-25 +namespace AliceO2 { namespace CDB { class StorageFactory; } } // lines 26-26 +namespace AliceO2 { namespace CDB { class StorageParameters; } } // lines 27-27 + // @file Manager.h // @author Raffaele Grosso diff --git a/o2cdb/Storage.cxx b/o2cdb/Storage.cxx index b8dc0404364de..86217990c4f73 100644 --- a/o2cdb/Storage.cxx +++ b/o2cdb/Storage.cxx @@ -1,14 +1,18 @@ -#include -#include -#include -#include -#include - -#include - #include "Storage.h" -#include "GridStorage.h" -#include "Condition.h" +#include // for LOG +#include // for TH1 +#include // for TKey +#include // for TNtuple +#include // for TTree +#include // for NULL, strcmp +#include "Condition.h" // for Condition +#include "ConditionId.h" // for ConditionId +#include "ConditionMetaData.h" // for ConditionMetaData +#include "Manager.h" // for Manager +#include "TCollection.h" // for TIter +#include "TList.h" // for TList +#include "TObjArray.h" // for TObjArray +namespace AliceO2 { namespace CDB { class IdRunRange; } } using namespace AliceO2::CDB; diff --git a/o2cdb/Storage.h b/o2cdb/Storage.h index 31efce38f3d25..99cb58409536d 100644 --- a/o2cdb/Storage.h +++ b/o2cdb/Storage.h @@ -3,12 +3,16 @@ // interface to specific storage classes // // ( GridStorage, LocalStorage, FileStorage) // -#include "ConditionId.h" -#include "ConditionMetaData.h" -#include "Manager.h" - -#include -#include +#include // for TList +#include // for TObjArray +#include "IdPath.h" // for IdPath +#include "Rtypes.h" // for Int_t, Bool_t, Short_t, Storage::Class, etc +#include "TObject.h" // for TObject +#include "TString.h" // for TString +namespace AliceO2 { namespace CDB { class Condition; } } // lines 18-18 +namespace AliceO2 { namespace CDB { class ConditionId; } } +namespace AliceO2 { namespace CDB { class ConditionMetaData; } } +namespace AliceO2 { namespace CDB { class IdRunRange; } } class TFile; diff --git a/o2cdb/XmlHandler.cxx b/o2cdb/XmlHandler.cxx index 995953fcfa2f8..fe5f7a459f2aa 100644 --- a/o2cdb/XmlHandler.cxx +++ b/o2cdb/XmlHandler.cxx @@ -1,14 +1,14 @@ // The SAX XML file handler used in the CDBManager // +#include "XmlHandler.h" +#include // for LOG +#include // for TList +#include // for TObject +#include // for TXMLAttr +#include "TCollection.h" // for TIter #include #include -#include -#include -#include -#include -#include -#include "XmlHandler.h" using namespace AliceO2::CDB; ClassImp(XmlHandler) diff --git a/o2cdb/XmlHandler.h b/o2cdb/XmlHandler.h index c1869be3f09c1..7e3281123eff5 100644 --- a/o2cdb/XmlHandler.h +++ b/o2cdb/XmlHandler.h @@ -2,8 +2,13 @@ #define ALICE_O2_XML_HANDLER_H_ // The SAX XML file handler used by the OCDB Manager // // get the OCDB Folder <-> Run Range correspondance // -#include -class TString; + +#include // for TObject +#include "Rtypes.h" // for Int_t, XmlHandler::Class, ClassDef, etc +#include "TString.h" // for TString +class TList; +#include // for NULL +namespace AliceO2 { namespace CDB { class IdRunRange; } } namespace AliceO2 { namespace CDB { diff --git a/passive/Cave.cxx b/passive/Cave.cxx index c94a8170b605c..9b94767041fc7 100644 --- a/passive/Cave.cxx +++ b/passive/Cave.cxx @@ -12,18 +12,11 @@ // ----- Created 26/03/14 by M. Al-Turany ----- // ------------------------------------------------------------------------- #include "Cave.h" -#include "GeoCave.h" // for AliGeoCave -#include "FairGeoInterface.h" // for FairGeoInterface -#include "FairGeoLoader.h" // for FairGeoLoader -#include "FairGeoNode.h" // for FairGeoNode -#include "FairGeoVolume.h" // for FairGeoVolume -#include "FairRun.h" // for FairRun -#include "FairRuntimeDb.h" // for FairRuntimeDb -#include "TList.h" // for TListIter, TList (ptr only) -#include "TObjArray.h" // for TObjArray -#include "TString.h" // for TString - -#include // for NULL +#include "FairGeoInterface.h" // for FairGeoInterface +#include "FairGeoLoader.h" // for FairGeoLoader +#include "GeoCave.h" // for GeoCave +#include "TString.h" // for TString +#include // for NULL using namespace AliceO2::Passive; diff --git a/passive/GeoCave.cxx b/passive/GeoCave.cxx index 9324995b7c427..9f63a05a2a416 100644 --- a/passive/GeoCave.cxx +++ b/passive/GeoCave.cxx @@ -25,9 +25,7 @@ #include "FairGeoMedium.h" // for FairGeoMedium #include "FairGeoNode.h" // for FairGeoNode, etc #include "FairGeoShapes.h" // for FairGeoShapes - #include "TList.h" // for TList - #include // for strcmp #include // for cout diff --git a/passive/GeoCave.h b/passive/GeoCave.h index 496aefbbaff6d..3eb5e37481ec4 100644 --- a/passive/GeoCave.h +++ b/passive/GeoCave.h @@ -16,11 +16,9 @@ #ifndef ALICEO2_PASSIVE_GEOCAVE_H #define ALICEO2_PASSIVE_GEOCAVE_H -#include "FairGeoSet.h" // for FairGeoSet -#include "Riosfwd.h" // for fstream -#include "Rtypes.h" // for AliGeoCave::Class, Bool_t, etc -#include "TString.h" // for TString - +#include "FairGeoSet.h" // for FairGeoSet +#include "Rtypes.h" // for GeoCave::Class, Bool_t, ClassDef, etc +#include "TString.h" // for TString #include // for fstream class FairGeoMedia; diff --git a/passive/Magnet.cxx b/passive/Magnet.cxx index fe04982ad4e00..825c19703333a 100644 --- a/passive/Magnet.cxx +++ b/passive/Magnet.cxx @@ -12,20 +12,14 @@ // ------------------------------------------------------------------------- #include "Magnet.h" - -#include "TGeoManager.h" -#include "FairRun.h" // for FairRun -#include "FairRuntimeDb.h" // for FairRuntimeDb -#include "Riosfwd.h" // for ostream -#include "TList.h" // for TListIter, TList (ptr only) -#include "TObjArray.h" // for TObjArray -#include "TString.h" // for TString -#include "TGeoBBox.h" -#include "TGeoCompositeShape.h" -#include "TGeoTube.h" -#include "TGeoMaterial.h" -#include "TGeoElement.h" -#include "TGeoMedium.h" +#include "TGeoBBox.h" // for TGeoBBox +#include "TGeoCompositeShape.h" // for TGeoCompositeShape +#include "TGeoManager.h" // for TGeoManager, gGeoManager +#include "TGeoMaterial.h" // for TGeoMaterial +#include "TGeoMatrix.h" // for TGeoTranslation, TGeoCombiTrans, etc +#include "TGeoMedium.h" // for TGeoMedium +#include "TGeoTube.h" // for TGeoTubeSeg +#include "TGeoVolume.h" // for TGeoVolume #include // for NULL #include // for operator<<, basic_ostream, etc diff --git a/passive/Pipe.cxx b/passive/Pipe.cxx index 561bd45fe4b77..cdc9c7e4698d0 100644 --- a/passive/Pipe.cxx +++ b/passive/Pipe.cxx @@ -12,14 +12,11 @@ // ------------------------------------------------------------------------- #include "Pipe.h" -#include "TList.h" -#include "TObjArray.h" - -#include "TGeoPcon.h" -#include "TGeoTube.h" -#include "TGeoMaterial.h" -#include "TGeoMedium.h" -#include "TGeoManager.h" +#include "TGeoManager.h" // for TGeoManager, gGeoManager +#include "TGeoMaterial.h" // for TGeoMaterial +#include "TGeoMedium.h" // for TGeoMedium +#include "TGeoPcon.h" // for TGeoPcon +#include "TGeoVolume.h" // for TGeoVolume using namespace AliceO2::Passive; diff --git a/passive/Pipe.h b/passive/Pipe.h index 094abebe639a0..029157b03dfec 100644 --- a/passive/Pipe.h +++ b/passive/Pipe.h @@ -14,7 +14,9 @@ #ifndef ALICEO2_PASSIVE_PIPE_H #define ALICEO2_PASSIVE_PIPE_H -#include "FairModule.h" +#include "FairModule.h" // for FairModule +#include "Rtypes.h" // for Pipe::Class, ClassDef, Pipe::Streamer + namespace AliceO2 { namespace Passive { diff --git a/test/its/HitAnalysis.cxx b/test/its/HitAnalysis.cxx index cb660f1e5dc4f..7bc7e11a6e88f 100644 --- a/test/its/HitAnalysis.cxx +++ b/test/its/HitAnalysis.cxx @@ -7,21 +7,19 @@ // #include - -#include -#include -#include -#include - -#include "FairRootManager.h" -#include "FairLogger.h" - -#include "its/Chip.h" -#include "its/UpgradeGeometryTGeo.h" -#include "its/Segmentation.h" -#include "its/Point.h" - +#include "TMath.h" #include "test/its/HitAnalysis.h" +#include // for TClonesArray +#include // for TFile +#include // for TH1, TH1D, TH1F +#include "FairLogger.h" // for LOG +#include "FairRootManager.h" // for FairRootManager +#include "TCollection.h" // for TIter +#include "TObject.h" // for TObject +#include "its/Chip.h" // for Chip, Chip::IndexException +#include "its/Point.h" // for Point +#include "its/Segmentation.h" // for Segmentation +#include "its/UpgradeGeometryTGeo.h" // for UpgradeGeometryTGeo using namespace AliceO2::ITS; diff --git a/test/its/HitAnalysis.h b/test/its/HitAnalysis.h index 5e519e654e5c1..543e53df9f9dc 100644 --- a/test/its/HitAnalysis.h +++ b/test/its/HitAnalysis.h @@ -10,8 +10,12 @@ #define __ALICEO2__HitAnalysis__ #include +#include "FairTask.h" // for FairTask, InitStatus +#include "Rtypes.h" // for Bool_t, HitAnalysis::Class, ClassDef, etc +class TClonesArray; // lines 17-17 +class TH1; // lines 16-16 +namespace AliceO2 { namespace ITS { class UpgradeGeometryTGeo; } } // lines 23-23 -#include "FairTask.h" class TH1; class TClonesArray; @@ -19,9 +23,7 @@ class TClonesArray; namespace AliceO2 { namespace ITS{ - class Chip; - class UpgradeGeometryTGeo; - + class Chip; class HitAnalysis : public FairTask { public: HitAnalysis(); diff --git a/tpc/ContainerFactory.cxx b/tpc/ContainerFactory.cxx index 337d53a9029fe..75e8b5fe063f0 100644 --- a/tpc/ContainerFactory.cxx +++ b/tpc/ContainerFactory.cxx @@ -1,8 +1,10 @@ #include "ContainerFactory.h" -#include "FairRuntimeDb.h" - +#include "FairRuntimeDb.h" // for FairRuntimeDb +#include "TString.h" // for TString #include + +class FairParSet; using namespace AliceO2::TPC; ClassImp(ContainerFactory) diff --git a/tpc/ContainerFactory.h b/tpc/ContainerFactory.h index df4e738ddc796..f8cc182345efd 100644 --- a/tpc/ContainerFactory.h +++ b/tpc/ContainerFactory.h @@ -1,7 +1,9 @@ #ifndef ALICEO2_TPC_CONTAINERFACTORY_H_ #define ALICEO2_TPC_CONTAINERFACTORY_H_ -#include "FairContFact.h" +#include "FairContFact.h" // for FairContFact, FairContainer (ptr only) +#include "Rtypes.h" // for ContainerFactory::Class, ClassDef, etc +class FairParSet; class FairContainer; diff --git a/tpc/Detector.cxx b/tpc/Detector.cxx index ee1ecd403329d..5aff6805363e1 100644 --- a/tpc/Detector.cxx +++ b/tpc/Detector.cxx @@ -1,21 +1,13 @@ #include "Detector.h" - -#include "Point.h" - -#include "FairVolume.h" -#include "FairGeoVolume.h" -#include "FairGeoNode.h" -#include "FairRootManager.h" -#include "FairGeoLoader.h" -#include "FairGeoInterface.h" -#include "FairRun.h" -#include "FairRuntimeDb.h" - -#include "Data/DetectorList.h" -#include "Data/Stack.h" - -#include "TClonesArray.h" -#include "TVirtualMC.h" +#include // for NULL +#include "Data/DetectorList.h" // for DetectorId::kAliTpc +#include "Data/Stack.h" // for Stack +#include "FairRootManager.h" // for FairRootManager +#include "FairVolume.h" // for FairVolume +#include "Point.h" // for Point +#include "TClonesArray.h" // for TClonesArray +#include "TVirtualMC.h" // for TVirtualMC, gMC +#include "TVirtualMCStack.h" // for TVirtualMCStack #include using std::cout; diff --git a/tpc/Detector.h b/tpc/Detector.h index 97d310abdfc9c..03a0d2f9f8f3d 100644 --- a/tpc/Detector.h +++ b/tpc/Detector.h @@ -1,15 +1,16 @@ #ifndef AliceO2_TPC_Detector_H_ #define AliceO2_TPC_Detector_H_ -#include "Base/Detector.h" +#include "Base/Detector.h" // for Detector +#include "Rtypes.h" // for Int_t, Double32_t, Double_t, Bool_t, etc +#include "TLorentzVector.h" // for TLorentzVector +#include "TVector3.h" // for TVector3 +class FairVolume; // lines 10-10 +class TClonesArray; // lines 11-11 +namespace AliceO2 { namespace TPC { class Point; } } // lines 15-15 -#include "TVector3.h" -#include "TLorentzVector.h" -class FairVolume; -class TClonesArray; - namespace AliceO2 { namespace TPC { class Point; diff --git a/tpc/Point.h b/tpc/Point.h index cb7ca7a54c0a5..613b8c1eac470 100644 --- a/tpc/Point.h +++ b/tpc/Point.h @@ -2,10 +2,9 @@ #define ALICEO2_TPC_POINT_H -#include "FairMCPoint.h" - -#include "TObject.h" -#include "TVector3.h" +#include "FairMCPoint.h" // for FairMCPoint +#include "Rtypes.h" // for Double_t, Int_t, Point::Class, ClassDef, etc +#include "TVector3.h" // for TVector3 namespace AliceO2 { namespace TPC { From aac03c7fc68e4df321c1624e6712de0ec702ccfa Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Thu, 8 Oct 2015 11:50:17 +0200 Subject: [PATCH 22/34] Cleaning includes Remove MAC only includes --- devices/flp2epn-distributed/EPNReceiver.cxx | 3 +-- devices/flp2epn-distributed/FLPSender.cxx | 1 - devices/flp2epn-distributed/FLPSyncSampler.cxx | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/devices/flp2epn-distributed/EPNReceiver.cxx b/devices/flp2epn-distributed/EPNReceiver.cxx index 69466ceffeaca..b06f27dfa1783 100644 --- a/devices/flp2epn-distributed/EPNReceiver.cxx +++ b/devices/flp2epn-distributed/EPNReceiver.cxx @@ -6,11 +6,10 @@ */ #include "EPNReceiver.h" -#include <_types/_uint64_t.h> // for uint64_t #include "boost/preprocessor/seq/enum.hpp" // for BOOST_PP_SEQ_ENUM_1 #include "boost/preprocessor/seq/size.hpp" #include "logger/logger.h" // for LOG - +#include using namespace std; using namespace AliceO2::Devices; diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index ed0e0ca707c50..c2d5c7452e3e5 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -6,7 +6,6 @@ */ #include "FLPSender.h" -#include <_types/_uint64_t.h> // for uint64_t #include // for assert #include #include "FairMQMessage.h" diff --git a/devices/flp2epn-distributed/FLPSyncSampler.cxx b/devices/flp2epn-distributed/FLPSyncSampler.cxx index a41ba62e336c8..ad76c70f16970 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/FLPSyncSampler.cxx @@ -6,7 +6,6 @@ */ #include "FLPSyncSampler.h" -#include <_types/_uint64_t.h> #include #include "FairMQPoller.h" #include "boost/date_time/posix_time/posix_time_duration.hpp" From 66e61d5bd8593d73996b403c8182044bf9b1024a Mon Sep 17 00:00:00 2001 From: Mohammad Al-Turany Date: Fri, 9 Oct 2015 09:09:58 +0200 Subject: [PATCH 23/34] Add missing Headers --- devices/flp2epn-distributed/EPNReceiver.cxx | 1 - devices/flp2epn-distributed/FLPSender.cxx | 2 +- devices/flp2epn-distributed/FLPSyncSampler.cxx | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/devices/flp2epn-distributed/EPNReceiver.cxx b/devices/flp2epn-distributed/EPNReceiver.cxx index b06f27dfa1783..fb18e2e863d43 100644 --- a/devices/flp2epn-distributed/EPNReceiver.cxx +++ b/devices/flp2epn-distributed/EPNReceiver.cxx @@ -8,7 +8,6 @@ #include "EPNReceiver.h" #include "boost/preprocessor/seq/enum.hpp" // for BOOST_PP_SEQ_ENUM_1 #include "boost/preprocessor/seq/size.hpp" -#include "logger/logger.h" // for LOG #include using namespace std; diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index c2d5c7452e3e5..2826d1a86f547 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -11,9 +11,9 @@ #include "FairMQMessage.h" #include "FairMQTransportFactory.h" #include "boost/date_time/posix_time/posix_time_types.hpp" +#include "boost/date_time/posix_time/posix_time.hpp" //include all types plus i/o #include "boost/preprocessor/seq/enum.hpp" #include "boost/preprocessor/seq/size.hpp" -#include "logger/logger.h" // for LOG class FairMQPoller; using namespace std; diff --git a/devices/flp2epn-distributed/FLPSyncSampler.cxx b/devices/flp2epn-distributed/FLPSyncSampler.cxx index ad76c70f16970..cc458890e08bb 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/FLPSyncSampler.cxx @@ -9,13 +9,13 @@ #include #include "FairMQPoller.h" #include "boost/date_time/posix_time/posix_time_duration.hpp" +#include "boost/date_time/posix_time/posix_time.hpp" //include all types plus i/o #include "boost/preprocessor/seq/enum.hpp" #include "boost/preprocessor/seq/size.hpp" #include "boost/thread/detail/thread.hpp" #include "boost/thread/exceptions.hpp" #include "boost/thread/pthread/thread_data.hpp" // for sleep -#include "logger/logger.h" // for LOG - +#include // std::ofstream using namespace std; using boost::posix_time::ptime; From 5a669efaebfb86b38669308a29a81ddf03d74e80 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Mon, 29 Jun 2015 16:37:31 +0200 Subject: [PATCH 24/34] Reorganize FLP2EPN device configuration to use the new FairMQChannels - Rename channels for FLP2EPN-distributed devices according to their roles. Separate channel per role - data-in, hb-in (heartbeat), data-out, hb-out. - Provide default values for various program options for FLP2EPN-distributed. The default values correspond to the normal run mode (full chain scenario). - Use ExpectsAnotherPart() for checking for multi-part messages. - Use CheckCurrentState() for state checks (thread-safe). - Remove signal handler functions from separate devices. Signal handler now resides in the base FairMQDevice class. To use it, device must call CatchSignals() method in the main. Alternatively, define your own signal handler for custom cleanup. - Use InteractiveStateLoop() helper method for manualy controlling devices from the console and test the state transitions. This is only usefull for manual run. When running with DDS this method will exit immediately because no console input is possible. --- devices/CMakeLists.txt | 1 - devices/aliceHLTwrapper/EventSampler.cxx | 74 +++-- devices/aliceHLTwrapper/WrapperDevice.cxx | 32 +-- .../aliceHLTwrapper/aliceHLTEventSampler.cxx | 29 +- devices/aliceHLTwrapper/aliceHLTWrapper.cxx | 29 +- devices/flp2epn-distributed/EPNReceiver.cxx | 71 ++--- devices/flp2epn-distributed/EPNReceiver.h | 12 +- devices/flp2epn-distributed/FLPSender.cxx | 249 ++++++++-------- devices/flp2epn-distributed/FLPSender.h | 24 +- .../flp2epn-distributed/FLPSyncSampler.cxx | 82 +++--- devices/flp2epn-distributed/FLPSyncSampler.h | 13 +- devices/flp2epn-distributed/FrameBuilder.cxx | 12 +- .../run/runEPNReceiver.cxx | 205 +++++++------ .../flp2epn-distributed/run/runFLPSender.cxx | 207 +++++++------- .../run/runFLPSyncSampler.cxx | 133 ++++----- .../run/startFLP2EPN-distributed.sh.in | 89 +++--- .../runO2Prototype/flp_epn_hosts.cfg | 14 +- .../runO2Prototype/flp_epn_topology.xml | 20 +- .../runO2Prototype/runEPNReceiver.cxx | 270 +++++++++--------- .../runO2Prototype/runFLPSender.cxx | 233 ++++++++------- .../runO2Prototype/runFLPSyncSampler.cxx | 140 ++++----- devices/flp2epn-dynamic/O2EPNex.cxx | 2 +- devices/flp2epn-dynamic/O2FLPex.cxx | 2 +- .../flp2epn-dynamic/run/runEPN_dynamic.cxx | 38 +-- .../flp2epn-dynamic/run/runFLP_dynamic.cxx | 38 +-- devices/flp2epn/O2EPNex.cxx | 2 +- devices/flp2epn/O2EpnMerger.cxx | 26 +- devices/flp2epn/O2FLPex.cxx | 2 +- devices/flp2epn/O2Merger.cxx | 2 +- devices/flp2epn/O2Proxy.cxx | 2 +- devices/flp2epn/run/runEPN.cxx | 38 +-- devices/flp2epn/run/runEPN_M.cxx | 38 +-- devices/flp2epn/run/runFLP.cxx | 38 +-- devices/flp2epn/run/runMerger.cxx | 38 +-- devices/flp2epn/run/runProxy.cxx | 38 +-- devices/roundtrip/CMakeLists.txt | 73 ----- devices/roundtrip/RoundtripClient.cxx | 108 ------- devices/roundtrip/RoundtripClient.h | 44 --- devices/roundtrip/RoundtripServer.cxx | 33 --- devices/roundtrip/RoundtripServer.h | 30 -- devices/roundtrip/runRoundtripClient.cxx | 145 ---------- devices/roundtrip/runRoundtripServer.cxx | 94 ------ topologies/o2prototype_topology.xml | 4 +- 43 files changed, 968 insertions(+), 1806 deletions(-) delete mode 100644 devices/roundtrip/CMakeLists.txt delete mode 100644 devices/roundtrip/RoundtripClient.cxx delete mode 100644 devices/roundtrip/RoundtripClient.h delete mode 100644 devices/roundtrip/RoundtripServer.cxx delete mode 100644 devices/roundtrip/RoundtripServer.h delete mode 100644 devices/roundtrip/runRoundtripClient.cxx delete mode 100644 devices/roundtrip/runRoundtripServer.cxx diff --git a/devices/CMakeLists.txt b/devices/CMakeLists.txt index ff0497e62e4cc..80aa79c20a410 100644 --- a/devices/CMakeLists.txt +++ b/devices/CMakeLists.txt @@ -5,4 +5,3 @@ if(ALIROOT) add_subdirectory (hough) add_subdirectory (aliceHLTwrapper) endif(ALIROOT) -add_subdirectory (roundtrip) diff --git a/devices/aliceHLTwrapper/EventSampler.cxx b/devices/aliceHLTwrapper/EventSampler.cxx index c40fd7115bf72..5defe1f668431 100644 --- a/devices/aliceHLTwrapper/EventSampler.cxx +++ b/devices/aliceHLTwrapper/EventSampler.cxx @@ -86,27 +86,23 @@ void EventSampler::Run() std::ofstream latencyLog(mOutputFile); - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { // read input messages poller->Poll(mPollingTimeout); for(int i = 0; i < numInputs; i++) { if (poller->CheckInput(i)) { - int64_t more = 0; do { - more = 0; unique_ptr msg(fTransportFactory->CreateMessage()); - received = fChannels["data-in"].at(i).Receive(msg.get()); + received = fChannels.at("data-in").at(i).Receive(msg.get()); if (received) { inputMessages.push_back(msg.release()); inputMessageCntPerSocket[i]++; if (mVerbosity > 3) { LOG(INFO) << " |---- receive Msg from socket " << i; } - size_t more_size = sizeof(more); - fChannels["data-in"].at(i).fSocket->GetOption("rcv-more", &more, &more_size); } - } while (more); + } while (fChannels.at("data-in").at(i).ExpectsAnotherPart()); if (mVerbosity > 2) { LOG(INFO) << "------ received " << inputMessageCntPerSocket[i] << " message(s) from socket " << i; } @@ -118,45 +114,45 @@ void EventSampler::Run() auto useconds = std::chrono::duration_cast(timestamp - dayref - seconds); for (vector::iterator mit=inputMessages.begin(); - mit!=inputMessages.end(); mit++) { + mit!=inputMessages.end(); mit++) { AliHLTComponentEventData* evtData=reinterpret_cast((*mit)->GetData()); if ((*mit)->GetSize() >= sizeof(AliHLTComponentEventData) && - evtData && evtData->fStructSize == sizeof(AliHLTComponentEventData) && - (evtData->fEventCreation_s>0 || evtData->fEventCreation_us>0)) { - unsigned latencySeconds=seconds.count() - evtData->fEventCreation_s; - unsigned latencyUSeconds=0; - if (useconds.count() < evtData->fEventCreation_us) { - latencySeconds--; - latencyUSeconds=(1000000 + useconds.count()) - evtData->fEventCreation_us; - } else { - latencyUSeconds=useconds.count() - evtData->fEventCreation_us; - } - if (mVerbosity>0) { - const char* unit=""; - unsigned value=0; - if (latencySeconds>=10) { - unit=" s"; - value=latencySeconds; - } else if (latencySeconds>0 || latencyUSeconds>10000) { - value=latencySeconds*1000 + latencyUSeconds/1000; - unit=" ms"; - } else { - value=latencyUSeconds; - unit=" us"; - } - LOG(DEBUG) << "received event " << evtData->fEventID << " at " << seconds.count() << "s " << useconds.count() << "us - latency " << value << unit; - } - latencyUSeconds+=latencySeconds*1000000; // max 4294s, should be enough for latency - if (latencyLog.is_open()) { - latencyLog << evtData->fEventID << " " << latencyUSeconds << endl; - } + evtData && evtData->fStructSize == sizeof(AliHLTComponentEventData) && + (evtData->fEventCreation_s>0 || evtData->fEventCreation_us>0)) { + unsigned latencySeconds=seconds.count() - evtData->fEventCreation_s; + unsigned latencyUSeconds=0; + if (useconds.count() < evtData->fEventCreation_us) { + latencySeconds--; + latencyUSeconds=(1000000 + useconds.count()) - evtData->fEventCreation_us; + } else { + latencyUSeconds=useconds.count() - evtData->fEventCreation_us; + } + if (mVerbosity>0) { + const char* unit=""; + unsigned value=0; + if (latencySeconds>=10) { + unit=" s"; + value=latencySeconds; + } else if (latencySeconds>0 || latencyUSeconds>10000) { + value=latencySeconds*1000 + latencyUSeconds/1000; + unit=" ms"; + } else { + value=latencyUSeconds; + unit=" us"; + } + LOG(DEBUG) << "received event " << evtData->fEventID << " at " << seconds.count() << "s " << useconds.count() << "us - latency " << value << unit; + } + latencyUSeconds+=latencySeconds*1000000; // max 4294s, should be enough for latency + if (latencyLog.is_open()) { + latencyLog << evtData->fEventID << " " << latencyUSeconds << endl; + } } delete *mit; } inputMessages.clear(); for (vector::iterator mcit=inputMessageCntPerSocket.begin(); - mcit!=inputMessageCntPerSocket.end(); mcit++) { + mcit!=inputMessageCntPerSocket.end(); mcit++) { *mcit=0; } } @@ -272,7 +268,7 @@ void EventSampler::samplerLoop() int numOutputs = (fChannels.find("data-out") == fChannels.end() ? 0 : fChannels["data-out"].size()); LOG(INFO) << "starting sampler loop, period " << mEventPeriod << " us"; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { msg->Rebuild(sizeof(AliHLTComponentEventData)); evtData = reinterpret_cast(msg->GetData()); memset(evtData, 0, sizeof(AliHLTComponentEventData)); diff --git a/devices/aliceHLTwrapper/WrapperDevice.cxx b/devices/aliceHLTwrapper/WrapperDevice.cxx index c6c61b3006ab2..b6711f16c187e 100644 --- a/devices/aliceHLTwrapper/WrapperDevice.cxx +++ b/devices/aliceHLTwrapper/WrapperDevice.cxx @@ -125,7 +125,7 @@ void WrapperDevice::Run() vector inputMessages; vector inputMessageCntPerSocket(numInputs, 0); int nReadCycles=0; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { // read input messages poller->Poll(mPollingPeriod); @@ -133,15 +133,13 @@ void WrapperDevice::Run() bool receivedAtLeastOneMessage=false; for(int i = 0; i < numInputs; i++) { if (inputMessageCntPerSocket[i]>0) { - inputsReceived++; - continue; + inputsReceived++; + continue; } if (poller->CheckInput(i)) { - int64_t more = 0; do { - more = 0; unique_ptr msg(fTransportFactory->CreateMessage()); - if (fChannels["data-in"].at(i).Receive(msg.get())) { + if (fChannels.at("data-in").at(i).Receive(msg.get())) { receivedAtLeastOneMessage = true; inputMessages.push_back(msg.release()); if (inputMessageCntPerSocket[i] == 0) @@ -150,10 +148,8 @@ void WrapperDevice::Run() if (mVerbosity > 3) { LOG(INFO) << " |---- receive Msg from socket " << i; } - size_t more_size = sizeof(more); - fChannels["data-in"].at(i).fSocket->GetOption("rcv-more", &more, &more_size); } - } while (more); + } while (fChannels.at("data-in").at(i).ExpectsAnotherPart()); if (mVerbosity > 2) { LOG(INFO) << "------ received " << inputMessageCntPerSocket[i] << " message(s) from socket " << i; } @@ -177,14 +173,14 @@ void WrapperDevice::Run() if (mLastSampleTime>=0) { int sampleTimeDiff=duration.count()-mLastSampleTime; if (mMinTimeBetweenSample < 0 || sampleTimeDiffmMaxTimeBetweenSample) - mMaxTimeBetweenSample=sampleTimeDiff; + mMaxTimeBetweenSample=sampleTimeDiff; } mLastSampleTime=duration.count(); if (duration.count()-mLastCalcTime>fLogIntervalInMs) { LOG(INFO) << "------ processed " << mNSamples << " sample(s) - total " - << mComponent->getEventCount() << " sample(s)"; + << mComponent->getEventCount() << " sample(s)"; if (mNSamples > 0) { LOG(INFO) << "------ min " << mMinTimeBetweenSample << "ms, max " << mMaxTimeBetweenSample << "ms avrg " << (duration.count() - mLastCalcTime) / mNSamples << "ms "; @@ -204,9 +200,9 @@ void WrapperDevice::Run() // prepare input from messages vector dataArray; for (vector::iterator msg=inputMessages.begin(); - msg!=inputMessages.end(); msg++) { - void* buffer=(*msg)->GetData(); - dataArray.push_back(AliceO2::AliceHLT::MessageFormat::BufferDesc_t(reinterpret_cast(buffer), (*msg)->GetSize())); + msg!=inputMessages.end(); msg++) { + void* buffer=(*msg)->GetData(); + dataArray.push_back(AliceO2::AliceHLT::MessageFormat::BufferDesc_t(reinterpret_cast(buffer), (*msg)->GetSize())); } // create a signal with the callback to the buffer allocation, the component @@ -217,7 +213,7 @@ void WrapperDevice::Run() // call the component if ((iResult=mComponent->process(dataArray, &cbsignal))<0) { - LOG(ERROR) << "component processing failed with error code " << iResult; + LOG(ERROR) << "component processing failed with error code " << iResult; } // build messages from output data @@ -293,12 +289,12 @@ void WrapperDevice::Run() // cleanup for (vector::iterator mit=inputMessages.begin(); - mit!=inputMessages.end(); mit++) { + mit!=inputMessages.end(); mit++) { delete *mit; } inputMessages.clear(); for (vector::iterator mcit=inputMessageCntPerSocket.begin(); - mcit!=inputMessageCntPerSocket.end(); mcit++) { + mcit!=inputMessageCntPerSocket.end(); mcit++) { *mcit=0; } } diff --git a/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx b/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx index 70e326b57d258..7e6fb65665b3e 100644 --- a/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx +++ b/devices/aliceHLTwrapper/aliceHLTEventSampler.cxx @@ -17,7 +17,6 @@ #include "EventSampler.h" #include -#include #include #include #include @@ -83,30 +82,6 @@ struct SocketProperties_t { }; FairMQDevice* gDevice = NULL; -static void s_signal_handler(int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - if (gDevice) { - gDevice->ChangeState(FairMQDevice::END); - cout << "Shutdown complete. Bye!" << endl; - } else { - cerr << "No device to shut down, ignoring signal ..." << endl; - } - - exit(1); -} - -static void s_catch_signals(void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGQUIT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} int preprocessSockets(vector& sockets); int preprocessSocketsDDS(vector& sockets, std::string networkPrefix=""); @@ -360,7 +335,7 @@ int main(int argc, char** argv) cerr << "failed to create device" << endl; return -ENODEV; } - s_catch_signals(); + gDevice->CatchSignals(); { // scope for the device reference variable FairMQDevice& device = *gDevice; @@ -439,8 +414,6 @@ int main(int argc, char** argv) device.ChangeState("RUN"); device.WaitForEndOfState("RUN"); - device.ChangeState("STOP"); - device.ChangeState("RESET_TASK"); device.WaitForEndOfState("RESET_TASK"); diff --git a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx index 2d38092ad9232..3a46fbd58ecb8 100644 --- a/devices/aliceHLTwrapper/aliceHLTWrapper.cxx +++ b/devices/aliceHLTwrapper/aliceHLTWrapper.cxx @@ -17,7 +17,6 @@ #include "WrapperDevice.h" #include -#include #include #include #include @@ -101,30 +100,6 @@ ostream& operator<<(ostream &out, const SocketProperties_t& me) } FairMQDevice* gDevice = NULL; -static void s_signal_handler(int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - if (gDevice) { - gDevice->ChangeState(FairMQDevice::END); - cout << "Shutdown complete. Bye!" << endl; - } else { - cerr << "No device to shut down, ignoring signal ..." << endl; - } - - exit(1); -} - -static void s_catch_signals(void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGQUIT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} int preprocessSockets(vector& sockets); int preprocessSocketsDDS(vector& sockets, std::string networkPrefix=""); @@ -385,7 +360,7 @@ int main(int argc, char** argv) cerr << "failed to create device" << endl; return -ENODEV; } - s_catch_signals(); + gDevice->CatchSignals(); { // scope for the device reference variable FairMQDevice& device = *gDevice; @@ -496,8 +471,6 @@ int main(int argc, char** argv) } } - device.ChangeState("STOP"); - device.ChangeState("RESET_TASK"); device.WaitForEndOfState("RESET_TASK"); diff --git a/devices/flp2epn-distributed/EPNReceiver.cxx b/devices/flp2epn-distributed/EPNReceiver.cxx index fb18e2e863d43..aa4c30c5eefc0 100644 --- a/devices/flp2epn-distributed/EPNReceiver.cxx +++ b/devices/flp2epn-distributed/EPNReceiver.cxx @@ -10,18 +10,17 @@ #include "boost/preprocessor/seq/size.hpp" #include using namespace std; - using namespace AliceO2::Devices; struct f2eHeader { - uint64_t timeFrameId; + uint16_t timeFrameId; int flpIndex; }; EPNReceiver::EPNReceiver() : fHeartbeatIntervalInMs(3000) , fBufferTimeoutInMs(1000) - , fNumFLPs(1) + , fNumFLPs(0) , fTestMode(0) , fTimeframeBuffer() , fDiscardedSet() @@ -32,9 +31,8 @@ EPNReceiver::~EPNReceiver() { } -void EPNReceiver::PrintBuffer(unordered_map &buffer) +void EPNReceiver::PrintBuffer(unordered_map& buffer) { - int size = buffer.size(); string header = "===== "; for (int i = 1; i <= fNumFLPs; ++i) { @@ -45,23 +43,23 @@ void EPNReceiver::PrintBuffer(unordered_map &buffer) } LOG(INFO) << header; - for (unordered_map::iterator it = buffer.begin(); it != buffer.end(); ++it) { + for (auto& it : buffer) { string stars = ""; - for (int j = 1; j <= (it->second).count; ++j) { + for (int j = 1; j <= (it.second).count; ++j) { stars += "*"; } - LOG(INFO) << setw(4) << it->first << ": " << stars; + LOG(INFO) << setw(4) << it.first << ": " << stars; } } void EPNReceiver::DiscardIncompleteTimeframes() { - unordered_map::iterator it = fTimeframeBuffer.begin(); + auto it = fTimeframeBuffer.begin(); while (it != fTimeframeBuffer.end()) { if ((boost::posix_time::microsec_clock::local_time() - (it->second).startTime).total_milliseconds() > fBufferTimeoutInMs) { LOG(WARN) << "Timeframe #" << it->first << " incomplete after " << fBufferTimeoutInMs << " milliseconds, discarding"; fDiscardedSet.insert(it->first); - for(int i = 0; i < (it->second).parts.size(); ++i) { + for (int i = 0; i < (it->second).parts.size(); ++i) { delete (it->second).parts.at(i); } it->second.parts.clear(); @@ -76,12 +74,12 @@ void EPNReceiver::DiscardIncompleteTimeframes() void EPNReceiver::Run() { - boost::thread heartbeatSender(boost::bind(&EPNReceiver::sendHeartbeats, this)); + // boost::thread heartbeatSender(boost::bind(&EPNReceiver::sendHeartbeats, this)); - FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels["data-in"]); + FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels.at("data-in")); - int SNDMORE = fChannels["data-in"].at(0).fSocket->SNDMORE; - int NOBLOCK = fChannels["data-in"].at(0).fSocket->NOBLOCK; + int SNDMORE = fChannels.at("data-in").at(0).fSocket->SNDMORE; + int NOBLOCK = fChannels.at("data-in").at(0).fSocket->NOBLOCK; // DEBUG: store receive intervals per FLP // vector> rcvIntervals(fNumFLPs, vector()); @@ -89,24 +87,28 @@ void EPNReceiver::Run() // end DEBUG f2eHeader* h; // holds the header of the currently arrived message. - uint64_t id = 0; // holds the timeframe id of the currently arrived sub-timeframe. + uint16_t id = 0; // holds the timeframe id of the currently arrived sub-timeframe. int rcvDataSize = 0; - while (GetCurrentState() == RUNNING) { + FairMQChannel& dataInputChannel = fChannels.at("data-in").at(0); + FairMQChannel& dataOutChannel = fChannels.at("data-out").at(0); + FairMQChannel& ackOutChannel = fChannels.at("ack-out").at(0); + + while (CheckCurrentState(RUNNING)) { poller->Poll(100); if (poller->CheckInput(0)) { FairMQMessage* headerPart = fTransportFactory->CreateMessage(); - if (fChannels["data-in"].at(0).Receive(headerPart) > 0) { + if (dataInputChannel.Receive(headerPart) > 0) { // store the received ID - h = reinterpret_cast(headerPart->GetData()); + h = static_cast(headerPart->GetData()); id = h->timeFrameId; // LOG(INFO) << "Received sub-time frame #" << id << " from FLP" << h->flpIndex; // DEBUG:: store receive intervals per FLP // if (fTestMode > 0) { - // int flp_id = h->flpIndex - 1; + // int flp_id = h->flpIndex; // if (to_simple_string(rcvTimestamp.at(flp_id)) != "not_a_date_time") { // rcvIntervals.at(flp_id).push_back( (boost::posix_time::microsec_clock::local_time() - rcvTimestamp.at(flp_id)).total_microseconds() ); // // LOG(WARN) << rcvIntervals.at(flp_id).back(); @@ -116,7 +118,7 @@ void EPNReceiver::Run() // end DEBUG FairMQMessage* dataPart = fTransportFactory->CreateMessage(); - rcvDataSize = fChannels["data-in"].at(0).Receive(dataPart); + rcvDataSize = dataInputChannel.Receive(dataPart); if (fDiscardedSet.find(id) == fDiscardedSet.end()) { // if received ID has not previously been discarded. @@ -124,7 +126,7 @@ void EPNReceiver::Run() // if received ID is not yet in the buffer. if (rcvDataSize > 0) { // receive data, store it in the buffer, save the receive time. - fTimeframeBuffer[id].count = 1; + fTimeframeBuffer[id].count = 1; // TODO: don't need this, use size() fTimeframeBuffer[id].parts.push_back(dataPart); fTimeframeBuffer[id].startTime = boost::posix_time::microsec_clock::local_time(); } else { @@ -138,7 +140,7 @@ void EPNReceiver::Run() fTimeframeBuffer[id].count++; fTimeframeBuffer[id].parts.push_back(dataPart); } else { - LOG(ERROR) << "no data received from input socket 0"; + LOG(ERROR) << "no data received from input socket"; delete dataPart; } // PrintBuffer(fTimeframeBuffer); @@ -150,18 +152,19 @@ void EPNReceiver::Run() } if (fTimeframeBuffer[id].count == fNumFLPs) { + // LOG(INFO) << "Collected all parts for timeframe #" << id; // when all parts are collected send all except last one with 'snd-more' flag, and last one without the flag. for (int i = 0; i < fNumFLPs - 1; ++i) { - fChannels["data-out"].at(fNumFLPs).Send(fTimeframeBuffer[id].parts.at(i), SNDMORE); + dataOutChannel.Send(fTimeframeBuffer[id].parts.at(i), SNDMORE); } - fChannels["data-out"].at(fNumFLPs).Send(fTimeframeBuffer[id].parts.at(fNumFLPs - 1)); + dataOutChannel.Send(fTimeframeBuffer[id].parts.at(fNumFLPs - 1)); if (fTestMode > 0) { // Send an acknowledgement back to the sampler to measure the round trip time - FairMQMessage* ack = fTransportFactory->CreateMessage(sizeof(uint64_t)); - memcpy(ack->GetData(), &id, sizeof(uint64_t)); + FairMQMessage* ack = fTransportFactory->CreateMessage(sizeof(uint16_t)); + memcpy(ack->GetData(), &id, sizeof(uint16_t)); - if (fChannels["data-out"].at(fNumFLPs + 1).Send(ack, NOBLOCK) == 0) { + if (ackOutChannel.Send(ack, NOBLOCK) == 0) { LOG(ERROR) << "Could not send acknowledgement without blocking"; } @@ -169,7 +172,7 @@ void EPNReceiver::Run() } // let transport know that the data is no longer needed. transport will clean up after it is sent out. - for(int i = 0; i < fTimeframeBuffer[id].parts.size(); ++i) { + for (int i = 0; i < fTimeframeBuffer[id].parts.size(); ++i) { delete fTimeframeBuffer[id].parts.at(i); } fTimeframeBuffer[id].parts.clear(); @@ -201,22 +204,22 @@ void EPNReceiver::Run() // } // end DEBUG - heartbeatSender.interrupt(); - heartbeatSender.join(); + // heartbeatSender.interrupt(); + // heartbeatSender.join(); } void EPNReceiver::sendHeartbeats() { - string ownAddress = fChannels["data-in"].at(0).GetAddress(); + string ownAddress = fChannels.at("data-in").at(0).GetAddress(); size_t ownAddressSize = strlen(ownAddress.c_str()); - while (true) { + while (CheckCurrentState(RUNNING)) { try { for (int i = 0; i < fNumFLPs; ++i) { FairMQMessage* heartbeatMsg = fTransportFactory->CreateMessage(ownAddressSize); memcpy(heartbeatMsg->GetData(), ownAddress.c_str(), ownAddressSize); - fChannels["data-out"].at(i).Send(heartbeatMsg); + fChannels.at("heartbeat-out").at(i).Send(heartbeatMsg); delete heartbeatMsg; } @@ -225,7 +228,7 @@ void EPNReceiver::sendHeartbeats() LOG(INFO) << "EPNReceiver::sendHeartbeat() interrupted"; break; } - } // while (true) + } } void EPNReceiver::SetProperty(const int key, const string& value) diff --git a/devices/flp2epn-distributed/EPNReceiver.h b/devices/flp2epn-distributed/EPNReceiver.h index 5189de03f0a53..f1b24d3e91db9 100644 --- a/devices/flp2epn-distributed/EPNReceiver.h +++ b/devices/flp2epn-distributed/EPNReceiver.h @@ -39,7 +39,7 @@ class EPNReceiver : public FairMQDevice EPNReceiver(); virtual ~EPNReceiver(); - void PrintBuffer(std::unordered_map &buffer); + void PrintBuffer(std::unordered_map& buffer); void DiscardIncompleteTimeframes(); virtual void SetProperty(const int key, const std::string& value); @@ -51,13 +51,13 @@ class EPNReceiver : public FairMQDevice virtual void Run(); void sendHeartbeats(); - int fHeartbeatIntervalInMs; - int fBufferTimeoutInMs; + std::unordered_map fTimeframeBuffer; + std::unordered_set fDiscardedSet; + int fNumFLPs; + int fBufferTimeoutInMs; int fTestMode; // run in test mode - - std::unordered_map fTimeframeBuffer; - std::unordered_set fDiscardedSet; + int fHeartbeatIntervalInMs; }; } // namespace Devices diff --git a/devices/flp2epn-distributed/FLPSender.cxx b/devices/flp2epn-distributed/FLPSender.cxx index 2826d1a86f547..cc68ebe62f8d4 100644 --- a/devices/flp2epn-distributed/FLPSender.cxx +++ b/devices/flp2epn-distributed/FLPSender.cxx @@ -5,16 +5,17 @@ * @author D. Klein, A. Rybalchenko, M. Al-Turany, C. Kouzinopoulos */ -#include "FLPSender.h" -#include // for assert -#include +#include // UINT64_MAX +#include + +#include +#include + +#include "FairMQLogger.h" #include "FairMQMessage.h" #include "FairMQTransportFactory.h" -#include "boost/date_time/posix_time/posix_time_types.hpp" -#include "boost/date_time/posix_time/posix_time.hpp" //include all types plus i/o -#include "boost/preprocessor/seq/enum.hpp" -#include "boost/preprocessor/seq/size.hpp" -class FairMQPoller; + +#include "FLPSender.h" using namespace std; using boost::posix_time::ptime; @@ -22,18 +23,23 @@ using boost::posix_time::ptime; using namespace AliceO2::Devices; struct f2eHeader { - uint64_t timeFrameId; + uint16_t timeFrameId; int flpIndex; }; FLPSender::FLPSender() - : fHeartbeatTimeoutInMs(20000) - , fOutputHeartbeat() - , fIndex(0) + : fIndex(0) , fSendOffset(0) , fSendDelay(8) , fHeaderBuffer() , fDataBuffer() + , fArrivalTime() + , fSndMoreFlag(0) + , fNoBlockFlag(0) + , fNumEPNs(0) + , fHeartbeatTimeoutInMs(20000) + , fHeartbeats() + , fHeartbeatMutex() , fEventSize(10000) , fTestMode(0) { @@ -43,123 +49,108 @@ FLPSender::~FLPSender() { } -void FLPSender::Init() +void FLPSender::InitTask() { ptime nullTime; - for (int i = 0; i < fChannels["data-out"].size(); ++i) { - fOutputHeartbeat.push_back(nullTime); + fNumEPNs = fChannels.at("data-out").size(); + + for (int i = 0; i < fNumEPNs; ++i) { + fHeartbeats[fChannels.at("data-out").at(i).GetAddress()] = nullTime; } } -bool FLPSender::updateIPHeartbeat(string reply) +void FLPSender::receiveHeartbeats() { - for (int i = 0; i < fChannels["data-out"].size(); ++i) { - if (fChannels["data-out"].at(i).GetAddress() == reply) { - ptime currentTime = boost::posix_time::microsec_clock::local_time(); - ptime storedHeartbeat = GetProperty(OutputHeartbeat, storedHeartbeat, i); - - if (to_simple_string(storedHeartbeat) != "not-a-date-time") { - // LOG(INFO) << "EPN " << i << " (" << reply << ")" << " last seen " - // << (currentTime - storedHeartbeat).total_milliseconds() << " ms ago."; - } - else { - LOG(INFO) << "IP has no heartbeat associated. Adding heartbeat: " << currentTime; - } + FairMQChannel& hbChannel = fChannels.at("heartbeat-in").at(0); + + while (CheckCurrentState(RUNNING)) { + try { + FairMQMessage* hbMsg = fTransportFactory->CreateMessage(); + + if (hbChannel.Receive(hbMsg) > 0) { + string address = string(static_cast(hbMsg->GetData()), hbMsg->GetSize()); - SetProperty(OutputHeartbeat, currentTime, i); + if (fHeartbeats.find(address) != fHeartbeats.end()) { + ptime now = boost::posix_time::microsec_clock::local_time(); + ptime storedHeartbeat = fHeartbeats[address]; + + if (to_simple_string(storedHeartbeat) != "not-a-date-time") { + // LOG(INFO) << address << " last seen " << (now - storedHeartbeat).total_milliseconds() << " ms ago."; + } else { + LOG(INFO) << "Received first heartbeat from " << address << " (" << now << ")"; + } + + boost::unique_lock uniqueLock(fHeartbeatMutex); + fHeartbeats[address] = now; + } else { + LOG(ERROR) << "IP " << address << " unknown, not provided at execution time"; + } + } - return true; + delete hbMsg; + } catch (boost::thread_interrupted&) { + LOG(INFO) << "FLPSender::receiveHeartbeats() interrupted"; + break; } } - LOG(ERROR) << "IP " << reply << " unknown, not provided at execution time"; - - return false; } void FLPSender::Run() { - FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels["data-in"]); + // boost::thread heartbeatReceiver(boost::bind(&FLPSender::receiveHeartbeats, this)); // base buffer, to be copied from for every timeframe body void* buffer = operator new[](fEventSize); FairMQMessage* baseMsg = fTransportFactory->CreateMessage(buffer, fEventSize); - ptime currentTime; - ptime storedHeartbeat; + fSndMoreFlag = fChannels.at("data-in").at(0).fSocket->SNDMORE; + fNoBlockFlag = fChannels.at("data-in").at(0).fSocket->NOBLOCK; - uint64_t timeFrameId = 0; + uint16_t timeFrameId = 0; - while (GetCurrentState() == RUNNING) { - poller->Poll(2); + FairMQChannel& dataInChannel = fChannels.at("data-in").at(0); - // input 0 - commands - if (poller->CheckInput(0)) { - FairMQMessage* commandMsg = fTransportFactory->CreateMessage(); + while (CheckCurrentState(RUNNING)) { + // initialize f2e header + f2eHeader* h = new f2eHeader; - if (fChannels["data-in"].at(0).Receive(commandMsg) > 0) { - //... handle command ... + if (fTestMode > 0) { + // test-mode: receive and store id part in the buffer. + FairMQMessage* idPart = fTransportFactory->CreateMessage(); + if (dataInChannel.Receive(idPart) > 0) { + h->timeFrameId = *(static_cast(idPart->GetData())); + h->flpIndex = fIndex; } - delete commandMsg; - } - - // input 1 - heartbeats - if (poller->CheckInput(1)) { - FairMQMessage* heartbeatMsg = fTransportFactory->CreateMessage(); + delete idPart; + } else { + // regular mode: use the id generated locally + h->timeFrameId = timeFrameId; + h->flpIndex = fIndex; - if (fChannels["data-in"].at(1).Receive(heartbeatMsg) > 0) { - string reply = string(static_cast(heartbeatMsg->GetData()), heartbeatMsg->GetSize()); - updateIPHeartbeat(reply); + if (++timeFrameId == UINT16_MAX - 1) { + timeFrameId = 0; } - - delete heartbeatMsg; } - // input 2 - data (in test-mode: signal with a timeframe ID) - if (poller->CheckInput(2)) { + FairMQMessage* headerPart = fTransportFactory->CreateMessage(h, sizeof(f2eHeader)); - // initialize f2e header - f2eHeader* h = new f2eHeader; + fHeaderBuffer.push(headerPart); - if (fTestMode > 0) { - // test-mode: receive and store id part in the buffer. - FairMQMessage* idPart = fTransportFactory->CreateMessage(); - fChannels["data-in"].at(2).Receive(idPart); + // save the arrival time of the message. + fArrivalTime.push(boost::posix_time::microsec_clock::local_time()); - h->timeFrameId = *(reinterpret_cast(idPart->GetData())); - h->flpIndex = fIndex; - - delete idPart; - } else { - // regular mode: use the id generated locally - h->timeFrameId = timeFrameId; - // h->flpIndex = stoi(fId); - h->flpIndex = fIndex; - - if (++timeFrameId == UINT64_MAX - 1) { - timeFrameId = 0; - } - } - - FairMQMessage* headerPart = fTransportFactory->CreateMessage(h, sizeof(f2eHeader)); - - fHeaderBuffer.push(headerPart); - - // save the arrival time of the message. - fArrivalTime.push(boost::posix_time::microsec_clock::local_time()); - - if (fTestMode > 0) { - // test-mode: initialize and store data part in the buffer. - FairMQMessage* dataPart = fTransportFactory->CreateMessage(); - dataPart->Copy(baseMsg); - fDataBuffer.push(dataPart); - } else { - // regular mode: receive data part from input - FairMQMessage* dataPart = fTransportFactory->CreateMessage(); - fChannels["data-in"].at(2).Receive(dataPart); - fDataBuffer.push(dataPart); - } + if (fTestMode > 0) { + // test-mode: initialize and store data part in the buffer. + FairMQMessage* dataPart = fTransportFactory->CreateMessage(); + dataPart->Copy(baseMsg); + fDataBuffer.push(dataPart); + } else { + // regular mode: receive data part from input + FairMQMessage* dataPart = fTransportFactory->CreateMessage(); + dataInChannel.Receive(dataPart); + fDataBuffer.push(dataPart); } // LOG(INFO) << fDataBuffer.size(); @@ -179,41 +170,46 @@ void FLPSender::Run() } delete baseMsg; + + // heartbeatReceiver.interrupt(); + // heartbeatReceiver.join(); } inline void FLPSender::sendFrontData() { - f2eHeader h = *(reinterpret_cast(fHeaderBuffer.front()->GetData())); - uint64_t currentTimeframeId = h.timeFrameId; - - int SNDMORE = fChannels["data-in"].at(0).fSocket->SNDMORE; - int NOBLOCK = fChannels["data-in"].at(0).fSocket->NOBLOCK; + f2eHeader h = *(static_cast(fHeaderBuffer.front()->GetData())); + uint16_t currentTimeframeId = h.timeFrameId; // for which EPN is the message? - int direction = currentTimeframeId % fChannels["data-out"].size(); + int direction = currentTimeframeId % fNumEPNs; // LOG(INFO) << "Sending event " << currentTimeframeId << " to EPN#" << direction << "..."; - ptime currentTime = boost::posix_time::microsec_clock::local_time(); - ptime storedHeartbeat = GetProperty(OutputHeartbeat, storedHeartbeat, direction); - - // if the heartbeat from the corresponding EPN is within timeout period, send the data. - if (to_simple_string(storedHeartbeat) != "not-a-date-time" || - (currentTime - storedHeartbeat).total_milliseconds() < fHeartbeatTimeoutInMs) { - if(fChannels["data-out"].at(direction).Send(fHeaderBuffer.front(), SNDMORE|NOBLOCK) == 0) { + // // get current time to compare with the latest heartbeat from destination EPN. + // ptime currentTime = boost::posix_time::microsec_clock::local_time(); + // ptime storedHeartbeat; + // { + // boost::shared_lock lock(fHeartbeatMutex); + // storedHeartbeat = fHeartbeats[fChannels.at("data-out").at(direction).GetAddress()]; + // } + + // // if the heartbeat is too old, discard the data. + // if (to_simple_string(storedHeartbeat) == "not-a-date-time" || + // (currentTime - storedHeartbeat).total_milliseconds() > fHeartbeatTimeoutInMs) { + // LOG(WARN) << "Heartbeat too old for EPN#" << direction << ", discarding message."; + // fHeaderBuffer.pop(); + // fArrivalTime.pop(); + // fDataBuffer.pop(); + // } else { // if the heartbeat from the corresponding EPN is within timeout period, send the data. + if (fChannels.at("data-out").at(direction).Send(fHeaderBuffer.front(), fSndMoreFlag|fNoBlockFlag) == 0) { LOG(ERROR) << "Could not queue ID part of event #" << currentTimeframeId << " without blocking"; } - if (fChannels["data-out"].at(direction).Send(fDataBuffer.front(), NOBLOCK) == 0) { + if (fChannels.at("data-out").at(direction).Send(fDataBuffer.front(), fNoBlockFlag) == 0) { LOG(ERROR) << "Could not send message with event #" << currentTimeframeId << " without blocking"; } fHeaderBuffer.pop(); fArrivalTime.pop(); fDataBuffer.pop(); - } else { // if the heartbeat is too old, discard the data. - LOG(WARN) << "Heartbeat too old for EPN#" << direction << ", discarding message."; - fHeaderBuffer.pop(); - fArrivalTime.pop(); - fDataBuffer.pop(); - } + // } } void FLPSender::SetProperty(const int key, const string& value) @@ -279,24 +275,3 @@ int FLPSender::GetProperty(const int key, const int default_/*= 0*/) return FairMQDevice::GetProperty(key, default_); } } - -// Method for setting properties represented as a heartbeat. -void FLPSender::SetProperty(const int key, const ptime value, const int slot /*= 0*/) -{ - switch (key) { - case OutputHeartbeat: - fOutputHeartbeat.erase(fOutputHeartbeat.begin() + slot); - fOutputHeartbeat.insert(fOutputHeartbeat.begin() + slot, value); - break; - } -} - -// Method for getting properties represented as a heartbeat. -ptime FLPSender::GetProperty(const int key, const ptime default_, const int slot /*= 0*/) -{ - switch (key) { - case OutputHeartbeat: - return fOutputHeartbeat.at(slot); - } - assert(false); -} diff --git a/devices/flp2epn-distributed/FLPSender.h b/devices/flp2epn-distributed/FLPSender.h index e02532d0c44a6..941822abcef38 100644 --- a/devices/flp2epn-distributed/FLPSender.h +++ b/devices/flp2epn-distributed/FLPSender.h @@ -21,8 +21,7 @@ class FLPSender : public FairMQDevice { public: enum { - OutputHeartbeat = FairMQDevice::Last, - HeartbeatTimeoutInMs, + HeartbeatTimeoutInMs = FairMQDevice::Last, Index, SendOffset, SendDelay, @@ -34,27 +33,19 @@ class FLPSender : public FairMQDevice FLPSender(); virtual ~FLPSender(); - void ResetEventCounter(); - virtual void SetProperty(const int key, const std::string& value); virtual std::string GetProperty(const int key, const std::string& default_ = ""); virtual void SetProperty(const int key, const int value); virtual int GetProperty(const int key, const int default_ = 0); - void SetProperty(const int key, const boost::posix_time::ptime value, const int slot = 0); - boost::posix_time::ptime GetProperty(const int key, const boost::posix_time::ptime value, const int slot = 0); - protected: - virtual void Init(); + virtual void InitTask(); virtual void Run(); private: - bool updateIPHeartbeat(std::string str); + void receiveHeartbeats(); void sendFrontData(); - int fHeartbeatTimeoutInMs; - std::vector fOutputHeartbeat; - unsigned int fIndex; unsigned int fSendOffset; unsigned int fSendDelay; @@ -62,7 +53,14 @@ class FLPSender : public FairMQDevice std::queue fDataBuffer; std::queue fArrivalTime; - std::unordered_map fRTTimes; + int fSndMoreFlag; // flag for multipart sending + int fNoBlockFlag; // flag for sending without blocking + + int fNumEPNs; + + int fHeartbeatTimeoutInMs; + std::unordered_map fHeartbeats; + boost::shared_mutex fHeartbeatMutex; int fEventSize; int fTestMode; // run in test mode diff --git a/devices/flp2epn-distributed/FLPSyncSampler.cxx b/devices/flp2epn-distributed/FLPSyncSampler.cxx index cc458890e08bb..742e061729e90 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/FLPSyncSampler.cxx @@ -5,17 +5,15 @@ * @author D. Klein, A. Rybalchenko */ +#include +#include + +#include +#include + +#include "FairMQLogger.h" #include "FLPSyncSampler.h" -#include -#include "FairMQPoller.h" -#include "boost/date_time/posix_time/posix_time_duration.hpp" -#include "boost/date_time/posix_time/posix_time.hpp" //include all types plus i/o -#include "boost/preprocessor/seq/enum.hpp" -#include "boost/preprocessor/seq/size.hpp" -#include "boost/thread/detail/thread.hpp" -#include "boost/thread/exceptions.hpp" -#include "boost/thread/pthread/thread_data.hpp" // for sleep -#include // std::ofstream + using namespace std; using boost::posix_time::ptime; @@ -24,6 +22,7 @@ using namespace AliceO2::Devices; FLPSyncSampler::FLPSyncSampler() : fEventRate(1) , fEventCounter(0) + , fTimeframeRTT() { } @@ -31,29 +30,34 @@ FLPSyncSampler::~FLPSyncSampler() { } -void FLPSyncSampler::Run() +void FLPSyncSampler::InitTask() { - boost::this_thread::sleep(boost::posix_time::milliseconds(10000)); + // LOG(INFO) << "Waiting 10 seconds..."; + // boost::this_thread::sleep(boost::posix_time::milliseconds(10000)); + // LOG(INFO) << "Done!"; +} +void FLPSyncSampler::Run() +{ boost::thread resetEventCounter(boost::bind(&FLPSyncSampler::ResetEventCounter, this)); boost::thread ackListener(boost::bind(&FLPSyncSampler::ListenForAcks, this)); - int NOBLOCK = fChannels["data-out"].at(0).fSocket->NOBLOCK; + int NOBLOCK = fChannels.at("data-out").at(0).fSocket->NOBLOCK; - uint64_t timeFrameId = 0; + uint16_t timeFrameId = 1; - while (GetCurrentState() == RUNNING) { - FairMQMessage* msg = fTransportFactory->CreateMessage(sizeof(uint64_t)); - memcpy(msg->GetData(), &timeFrameId, sizeof(uint64_t)); + FairMQChannel& dataOutputChannel = fChannels.at("data-out").at(0); - if (fChannels["data-out"].at(0).Send(msg, NOBLOCK) == 0) { - LOG(ERROR) << "Could not send signal without blocking"; - } + while (CheckCurrentState(RUNNING)) { + FairMQMessage* msg = fTransportFactory->CreateMessage(sizeof(uint16_t)); + memcpy(msg->GetData(), &timeFrameId, sizeof(uint16_t)); - fTimeframeRTT[timeFrameId].start = boost::posix_time::microsec_clock::local_time(); + if (dataOutputChannel.Send(msg, NOBLOCK) > 0) { + fTimeframeRTT[timeFrameId].start = boost::posix_time::microsec_clock::local_time(); - if (++timeFrameId == UINT64_MAX - 1) { - timeFrameId = 0; + if (++timeFrameId == UINT16_MAX - 1) { + timeFrameId = 1; + } } --fEventCounter; @@ -77,41 +81,34 @@ void FLPSyncSampler::Run() void FLPSyncSampler::ListenForAcks() { - FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels["data-in"]); - - uint64_t id = 0; + uint16_t id = 0; string name = to_iso_string(boost::posix_time::microsec_clock::local_time()).substr(0, 20); ofstream ofsFrames(name + "-frames.log"); ofstream ofsTimes(name + "-times.log"); - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { try { - poller->Poll(100); - - if (poller->CheckInput(0)) { - FairMQMessage* idMsg = fTransportFactory->CreateMessage(); + FairMQMessage* idMsg = fTransportFactory->CreateMessage(); - if (fChannels["data-in"].at(0).Receive(idMsg) > 0) { - id = *(reinterpret_cast(idMsg->GetData())); - fTimeframeRTT[id].end = boost::posix_time::microsec_clock::local_time(); - // store values in a file - ofsFrames << id << "\n"; - ofsTimes << (fTimeframeRTT[id].end - fTimeframeRTT[id].start).total_microseconds() << "\n"; + if (fChannels.at("ack-in").at(0).Receive(idMsg) > 0) { + id = *(static_cast(idMsg->GetData())); + fTimeframeRTT.at(id).end = boost::posix_time::microsec_clock::local_time(); + // store values in a file + ofsFrames << id << "\n"; + ofsTimes << (fTimeframeRTT.at(id).end - fTimeframeRTT.at(id).start).total_microseconds() << "\n"; - LOG(INFO) << "Timeframe #" << id << " acknowledged after " - << (fTimeframeRTT[id].end - fTimeframeRTT[id].start).total_microseconds() << " μs."; - } + LOG(INFO) << "Timeframe #" << id << " acknowledged after " + << (fTimeframeRTT.at(id).end - fTimeframeRTT.at(id).start).total_microseconds() << " μs."; } } catch (boost::thread_interrupted&) { + LOG(DEBUG) << "Acknowledgement listener thread interrupted"; break; } } ofsFrames.close(); ofsTimes.close(); - - delete poller; } void FLPSyncSampler::ResetEventCounter() @@ -121,6 +118,7 @@ void FLPSyncSampler::ResetEventCounter() fEventCounter = fEventRate / 100; boost::this_thread::sleep(boost::posix_time::milliseconds(10)); } catch (boost::thread_interrupted&) { + LOG(DEBUG) << "Event rate limiter thread interrupted"; break; } } diff --git a/devices/flp2epn-distributed/FLPSyncSampler.h b/devices/flp2epn-distributed/FLPSyncSampler.h index d228dc831334e..08d6efe78dcd7 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.h +++ b/devices/flp2epn-distributed/FLPSyncSampler.h @@ -8,8 +8,12 @@ #ifndef ALICEO2_DEVICES_FLPSYNCSAMPLER_H_ #define ALICEO2_DEVICES_FLPSYNCSAMPLER_H_ -#include "FairMQDevice.h" // for FairMQDevice, etc -#include "boost/date_time/posix_time/ptime.hpp" // for ptime +#include +#include // UINT64_MAX + +#include + +#include "FairMQDevice.h" namespace AliceO2 { namespace Devices { @@ -25,7 +29,6 @@ class FLPSyncSampler : public FairMQDevice public: enum { EventRate = FairMQDevice::Last, - EventSize, Last }; @@ -41,12 +44,12 @@ class FLPSyncSampler : public FairMQDevice virtual int GetProperty(const int key, const int default_ = 0); protected: + virtual void InitTask(); virtual void Run(); + std::array fTimeframeRTT; int fEventRate; int fEventCounter; - - std::map fTimeframeRTT; }; } // namespace Devices diff --git a/devices/flp2epn-distributed/FrameBuilder.cxx b/devices/flp2epn-distributed/FrameBuilder.cxx index 05de23d83f2ff..a85e234b52fa6 100644 --- a/devices/flp2epn-distributed/FrameBuilder.cxx +++ b/devices/flp2epn-distributed/FrameBuilder.cxx @@ -21,23 +21,23 @@ FrameBuilder::FrameBuilder() void FrameBuilder::Run() { - FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels["data-in"]); + FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels.at("data-in")); - fNumInputs = fChannels["data-in"].size(); + fNumInputs = fChannels.at("data-in").size(); int noOfMsgParts = fNumInputs - 1; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { FairMQMessage* msg = fTransportFactory->CreateMessage(); poller->Poll(100); for (int i = 0; i < fNumInputs; ++i) { if (poller->CheckInput(i)) { - if (fChannels["data-in"].at(i).Receive(msg) > 0) { + if (fChannels.at("data-in").at(i).Receive(msg) > 0) { if (i < noOfMsgParts) { - fChannels["data-out"].at(0).Send(msg, "snd-more"); + fChannels.at("data-out").at(0).Send(msg, "snd-more"); } else { - fChannels["data-out"].at(0).Send(msg); + fChannels.at("data-out").at(0).Send(msg); } } } diff --git a/devices/flp2epn-distributed/run/runEPNReceiver.cxx b/devices/flp2epn-distributed/run/runEPNReceiver.cxx index 5b51425756347..43f8901d6caee 100644 --- a/devices/flp2epn-distributed/run/runEPNReceiver.cxx +++ b/devices/flp2epn-distributed/run/runEPNReceiver.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -18,49 +17,38 @@ using namespace std; using namespace AliceO2::Devices; -EPNReceiver epn; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - epn.ChangeState(EPNReceiver::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int ioThreads; - int numOutputs; int heartbeatIntervalInMs; int bufferTimeoutInMs; int numFLPs; int testMode; - string inputSocketType; - int inputBufSize; - string inputMethod; - string inputAddress; - int inputRateLogging; - - vector outputSocketType; - vector outputBufSize; - vector outputMethod; - vector outputAddress; - vector outputRateLogging; + string dataInSocketType; + int dataInBufSize; + string dataInMethod; + string dataInAddress; + int dataInRateLogging; + + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + string dataOutAddress; + int dataOutRateLogging; + + string hbOutSocketType; + int hbOutBufSize; + string hbOutMethod; + vector hbOutAddress; + int hbOutRateLogging; + + string ackOutSocketType; + int ackOutBufSize; + string ackOutMethod; + string ackOutAddress; + int ackOutRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) @@ -73,21 +61,35 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) desc.add_options() ("id", bpo::value()->required(), "Device ID") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("num-outputs", bpo::value()->required(), "Number of EPN output sockets") ("heartbeat-interval", bpo::value()->default_value(5000), "Heartbeat interval in milliseconds") ("buffer-timeout", bpo::value()->default_value(1000), "Buffer timeout in milliseconds") ("num-flps", bpo::value()->required(), "Number of FLPs") ("test-mode", bpo::value()->default_value(0), "Run in test mode") - ("input-socket-type", bpo::value()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value()->required(), "Input method: bind/connect") - ("input-address", bpo::value()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value()->required(), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value>()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value>()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value>()->required(), "Output method: bind/connect") - ("output-address", bpo::value>()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value>()->required(), "Log output rate on socket, 1/0") + + ("data-in-socket-type", bpo::value()->default_value("pull"), "Data input socket type: sub/pull") + ("data-in-buff-size", bpo::value()->default_value(10), "Data input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-in-method", bpo::value()->default_value("bind"), "Data input method: bind/connect") + ("data-in-address", bpo::value()->required(), "Data input address, e.g.: \"tcp://localhost:5555\"") + ("data-in-rate-logging", bpo::value()->default_value(1), "Log input rate on data socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("push"), "Output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(10), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("bind"), "Output method: bind/connect") + ("data-out-address", bpo::value()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(1), "Log output rate on data socket, 1/0") + + ("hb-out-socket-type", bpo::value()->default_value("pub"), "Heartbeat output socket type: pub/push") + ("hb-out-buff-size", bpo::value()->default_value(100), "Heartbeat output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("hb-out-method", bpo::value()->default_value("connect"), "Heartbeat output method: bind/connect") + ("hb-out-address", bpo::value>()->required(), "Heartbeat output address, e.g.: \"tcp://localhost:5555\"") + ("hb-out-rate-logging", bpo::value()->default_value(0), "Log output rate on heartbeat socket, 1/0") + + ("ack-out-socket-type", bpo::value()->default_value("push"), "Acknowledgement output socket type: pub/push") + ("ack-out-buff-size", bpo::value()->default_value(100), "Acknowledgement output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("ack-out-method", bpo::value()->default_value("connect"), "Acknowledgement output method: bind/connect") + ("ack-out-address", bpo::value()->required(), "Acknowledgement output address, e.g.: \"tcp://localhost:5555\"") + ("ack-out-rate-logging", bpo::value()->default_value(0), "Log output rate on acknowledgement socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -100,32 +102,44 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::notify(vm); - if (vm.count("id")) { _options->id = vm["id"].as(); } - if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("num-outputs")) { _options->numOutputs = vm["num-outputs"].as(); } - if (vm.count("heartbeat-interval")) { _options->heartbeatIntervalInMs = vm["heartbeat-interval"].as(); } - if (vm.count("buffer-timeout")) { _options->bufferTimeoutInMs = vm["buffer-timeout"].as(); } - if (vm.count("num-flps")) { _options->numFLPs = vm["num-flps"].as(); } - if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } - - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as(); } - if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as(); } - - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as>(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as>(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as>(); } - if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as>(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as>(); } + if (vm.count("id")) { _options->id = vm["id"].as(); } + if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } + if (vm.count("heartbeat-interval")) { _options->heartbeatIntervalInMs = vm["heartbeat-interval"].as(); } + if (vm.count("buffer-timeout")) { _options->bufferTimeoutInMs = vm["buffer-timeout"].as(); } + if (vm.count("num-flps")) { _options->numFLPs = vm["num-flps"].as(); } + if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } + + if (vm.count("data-in-socket-type")) { _options->dataInSocketType = vm["data-in-socket-type"].as(); } + if (vm.count("data-in-buff-size")) { _options->dataInBufSize = vm["data-in-buff-size"].as(); } + if (vm.count("data-in-method")) { _options->dataInMethod = vm["data-in-method"].as(); } + if (vm.count("data-in-address")) { _options->dataInAddress = vm["data-in-address"].as(); } + if (vm.count("data-in-rate-logging")) { _options->dataInRateLogging = vm["data-in-rate-logging"].as(); } + + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } + + if (vm.count("hb-out-socket-type")) { _options->hbOutSocketType = vm["hb-out-socket-type"].as(); } + if (vm.count("hb-out-buff-size")) { _options->hbOutBufSize = vm["hb-out-buff-size"].as(); } + if (vm.count("hb-out-method")) { _options->hbOutMethod = vm["hb-out-method"].as(); } + if (vm.count("hb-out-address")) { _options->hbOutAddress = vm["hb-out-address"].as>(); } + if (vm.count("hb-out-rate-logging")) { _options->hbOutRateLogging = vm["hb-out-rate-logging"].as(); } + + if (vm.count("ack-out-socket-type")) { _options->ackOutSocketType = vm["ack-out-socket-type"].as(); } + if (vm.count("ack-out-buff-size")) { _options->ackOutBufSize = vm["ack-out-buff-size"].as(); } + if (vm.count("ack-out-method")) { _options->ackOutMethod = vm["ack-out-method"].as(); } + if (vm.count("ack-out-address")) { _options->ackOutAddress = vm["ack-out-address"].as(); } + if (vm.count("ack-out-rate-logging")) { _options->ackOutRateLogging = vm["ack-out-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + EPNReceiver epn; + epn.CatchSignals(); DeviceOptions_t options; try { @@ -136,7 +150,12 @@ int main(int argc, char** argv) return 1; } - LOG(INFO) << "PID: " << getpid(); + if (options.numFLPs != options.hbOutAddress.size()) { + LOG(ERROR) << "Number of FLPs does not match the number of provided heartbeat output addresses."; + return 1; + } + + LOG(INFO) << "EPN Receiver, ID: " << options.id << " (PID: " << getpid() << ")"; FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); @@ -150,20 +169,36 @@ int main(int argc, char** argv) epn.SetProperty(EPNReceiver::NumFLPs, options.numFLPs); epn.SetProperty(EPNReceiver::TestMode, options.testMode); - FairMQChannel inputChannel(options.inputSocketType, options.inputMethod, options.inputAddress); - inputChannel.UpdateSndBufSize(options.inputBufSize); - inputChannel.UpdateRcvBufSize(options.inputBufSize); - inputChannel.UpdateRateLogging(options.inputRateLogging); - epn.fChannels["data-in"].push_back(inputChannel); - - for (int i = 0; i < options.outputAddress.size(); ++i) { - FairMQChannel outputChannel(options.outputSocketType.at(i), options.outputMethod.at(i), options.outputAddress.at(i)); - outputChannel.UpdateSndBufSize(options.outputBufSize.at(i)); - outputChannel.UpdateRcvBufSize(options.outputBufSize.at(i)); - outputChannel.UpdateRateLogging(options.outputRateLogging.at(i)); - epn.fChannels["data-out"].push_back(outputChannel); + // configure data input channel + FairMQChannel dataInChannel(options.dataInSocketType, options.dataInMethod, options.dataInAddress); + dataInChannel.UpdateSndBufSize(options.dataInBufSize); + dataInChannel.UpdateRcvBufSize(options.dataInBufSize); + dataInChannel.UpdateRateLogging(options.dataInRateLogging); + epn.fChannels["data-in"].push_back(dataInChannel); + + // configure data output channel + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, options.dataOutAddress); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + epn.fChannels["data-out"].push_back(dataOutChannel); + + // configure heartbeats output channels + for (int i = 0; i < options.numFLPs; ++i) { + FairMQChannel hbOutChannel(options.hbOutSocketType, options.hbOutMethod, options.hbOutAddress.at(i)); + hbOutChannel.UpdateSndBufSize(options.hbOutBufSize); + hbOutChannel.UpdateRcvBufSize(options.hbOutBufSize); + hbOutChannel.UpdateRateLogging(options.hbOutRateLogging); + epn.fChannels["heartbeat-out"].push_back(hbOutChannel); } + // configure acknowledgement channel + FairMQChannel ackOutChannel(options.ackOutSocketType, options.ackOutMethod, options.ackOutAddress); + ackOutChannel.UpdateSndBufSize(options.ackOutBufSize); + ackOutChannel.UpdateRcvBufSize(options.ackOutBufSize); + ackOutChannel.UpdateRateLogging(options.ackOutRateLogging); + epn.fChannels["ack-out"].push_back(ackOutChannel); + epn.ChangeState("INIT_DEVICE"); epn.WaitForEndOfState("INIT_DEVICE"); @@ -171,17 +206,7 @@ int main(int argc, char** argv) epn.WaitForEndOfState("INIT_TASK"); epn.ChangeState("RUN"); - epn.WaitForEndOfState("RUN"); - - epn.ChangeState("STOP"); - - epn.ChangeState("RESET_TASK"); - epn.WaitForEndOfState("RESET_TASK"); - - epn.ChangeState("RESET_DEVICE"); - epn.WaitForEndOfState("RESET_DEVICE"); - - epn.ChangeState("END"); + epn.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn-distributed/run/runFLPSender.cxx b/devices/flp2epn-distributed/run/runFLPSender.cxx index 72a59ddb0f556..2b51c2638c3e4 100644 --- a/devices/flp2epn-distributed/run/runFLPSender.cxx +++ b/devices/flp2epn-distributed/run/runFLPSender.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -18,80 +17,74 @@ using namespace std; using namespace AliceO2::Devices; -FLPSender flp; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - flp.ChangeState(FLPSender::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int flpIndex; int eventSize; int ioThreads; - int numInputs; - int numOutputs; + int numEPNs; int heartbeatTimeoutInMs; int testMode; int sendOffset; - - vector inputSocketType; - vector inputBufSize; - vector inputMethod; - vector inputAddress; - vector inputRateLogging; - - vector outputSocketType; - vector outputBufSize; - vector outputMethod; - vector outputAddress; - vector outputRateLogging; + int sendDelay; + + string dataInSocketType; + int dataInBufSize; + string dataInMethod; + string dataInAddress; + int dataInRateLogging; + + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + vector dataOutAddress; + int dataOutRateLogging; + + string hbInSocketType; + int hbInBufSize; + string hbInMethod; + string hbInAddress; + int hbInRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) { - if (_options == NULL) + if (_options == NULL) { throw runtime_error("Internal error: options' container is empty."); + } namespace bpo = boost::program_options; bpo::options_description desc("Options"); desc.add_options() ("id", bpo::value()->required(), "Device ID") ("flp-index", bpo::value()->default_value(0), "FLP Index (for debugging in test mode)") - ("event-size", bpo::value()->default_value(1000), "Event size in bytes") + ("event-size", bpo::value()->default_value(1000), "Event size in bytes (test mode)") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("num-inputs", bpo::value()->required(), "Number of FLP input sockets") - ("num-outputs", bpo::value()->required(), "Number of FLP output sockets") + ("num-epns", bpo::value()->required(), "Number of EPNs") ("heartbeat-timeout", bpo::value()->default_value(20000), "Heartbeat timeout in milliseconds") ("test-mode", bpo::value()->default_value(0), "Run in test mode") ("send-offset", bpo::value()->default_value(0), "Offset for staggered sending") - ("input-socket-type", bpo::value>()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value>()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value>()->required(), "Input method: bind/connect") - ("input-address", bpo::value>()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value>()->required(), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value>()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value>()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value>()->required(), "Output method: bind/connect") - ("output-address", bpo::value>()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value>()->required(), "Log output rate on socket, 1/0") + ("send-delay", bpo::value()->default_value(8), "Delay for staggered sending") + + ("data-in-socket-type", bpo::value()->default_value("pull"), "Data input socket type: sub/pull") + ("data-in-buff-size", bpo::value()->default_value(10), "Data input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-in-method", bpo::value()->default_value("bind"), "Data input method: bind/connect") + ("data-in-address", bpo::value()->required(), "Data input address, e.g.: \"tcp://localhost:5555\"") + ("data-in-rate-logging", bpo::value()->default_value(1), "Log data input rate on socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("push"), "Output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(10), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("connect"), "Output method: bind/connect") + ("data-out-address", bpo::value>()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(1), "Log output rate on socket, 1/0") + + ("hb-in-socket-type", bpo::value()->default_value("sub"), "Heartbeat in socket type: sub/pull") + ("hb-in-buff-size", bpo::value()->default_value(100), "Heartbeat in buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("hb-in-method", bpo::value()->default_value("bind"), "Heartbeat in method: bind/connect") + ("hb-in-address", bpo::value()->required(), "Heartbeat in address, e.g.: \"tcp://localhost:5555\"") + ("hb-in-rate-logging", bpo::value()->default_value(0), "Log heartbeat in rate on socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -104,45 +97,60 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::notify(vm); - if (vm.count("id")) { _options->id = vm["id"].as(); } - if (vm.count("flp-index")) { _options->flpIndex = vm["flp-index"].as(); } - if (vm.count("event-size")) { _options->eventSize = vm["event-size"].as(); } - if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("num-inputs")) { _options->numInputs = vm["num-inputs"].as(); } - if (vm.count("num-outputs")) { _options->numOutputs = vm["num-outputs"].as(); } - if (vm.count("heartbeat-timeout")) { _options->heartbeatTimeoutInMs = vm["heartbeat-timeout"].as(); } - if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } - if (vm.count("send-offset")) { _options->sendOffset = vm["send-offset"].as(); } - - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as>(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as>(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as>(); } - if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as>(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as>(); } - - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as>(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as>(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as>(); } - if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as>(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as>(); } + if (vm.count("id")) { _options->id = vm["id"].as(); } + if (vm.count("flp-index")) { _options->flpIndex = vm["flp-index"].as(); } + if (vm.count("event-size")) { _options->eventSize = vm["event-size"].as(); } + if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } + + if (vm.count("num-epns")) { _options->numEPNs = vm["num-epns"].as(); } + + if (vm.count("heartbeat-timeout")) { _options->heartbeatTimeoutInMs = vm["heartbeat-timeout"].as(); } + if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } + if (vm.count("send-offset")) { _options->sendOffset = vm["send-offset"].as(); } + if (vm.count("send-delay")) { _options->sendDelay = vm["send-delay"].as(); } + + if (vm.count("data-in-socket-type")) { _options->dataInSocketType = vm["data-in-socket-type"].as(); } + if (vm.count("data-in-buff-size")) { _options->dataInBufSize = vm["data-in-buff-size"].as(); } + if (vm.count("data-in-method")) { _options->dataInMethod = vm["data-in-method"].as(); } + if (vm.count("data-in-address")) { _options->dataInAddress = vm["data-in-address"].as(); } + if (vm.count("data-in-rate-logging")) { _options->dataInRateLogging = vm["data-in-rate-logging"].as(); } + + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as>(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } + + if (vm.count("hb-in-socket-type")) { _options->hbInSocketType = vm["hb-in-socket-type"].as(); } + if (vm.count("hb-in-buff-size")) { _options->hbInBufSize = vm["hb-in-buff-size"].as(); } + if (vm.count("hb-in-method")) { _options->hbInMethod = vm["hb-in-method"].as(); } + if (vm.count("hb-in-address")) { _options->hbInAddress = vm["hb-in-address"].as(); } + if (vm.count("hb-in-rate-logging")) { _options->hbInRateLogging = vm["hb-in-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + FLPSender flp; + flp.CatchSignals(); DeviceOptions_t options; try { - if (!parse_cmd_line(argc, argv, &options)) + if (!parse_cmd_line(argc, argv, &options)) { return 0; + } } catch (const exception& e) { LOG(ERROR) << e.what(); return 1; } - LOG(INFO) << "PID: " << getpid(); + if (options.numEPNs != options.dataOutAddress.size()) { + LOG(ERROR) << "Number of EPNs does not match the number of provided data output addresses."; + return 1; + } + + LOG(INFO) << "FLP Sender, ID: " << options.id << " (PID: " << getpid() << ")"; FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); @@ -155,23 +163,30 @@ int main(int argc, char** argv) flp.SetProperty(FLPSender::HeartbeatTimeoutInMs, options.heartbeatTimeoutInMs); flp.SetProperty(FLPSender::TestMode, options.testMode); flp.SetProperty(FLPSender::SendOffset, options.sendOffset); - - - for (int i = 0; i < options.inputAddress.size(); ++i) { - FairMQChannel inputChannel(options.inputSocketType.at(i), options.inputMethod.at(i), options.inputAddress.at(i)); - inputChannel.UpdateSndBufSize(options.inputBufSize.at(i)); - inputChannel.UpdateRcvBufSize(options.inputBufSize.at(i)); - inputChannel.UpdateRateLogging(options.inputRateLogging.at(i)); - flp.fChannels["data-in"].push_back(inputChannel); + flp.SetProperty(FLPSender::SendDelay, options.sendDelay); + + // configure data input channel + FairMQChannel dataInChannel(options.dataInSocketType, options.dataInMethod, options.dataInAddress); + dataInChannel.UpdateSndBufSize(options.dataInBufSize); + dataInChannel.UpdateRcvBufSize(options.dataInBufSize); + dataInChannel.UpdateRateLogging(options.dataInRateLogging); + flp.fChannels["data-in"].push_back(dataInChannel); + + // configure data output channels + for (int i = 0; i < options.numEPNs; ++i) { + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, options.dataOutAddress.at(i)); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + flp.fChannels["data-out"].push_back(dataOutChannel); } - for (int i = 0; i < options.outputAddress.size(); ++i) { - FairMQChannel outputChannel(options.outputSocketType.at(i), options.outputMethod.at(i), options.outputAddress.at(i)); - outputChannel.UpdateSndBufSize(options.outputBufSize.at(i)); - outputChannel.UpdateRcvBufSize(options.outputBufSize.at(i)); - outputChannel.UpdateRateLogging(options.outputRateLogging.at(i)); - flp.fChannels["data-out"].push_back(outputChannel); - } + // configure heartbeat input channel + FairMQChannel hbInChannel(options.hbInSocketType, options.hbInMethod, options.hbInAddress); + hbInChannel.UpdateSndBufSize(options.hbInBufSize); + hbInChannel.UpdateRcvBufSize(options.hbInBufSize); + hbInChannel.UpdateRateLogging(options.hbInRateLogging); + flp.fChannels["heartbeat-in"].push_back(hbInChannel); flp.ChangeState("INIT_DEVICE"); flp.WaitForEndOfState("INIT_DEVICE"); @@ -180,17 +195,7 @@ int main(int argc, char** argv) flp.WaitForEndOfState("INIT_TASK"); flp.ChangeState("RUN"); - flp.WaitForEndOfState("RUN"); - - flp.ChangeState("STOP"); - - flp.ChangeState("RESET_TASK"); - flp.WaitForEndOfState("RESET_TASK"); - - flp.ChangeState("RESET_DEVICE"); - flp.WaitForEndOfState("RESET_DEVICE"); - - flp.ChangeState("END"); + flp.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn-distributed/run/runFLPSyncSampler.cxx b/devices/flp2epn-distributed/run/runFLPSyncSampler.cxx index 3ebccc4452899..56f6f7b4ea42e 100644 --- a/devices/flp2epn-distributed/run/runFLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/run/runFLPSyncSampler.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -18,45 +17,23 @@ using namespace std; using namespace AliceO2::Devices; -FLPSyncSampler sampler; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - sampler.ChangeState(FLPSyncSampler::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int eventRate; int ioThreads; - string inputSocketType; - int inputBufSize; - string inputMethod; - string inputAddress; - int inputRateLogging; - - string outputSocketType; - int outputBufSize; - string outputMethod; - string outputAddress; - int outputRateLogging; + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + string dataOutAddress; + int dataOutRateLogging; + + string ackInSocketType; + int ackInBufSize; + string ackInMethod; + string ackInAddress; + int ackInRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) @@ -70,16 +47,19 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) ("id", bpo::value()->required(), "Device ID") ("event-rate", bpo::value()->default_value(0), "Event rate limit in maximum number of events per second") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("input-socket-type", bpo::value()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value()->required(), "Input method: bind/connect") - ("input-address", bpo::value()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value()->required(), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value()->required(), "Output method: bind/connect") - ("output-address", bpo::value()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value()->required(), "Log output rate on socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("pub"), "Data output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(100), "Data output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("bind"), "Data output method: bind/connect") + ("data-out-address", bpo::value()->required(), "Data output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(0), "Log output rate on data socket, 1/0") + + ("ack-in-socket-type", bpo::value()->default_value("pull"), "Acknowledgement Input socket type: sub/pull") + ("ack-in-buff-size", bpo::value()->default_value(100), "Acknowledgement Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("ack-in-method", bpo::value()->default_value("bind"), "Acknowledgement Input method: bind/connect") + ("ack-in-address", bpo::value()->required(), "Acknowledgement Input address, e.g.: \"tcp://localhost:5555\"") + ("ack-in-rate-logging", bpo::value()->default_value(0), "Log input rate on Acknowledgement socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -92,28 +72,29 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::notify(vm); - if (vm.count("id")) { _options->id = vm["id"].as(); } - if (vm.count("event-rate")) { _options->eventRate = vm["event-rate"].as(); } - if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } + if (vm.count("id")) { _options->id = vm["id"].as(); } + if (vm.count("event-rate")) { _options->eventRate = vm["event-rate"].as(); } + if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as(); } - if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as(); } + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as(); } - if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as(); } + if (vm.count("ack-in-socket-type")) { _options->ackInSocketType = vm["ack-in-socket-type"].as(); } + if (vm.count("ack-in-buff-size")) { _options->ackInBufSize = vm["ack-in-buff-size"].as(); } + if (vm.count("ack-in-method")) { _options->ackInMethod = vm["ack-in-method"].as(); } + if (vm.count("ack-in-address")) { _options->ackInAddress = vm["ack-in-address"].as(); } + if (vm.count("ack-in-rate-logging")) { _options->ackInRateLogging = vm["ack-in-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + FLPSyncSampler sampler; + sampler.CatchSignals(); DeviceOptions_t options; try { @@ -124,7 +105,7 @@ int main(int argc, char** argv) return 1; } - LOG(INFO) << "PID: " << getpid(); + LOG(INFO) << "FLP Sync Sampler, ID: " << options.id << " (PID: " << getpid() << ")"; FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); @@ -134,17 +115,19 @@ int main(int argc, char** argv) sampler.SetProperty(FLPSyncSampler::NumIoThreads, options.ioThreads); sampler.SetProperty(FLPSyncSampler::EventRate, options.eventRate); - FairMQChannel inputChannel(options.inputSocketType, options.inputMethod, options.inputAddress); - inputChannel.UpdateSndBufSize(options.inputBufSize); - inputChannel.UpdateRcvBufSize(options.inputBufSize); - inputChannel.UpdateRateLogging(options.inputRateLogging); - sampler.fChannels["data-in"].push_back(inputChannel); + // configure data output channel + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, options.dataOutAddress); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + sampler.fChannels["data-out"].push_back(dataOutChannel); - FairMQChannel outputChannel(options.outputSocketType, options.outputMethod, options.outputAddress); - outputChannel.UpdateSndBufSize(options.outputBufSize); - outputChannel.UpdateRcvBufSize(options.outputBufSize); - outputChannel.UpdateRateLogging(options.outputRateLogging); - sampler.fChannels["data-out"].push_back(outputChannel); + // configure acknowledgement input channel + FairMQChannel ackInChannel(options.ackInSocketType, options.ackInMethod, options.ackInAddress); + ackInChannel.UpdateSndBufSize(options.ackInBufSize); + ackInChannel.UpdateRcvBufSize(options.ackInBufSize); + ackInChannel.UpdateRateLogging(options.ackInRateLogging); + sampler.fChannels["ack-in"].push_back(ackInChannel); sampler.ChangeState("INIT_DEVICE"); sampler.WaitForEndOfState("INIT_DEVICE"); @@ -153,17 +136,7 @@ int main(int argc, char** argv) sampler.WaitForEndOfState("INIT_TASK"); sampler.ChangeState("RUN"); - sampler.WaitForEndOfState("RUN"); - - sampler.ChangeState("STOP"); - - sampler.ChangeState("RESET_TASK"); - sampler.WaitForEndOfState("RESET_TASK"); - - sampler.ChangeState("RESET_DEVICE"); - sampler.WaitForEndOfState("RESET_DEVICE"); - - sampler.ChangeState("END"); + sampler.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn-distributed/run/startFLP2EPN-distributed.sh.in b/devices/flp2epn-distributed/run/startFLP2EPN-distributed.sh.in index 592bc484686ee..6e51cfd38e75d 100755 --- a/devices/flp2epn-distributed/run/startFLP2EPN-distributed.sh.in +++ b/devices/flp2epn-distributed/run/startFLP2EPN-distributed.sh.in @@ -7,99 +7,90 @@ signalBuffSize="100" SAMPLER="flpSyncSampler" SAMPLER+=" --id 101" SAMPLER+=" --event-rate 100" -SAMPLER+=" --input-socket-type pull --input-buff-size $signalBuffSize --input-method bind --input-address tcp://*:5990 --input-rate-logging 1" # ACK from EPNs -SAMPLER+=" --output-socket-type pub --output-buff-size $signalBuffSize --output-method bind --output-address tcp://*:5550 --output-rate-logging 0" +SAMPLER+=" --ack-in-address tcp://*:5990" +SAMPLER+=" --data-out-address tcp://*:5550" xterm -geometry 80x25+0+0 -hold -e @CMAKE_BINARY_DIR@/bin/$SAMPLER & FLP0="flpSender" FLP0+=" --id FLP1" FLP0+=" --flp-index 0" FLP0+=" --event-size 1000000" -FLP0+=" --num-inputs 3" -FLP0+=" --num-outputs 3" +FLP0+=" --num-epns 3" FLP0+=" --heartbeat-timeout 20000" FLP0+=" --test-mode 1" FLP0+=" --send-offset 0" -FLP0+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://*:5600 --input-rate-logging 0" # command -FLP0+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5580 --input-rate-logging 0" # heartbeat -FLP0+=" --input-socket-type sub --input-buff-size $signalBuffSize --input-method connect --input-address tcp://127.0.0.1:5550 --input-rate-logging 0" # start signal -FLP0+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5560 --output-rate-logging 1" -FLP0+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5561 --output-rate-logging 1" -FLP0+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5562 --output-rate-logging 1" +FLP0+=" --hb-in-address tcp://127.0.0.1:5580" +FLP0+=" --data-in-socket-type sub --data-in-method connect --data-in-address tcp://127.0.0.1:5550" # non-default socket type and method for test mode, default is pull/bind +FLP0+=" --data-out-address tcp://127.0.0.1:5560" +FLP0+=" --data-out-address tcp://127.0.0.1:5561" +FLP0+=" --data-out-address tcp://127.0.0.1:5562" xterm -geometry 80x25+500+0 -hold -e @CMAKE_BINARY_DIR@/bin/$FLP0 & FLP1="flpSender" FLP1+=" --id FLP2" -FLP1+=" --flp-index 0" +FLP1+=" --flp-index 1" FLP1+=" --event-size 1000000" -FLP1+=" --num-inputs 3" -FLP1+=" --num-outputs 3" +FLP1+=" --num-epns 3" FLP1+=" --heartbeat-timeout 20000" FLP1+=" --test-mode 1" FLP1+=" --send-offset 0" -FLP1+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://*:5601 --input-rate-logging 0" # command -FLP1+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5581 --input-rate-logging 0" # heartbeat -FLP1+=" --input-socket-type sub --input-buff-size $buffSize --input-method connect --input-address tcp://127.0.0.1:5550 --input-rate-logging 0" # start signal -FLP1+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5560 --output-rate-logging 1" -FLP1+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5561 --output-rate-logging 1" -FLP1+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5562 --output-rate-logging 1" +FLP1+=" --hb-in-address tcp://127.0.0.1:5581" +FLP1+=" --data-in-socket-type sub --data-in-method connect --data-in-address tcp://127.0.0.1:5550" # non-default socket type and method for test mode, default is pull/bind +FLP1+=" --data-out-address tcp://127.0.0.1:5560" +FLP1+=" --data-out-address tcp://127.0.0.1:5561" +FLP1+=" --data-out-address tcp://127.0.0.1:5562" xterm -geometry 80x25+500+350 -hold -e @CMAKE_BINARY_DIR@/bin/$FLP1 & FLP2="flpSender" FLP2+=" --id FLP3" -FLP2+=" --flp-index 0" +FLP2+=" --flp-index 2" FLP2+=" --event-size 1000000" -FLP2+=" --num-inputs 3" -FLP2+=" --num-outputs 3" +FLP2+=" --num-epns 3" FLP2+=" --heartbeat-timeout 20000" FLP2+=" --test-mode 1" FLP2+=" --send-offset 0" -FLP2+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://*:5602 --input-rate-logging 0" # command -FLP2+=" --input-socket-type sub --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5582 --input-rate-logging 0" # heartbeat -FLP2+=" --input-socket-type sub --input-buff-size $buffSize --input-method connect --input-address tcp://127.0.0.1:5550 --input-rate-logging 0" # start signal -FLP2+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5560 --output-rate-logging 1" -FLP2+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5561 --output-rate-logging 1" -FLP2+=" --output-socket-type push --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5562 --output-rate-logging 1" +FLP2+=" --hb-in-address tcp://127.0.0.1:5582" +FLP2+=" --data-in-socket-type sub --data-in-method connect --data-in-address tcp://127.0.0.1:5550" # non-default socket type and method for test mode, default is pull/bind +FLP2+=" --data-out-address tcp://127.0.0.1:5560" +FLP2+=" --data-out-address tcp://127.0.0.1:5561" +FLP2+=" --data-out-address tcp://127.0.0.1:5562" xterm -geometry 80x25+500+700 -hold -e @CMAKE_BINARY_DIR@/bin/$FLP2 & EPN0="epnReceiver" EPN0+=" --id EPN1" -EPN0+=" --num-outputs 5" EPN0+=" --heartbeat-interval 5000" EPN0+=" --num-flps 3" EPN0+=" --test-mode 1" -EPN0+=" --input-socket-type pull --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5560 --input-rate-logging 1" # data -EPN0+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5580 --output-rate-logging 0" -EPN0+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5581 --output-rate-logging 0" -EPN0+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5582 --output-rate-logging 0" -EPN0+=" --output-socket-type pub --output-buff-size $buffSize --output-method bind --output-address tcp://*:5590 --output-rate-logging 1" # send to next step -EPN0+=" --output-socket-type push --output-buff-size $signalBuffSize --output-method connect --output-address tcp://127.0.0.1:5990 --output-rate-logging 0" # ACK to the sampler +EPN0+=" --data-in-address tcp://127.0.0.1:5560" +EPN0+=" --data-out-address tcp://*:5590 --data-out-socket-type pub" # non-default socket type for test mode (because no receiver - do pub), default is push. +EPN0+=" --hb-out-address tcp://127.0.0.1:5580" +EPN0+=" --hb-out-address tcp://127.0.0.1:5581" +EPN0+=" --hb-out-address tcp://127.0.0.1:5582" +EPN0+=" --ack-out-address tcp://127.0.0.1:5990" xterm -geometry 80x25+1000+0 -hold -e @CMAKE_BINARY_DIR@/bin/$EPN0 & EPN1="epnReceiver" EPN1+=" --id EPN2" -EPN1+=" --num-outputs 5" EPN1+=" --heartbeat-interval 5000" EPN1+=" --num-flps 3" EPN1+=" --test-mode 1" -EPN1+=" --input-socket-type pull --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5561 --input-rate-logging 1" # data -EPN1+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5580 --output-rate-logging 0" -EPN1+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5581 --output-rate-logging 0" -EPN1+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5582 --output-rate-logging 0" -EPN1+=" --output-socket-type pub --output-buff-size $buffSize --output-method bind --output-address tcp://*:5591 --output-rate-logging 1" # send to next step -EPN1+=" --output-socket-type push --output-buff-size $signalBuffSize --output-method connect --output-address tcp://127.0.0.1:5990 --output-rate-logging 0" # ACK to the sampler +EPN1+=" --data-in-address tcp://127.0.0.1:5561" +EPN1+=" --data-out-address tcp://*:5591 --data-out-socket-type pub" # non-default socket type for test mode (because no receiver - do pub), default is push. +EPN1+=" --hb-out-address tcp://127.0.0.1:5580" +EPN1+=" --hb-out-address tcp://127.0.0.1:5581" +EPN1+=" --hb-out-address tcp://127.0.0.1:5582" +EPN1+=" --ack-out-address tcp://127.0.0.1:5990" xterm -geometry 80x25+1000+350 -hold -e @CMAKE_BINARY_DIR@/bin/$EPN1 & EPN2="epnReceiver" EPN2+=" --id EPN3" -EPN2+=" --num-outputs 5" EPN2+=" --heartbeat-interval 5000" EPN2+=" --num-flps 3" EPN2+=" --test-mode 1" -EPN2+=" --input-socket-type pull --input-buff-size $buffSize --input-method bind --input-address tcp://127.0.0.1:5562 --input-rate-logging 1" # data -EPN2+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5580 --output-rate-logging 0" -EPN2+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5581 --output-rate-logging 0" -EPN2+=" --output-socket-type pub --output-buff-size $buffSize --output-method connect --output-address tcp://127.0.0.1:5582 --output-rate-logging 0" -EPN2+=" --output-socket-type pub --output-buff-size $buffSize --output-method bind --output-address tcp://*:5592 --output-rate-logging 1" # send to next step -EPN2+=" --output-socket-type push --output-buff-size $signalBuffSize --output-method connect --output-address tcp://127.0.0.1:5990 --output-rate-logging 0" # ACK to the sampler +EPN2+=" --data-in-address tcp://127.0.0.1:5562" +EPN2+=" --data-out-address tcp://*:5592 --data-out-socket-type pub" # non-default socket type for test mode (because no receiver - do pub), default is push. +EPN2+=" --hb-out-address tcp://127.0.0.1:5580" +EPN2+=" --hb-out-address tcp://127.0.0.1:5581" +EPN2+=" --hb-out-address tcp://127.0.0.1:5582" +EPN2+=" --ack-out-address tcp://127.0.0.1:5990" xterm -geometry 80x25+1000+700 -hold -e @CMAKE_BINARY_DIR@/bin/$EPN2 & diff --git a/devices/flp2epn-distributed/runO2Prototype/flp_epn_hosts.cfg b/devices/flp2epn-distributed/runO2Prototype/flp_epn_hosts.cfg index ba3cc9d38a8f5..53d834d2f281d 100644 --- a/devices/flp2epn-distributed/runO2Prototype/flp_epn_hosts.cfg +++ b/devices/flp2epn-distributed/runO2Prototype/flp_epn_hosts.cfg @@ -1,12 +1,18 @@ @bash_begin@ echo "DBG: SSH ENV Script" -# source /home/orybalch/alice/AliceO2/build/config.sh +source /home/arybalch/alice/AliceO2/build/config.sh @bash_end@ -# sampler, orybalch@localhost, , /tmp/dds_work_dir, 1 +sampler, arybalch@cn48.internal, , /tmp/dds_wn_dir, 1 # flp -flp00, orybalch@localhost, , /tmp/dds_work_dir, 10 +flp00, arybalch@cn49.internal, , /tmp/dds_wn_dir, 16 +flp01, arybalch@cn50.internal, , /tmp/dds_wn_dir, 16 +flp02, arybalch@cn51.internal, , /tmp/dds_wn_dir, 16 +flp03, arybalch@cn52.internal, , /tmp/dds_wn_dir, 16 # epn -epn00, orybalch@localhost, , /tmp/dds_work_dir, 10 +epn00, arybalch@cn54.internal, , /tmp/dds_wn_dir, 16 +epn01, arybalch@cn55.internal, , /tmp/dds_wn_dir, 16 +epn02, arybalch@cn56.internal, , /tmp/dds_wn_dir, 16 +epn03, arybalch@cn53.internal, , /tmp/dds_wn_dir, 16 diff --git a/devices/flp2epn-distributed/runO2Prototype/flp_epn_topology.xml b/devices/flp2epn-distributed/runO2Prototype/flp_epn_topology.xml index 095e120e8c8e8..0482bc267e056 100644 --- a/devices/flp2epn-distributed/runO2Prototype/flp_epn_topology.xml +++ b/devices/flp2epn-distributed/runO2Prototype/flp_epn_topology.xml @@ -1,24 +1,27 @@ + + + - + - + - + - /home/arybalch/alice/AliceO2/build/bin/flpSyncSampler_dds --id 0 --event-rate 100 --input-socket-type pull --input-buff-size 100 --input-method bind --output-socket-type pub --output-buff-size 10 --output-method bind + /home/arybalch/alice/AliceO2/build/bin/flpSyncSampler_dds --id SAMPLER0 --event-rate 100 FLPSyncSamplerHost FLPSyncSamplerInputAddress @@ -27,7 +30,7 @@ - /home/arybalch/alice/AliceO2/build/bin/flpSender_dds --id 0 --event-size 100000 --num-inputs 3 --num-outputs 60 --input-socket-type sub --input-buff-size 10 --input-method bind --log-input-rate 0 --input-socket-type sub --input-buff-size 10 --input-method bind --log-input-rate 0 --input-socket-type sub --input-buff-size 10 --input-method connect --log-input-rate 0 --output-socket-type push --output-buff-size 10 --output-method connect --log-output-rate 1 --test-mode 1 + /home/arybalch/alice/AliceO2/build/bin/flpSender_dds --id FLP%taskIndex% --event-size 100000 --num-epns ${numEPNs} --data-in-socket-type sub --data-in-method connect --test-mode 1 FLPSenderHost FLPSyncSamplerOutputAddress @@ -37,7 +40,7 @@ - /home/arybalch/alice/AliceO2/build/bin/epnReceiver_dds --id 0 --num-outputs 42 --num-flps 40 --input-socket-type pull --input-buff-size 10 --input-method bind --log-input-rate 1 --output-socket-type pub --output-buff-size 10 --output-method connect --log-output-rate 0 --nextstep-socket-type pub --nextstep-buff-size 10 --nextstep-method bind --log-nextstep-rate 0 --rttack-socket-type push --rttack-buff-size 100 --rttack-method connect --log-rttack-rate 0 --test-mode 1 + /home/arybalch/alice/AliceO2/build/bin/epnReceiver_dds --id EPN%taskIndex% --num-flps ${numFLPs} --data-out-socket-type pub --test-mode 1 EPNReceiverHost FLPSenderHeartbeatInputAddress @@ -48,12 +51,11 @@
flpSyncSampler - + flpSender - + epnReceiver
-
diff --git a/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx b/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx index 0b2a372d0fb69..ebc6c59e3e028 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runEPNReceiver.cxx @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -26,61 +25,38 @@ using namespace std; using namespace AliceO2::Devices; -EPNReceiver epn; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - epn.ChangeState(EPNReceiver::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int ioThreads; - int numOutputs; int heartbeatIntervalInMs; int bufferTimeoutInMs; int numFLPs; int testMode; - string inputSocketType; - int inputBufSize; - string inputMethod; - // string inputAddress; - int inputRateLogging; - - string outputSocketType; - int outputBufSize; - string outputMethod; - // string outputAddress; - int outputRateLogging; - - string nextStepSocketType; - int nextStepBufSize; - string nextStepMethod; - // string nextStepAddress; - int nextStepRateLogging; - - string rttackSocketType; - int rttackBufSize; - string rttackMethod; - // string rttackAddress; - int rttackRateLogging; + string dataInSocketType; + int dataInBufSize; + string dataInMethod; + // string dataInAddress; + int dataInRateLogging; + + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + // string dataOutAddress; + int dataOutRateLogging; + + string hbOutSocketType; + int hbOutBufSize; + string hbOutMethod; + // string hbOutAddress; + int hbOutRateLogging; + + string ackOutSocketType; + int ackOutBufSize; + string ackOutMethod; + // string ackOutAddress; + int ackOutRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) @@ -93,31 +69,35 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) desc.add_options() ("id", bpo::value()->required(), "Device ID") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("num-outputs", bpo::value()->required(), "Number of EPN output sockets") ("heartbeat-interval", bpo::value()->default_value(5000), "Heartbeat interval in milliseconds") ("buffer-timeout", bpo::value()->default_value(5000), "Buffer timeout in milliseconds") ("num-flps", bpo::value()->required(), "Number of FLPs") ("test-mode", bpo::value()->default_value(0), "Run in test mode") - ("input-socket-type", bpo::value()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value()->required(), "Input method: bind/connect") - // ("input-address", bpo::value()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value()->required(), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value()->required(), "Output method: bind/connect") - // ("output-address", bpo::value()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value()->required(), "Log output rate on socket, 1/0") - ("nextstep-socket-type", bpo::value()->required(), "Output socket type: pub/push") - ("nextstep-buff-size", bpo::value()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("nextstep-method", bpo::value()->required(), "Output method: bind/connect") - // ("nextstep-address", bpo::value()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("nextstep-rate-logging", bpo::value()->required(), "Log output rate on socket, 1/0") - ("rttack-socket-type", bpo::value(), "Output socket type: pub/push") - ("rttack-buff-size", bpo::value(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("rttack-method", bpo::value(), "Output method: bind/connect") - // ("rttack-address", bpo::value(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("rttack-rate-logging", bpo::value(), "Log output rate on socket, 1/0") + + ("data-in-socket-type", bpo::value()->default_value("pull"), "Data input socket type: sub/pull") + ("data-in-buff-size", bpo::value()->default_value(10), "Data input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-in-method", bpo::value()->default_value("bind"), "Data input method: bind/connect") + // ("data-in-address", bpo::value()->required(), "Data input address, e.g.: \"tcp://localhost:5555\"") + ("data-in-rate-logging", bpo::value()->default_value(1), "Log input rate on data socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("push"), "Data output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(10), "Data output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("bind"), "Data output method: bind/connect") + // ("data-out-address", bpo::value()->required(), "Data output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(1), "Log output rate on data socket, 1/0") + + ("hb-out-socket-type", bpo::value()->default_value("pub"), "Heartbeat output socket type: pub/push") + ("hb-out-buff-size", bpo::value()->default_value(100), "Heartbeat output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("hb-out-method", bpo::value()->default_value("connect"), "Heartbeat output method: bind/connect") + // ("hb-out-address", bpo::value()->required(), "Heartbeat output address, e.g.: \"tcp://localhost:5555\"") + ("hb-out-rate-logging", bpo::value()->default_value(0), "Log output rate on heartbeat socket, 1/0") + + ("ack-out-socket-type", bpo::value()->default_value("push"), "Acknowledgement output socket type: pub/push") + ("ack-out-buff-size", bpo::value()->default_value(100), "Acknowledgement output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("ack-out-method", bpo::value()->default_value("connect"), "Acknowledgement output method: bind/connect") + // ("ack-out-address", bpo::value()->required() "Acknowledgement output address, e.g.: \"tcp://localhost:5555\"") + ("ack-out-rate-logging", bpo::value()->default_value(0), "Log output rate on acknowledgement socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -132,43 +112,46 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) if (vm.count("id")) { _options->id = vm["id"].as(); } if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("num-outputs")) { _options->numOutputs = vm["num-outputs"].as(); } if (vm.count("heartbeat-interval")) { _options->heartbeatIntervalInMs = vm["heartbeat-interval"].as(); } if (vm.count("buffer-timeout")) { _options->bufferTimeoutInMs = vm["buffer-timeout"].as(); } if (vm.count("num-flps")) { _options->numFLPs = vm["num-flps"].as(); } if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as(); } - // if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as(); } - - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as(); } - // if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as(); } - - if (vm.count("nextstep-socket-type")) { _options->nextStepSocketType = vm["nextstep-socket-type"].as(); } - if (vm.count("nextstep-buff-size")) { _options->nextStepBufSize = vm["nextstep-buff-size"].as(); } - if (vm.count("nextstep-method")) { _options->nextStepMethod = vm["nextstep-method"].as(); } - // if (vm.count("nextstep-address")) { _options->nextStepAddress = vm["nextstep-address"].as(); } - if (vm.count("nextstep-rate-logging")) { _options->nextStepRateLogging = vm["nextstep-rate-logging"].as(); } - - if (vm.count("rttack-socket-type")) { _options->rttackSocketType = vm["rttack-socket-type"].as(); } - if (vm.count("rttack-buff-size")) { _options->rttackBufSize = vm["rttack-buff-size"].as(); } - if (vm.count("rttack-method")) { _options->rttackMethod = vm["rttack-method"].as(); } - // if (vm.count("rttack-address")) { _options->rttackAddress = vm["rttack-address"].as(); } - if (vm.count("rttack-rate-logging")) { _options->rttackRateLogging = vm["rttack-rate-logging"].as(); } + if (vm.count("data-in-socket-type")) { _options->dataInSocketType = vm["data-in-socket-type"].as(); } + if (vm.count("data-in-buff-size")) { _options->dataInBufSize = vm["data-in-buff-size"].as(); } + if (vm.count("data-in-method")) { _options->dataInMethod = vm["data-in-method"].as(); } + // if (vm.count("data-in-address")) { _options->dataInAddress = vm["data-in-address"].as(); } + if (vm.count("data-in-rate-logging")) { _options->dataInRateLogging = vm["data-in-rate-logging"].as(); } + + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + // if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } + + if (vm.count("hb-out-socket-type")) { _options->hbOutSocketType = vm["hb-out-socket-type"].as(); } + if (vm.count("hb-out-buff-size")) { _options->hbOutBufSize = vm["hb-out-buff-size"].as(); } + if (vm.count("hb-out-method")) { _options->hbOutMethod = vm["hb-out-method"].as(); } + // if (vm.count("hb-out-address")) { _options->hbOutAddress = vm["hb-out-address"].as(); } + if (vm.count("hb-out-rate-logging")) { _options->hbOutRateLogging = vm["hb-out-rate-logging"].as(); } + + if (vm.count("ack-out-socket-type")) { _options->ackOutSocketType = vm["ack-out-socket-type"].as(); } + if (vm.count("ack-out-buff-size")) { _options->ackOutBufSize = vm["ack-out-buff-size"].as(); } + if (vm.count("ack-out-method")) { _options->ackOutMethod = vm["ack-out-method"].as(); } + // if (vm.count("ack-out-address")) { _options->ackOutAddress = vm["ack-out-address"].as(); } + if (vm.count("ack-out-rate-logging")) { _options->ackOutRateLogging = vm["ack-out-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + // create the device + EPNReceiver epn; + // let the device catch interrupt signals (SIGINT, SIGTERM) + epn.CatchSignals(); + // create container for command line options and fill it DeviceOptions_t options; try { if (!parse_cmd_line(argc, argv, &options)) @@ -178,22 +161,30 @@ int main(int argc, char** argv) return 1; } + LOG(INFO) << "EPN Receiver, ID: " << options.id << " (PID: " << getpid() << ")"; + + // container to hold the IP address of the node we are running on map IPs; FairMQ::tools::getHostIPs(IPs); stringstream ss; + // With TCP, we want to run either one Eth or Infiniband, try to find available interfaces if (IPs.count("ib0")) { - ss << "tcp://" << IPs["ib0"] << ":5655"; + ss << "tcp://" << IPs["ib0"]; + } else if (IPs.count("eth0")) { + ss << "tcp://" << IPs["eth0"]; } else { - ss << "tcp://" << IPs["eth0"] << ":5655"; + LOG(ERROR) << "Could not find ib0 or eth0 interface"; + exit(EXIT_FAILURE); } - string initialInputAddress = ss.str(); - string initialOutputAddress = ss.str(); + LOG(INFO) << "Running on " << ss.str(); + + ss << ":5655"; - LOG(INFO) << "EPN Receiver"; - LOG(INFO) << "PID: " << getpid(); + // store the IP addresses to be given to device for initialization + string ownAddress = ss.str(); FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); @@ -207,48 +198,55 @@ int main(int argc, char** argv) epn.SetProperty(EPNReceiver::NumFLPs, options.numFLPs); epn.SetProperty(EPNReceiver::TestMode, options.testMode); - // configure inputs - FairMQChannel inputChannel(options.inputSocketType, options.inputMethod, initialInputAddress); - inputChannel.UpdateSndBufSize(options.inputBufSize); - inputChannel.UpdateRcvBufSize(options.inputBufSize); - inputChannel.UpdateRateLogging(options.inputRateLogging); - epn.fChannels["data-in"].push_back(inputChannel); - - // configure outputs + // configure data input channel (port will be configured dynamically) + FairMQChannel dataInChannel(options.dataInSocketType, options.dataInMethod, ownAddress); + dataInChannel.UpdateSndBufSize(options.dataInBufSize); + dataInChannel.UpdateRcvBufSize(options.dataInBufSize); + dataInChannel.UpdateRateLogging(options.dataInRateLogging); + epn.fChannels["data-in"].push_back(dataInChannel); + + // configure data output channel (port will be configured dynamically) + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, ownAddress); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + epn.fChannels["data-out"].push_back(dataOutChannel); + + // configure heartbeat output channels for (int i = 0; i < options.numFLPs; ++i) { - FairMQChannel outputChannel(options.outputSocketType, options.outputMethod, ""); - outputChannel.UpdateSndBufSize(options.outputBufSize); - outputChannel.UpdateRcvBufSize(options.outputBufSize); - outputChannel.UpdateRateLogging(options.outputRateLogging); - epn.fChannels["data-out"].push_back(outputChannel); + FairMQChannel hbOutChannel(options.hbOutSocketType, options.hbOutMethod, ""); + hbOutChannel.UpdateSndBufSize(options.hbOutBufSize); + hbOutChannel.UpdateRcvBufSize(options.hbOutBufSize); + hbOutChannel.UpdateRateLogging(options.hbOutRateLogging); + epn.fChannels["heartbeat-out"].push_back(hbOutChannel); } - FairMQChannel nextStepChannel(options.nextStepSocketType, options.nextStepMethod, initialOutputAddress); - nextStepChannel.UpdateSndBufSize(options.nextStepBufSize); - nextStepChannel.UpdateRcvBufSize(options.nextStepBufSize); - nextStepChannel.UpdateRateLogging(options.nextStepRateLogging); - epn.fChannels["data-out"].push_back(nextStepChannel); - + // In test mode, configure acknowledgement channel to the FLPSyncSampler if (options.testMode == 1) { - // In test mode, initialize the feedback socket to the FLPSyncSampler - FairMQChannel rttackChannel(options.rttackSocketType, options.rttackMethod, ""); - rttackChannel.UpdateSndBufSize(options.rttackBufSize); - rttackChannel.UpdateRcvBufSize(options.rttackBufSize); - rttackChannel.UpdateRateLogging(options.rttackRateLogging); - epn.fChannels["data-out"].push_back(rttackChannel); + FairMQChannel ackOutChannel(options.ackOutSocketType, options.ackOutMethod, ""); + ackOutChannel.UpdateSndBufSize(options.ackOutBufSize); + ackOutChannel.UpdateRcvBufSize(options.ackOutBufSize); + ackOutChannel.UpdateRateLogging(options.ackOutRateLogging); + epn.fChannels["ack-out"].push_back(ackOutChannel); } + // Initialize the device with the configured properties (asynchronous). epn.ChangeState("INIT_DEVICE"); + // Wait for initial validation. + // Missing properties (such as addresses for connecting) will be revalidated asynchronously epn.WaitForInitialValidation(); + // create DDS key value store dds::key_value::CKeyValue ddsKeyValue; + // Advertise the bound data input address via DDS. ddsKeyValue.putValue("EPNReceiverInputAddress", epn.fChannels["data-in"].at(0).GetAddress()); + // In regular mode, advertise the bound data output address via DDS. if (options.testMode == 0) { - // In regular mode, advertise the bound data output address via DDS. - ddsKeyValue.putValue("EPNReceiverOutputAddress", epn.fChannels["data-out"].at(options.numFLPs).GetAddress()); + ddsKeyValue.putValue("EPNReceiverOutputAddress", epn.fChannels["data-out"].at(0).GetAddress()); } + // Initialize DDS store to receive properties dds::key_value::CKeyValue::valuesMap_t values; { mutex keyMutex; @@ -256,6 +254,8 @@ int main(int argc, char** argv) ddsKeyValue.subscribe([&keyCondition](const string& _key, const string& _value) {keyCondition.notify_all();}); + // Receive FLPSender heartbeat input addresses from DDS. + LOG(DEBUG) << "Waiting for FLPSender heartbeat input addresses from DDS..."; ddsKeyValue.getValues("FLPSenderHeartbeatInputAddress", &values); while (values.size() != options.numFLPs) { unique_lock lock(keyMutex); @@ -263,22 +263,25 @@ int main(int argc, char** argv) ddsKeyValue.getValues("FLPSenderHeartbeatInputAddress", &values); } } + LOG(DEBUG) << "Received all " << options.numFLPs << " addresses from DDS."; - dds::key_value::CKeyValue::valuesMap_t::const_iterator it_values = values.begin(); + // Update device properties with the received addresses. + auto it_values = values.begin(); for (int i = 0; i < options.numFLPs; ++i) { - epn.fChannels["data-out"].at(i).UpdateAddress(it_values->second); + epn.fChannels["heartbeat-out"].at(i).UpdateAddress(it_values->second); it_values++; } + // In test mode, get the value of the FLPSyncSampler input address for the feedback socket. if (options.testMode == 1) { - // In test mode, get the value of the FLPSyncSampler input address for the feedback socket. values.clear(); { mutex keyMutex; condition_variable keyCondition; - + ddsKeyValue.subscribe([&keyCondition](const string& _key, const string& _value) {keyCondition.notify_all();}); + LOG(DEBUG) << "Waiting for FLPSyncSampler Input Address from DDS..."; ddsKeyValue.getValues("FLPSyncSamplerInputAddress", &values); while (values.empty()) { unique_lock lock(keyMutex); @@ -286,10 +289,13 @@ int main(int argc, char** argv) ddsKeyValue.getValues("FLPSyncSamplerInputAddress", &values); } } + LOG(DEBUG) << "Received FLPSyncSampler Input Address from DDS."; - epn.fChannels["data-out"].at(options.numFLPs + 1).UpdateAddress(values.begin()->second); + // Update device properties with the received address. + epn.fChannels["ack-out"].at(0).UpdateAddress(values.begin()->second); } + // Wait for the device initialization to finish. epn.WaitForEndOfState("INIT_DEVICE"); epn.ChangeState("INIT_TASK"); @@ -298,8 +304,6 @@ int main(int argc, char** argv) epn.ChangeState("RUN"); epn.WaitForEndOfState("RUN"); - epn.ChangeState("STOP"); - epn.ChangeState("RESET_TASK"); epn.WaitForEndOfState("RESET_TASK"); diff --git a/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx b/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx index 9c898896d30cc..cd0cbc473835b 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runFLPSender.cxx @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -26,49 +25,35 @@ using namespace std; using namespace AliceO2::Devices; -FLPSender flp; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - flp.ChangeState(FLPSender::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int flpIndex; int eventSize; int ioThreads; - int numInputs; - int numOutputs; + int numEPNs; int heartbeatTimeoutInMs; int testMode; int sendOffset; - vector inputSocketType; - vector inputBufSize; - vector inputMethod; - // vector inputAddress; - vector inputRateLogging; - string outputSocketType; - int outputBufSize; - string outputMethod; - // vector outputAddress; - int outputRateLogging; + int sendDelay; + + string dataInSocketType; + int dataInBufSize; + string dataInMethod; + // string dataInAddress; + int dataInRateLogging; + + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + // vector dataOutAddress; + int dataOutRateLogging; + + string hbInSocketType; + int hbInBufSize; + string hbInMethod; + // string hbInAddress; + int hbInRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) @@ -81,23 +66,32 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) desc.add_options() ("id", bpo::value()->required(), "Device ID") ("flp-index", bpo::value()->default_value(0), "FLP Index (for debugging in test mode)") - ("event-size", bpo::value()->default_value(1000), "Event size in bytes") + ("event-size", bpo::value()->default_value(1000), "Event size in bytes (test mode)") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("num-inputs", bpo::value()->required(), "Number of FLP input sockets") - ("num-outputs", bpo::value()->required(), "Number of FLP output sockets") + ("num-epns", bpo::value()->required(), "Number of EPNs") ("heartbeat-timeout", bpo::value()->default_value(20000), "Heartbeat timeout in milliseconds") ("test-mode", bpo::value()->default_value(0),"Run in test mode") ("send-offset", bpo::value()->default_value(0), "Offset for staggered sending") - ("input-socket-type", bpo::value>()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value>()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value>()->required(), "Input method: bind/connect") - // ("input-address", bpo::value>()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value>()->required(), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value()->required(), "Output method: bind/connect") - // ("output-address", bpo::value>()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value()->required(), "Log output rate on socket, 1/0") + ("send-delay", bpo::value()->default_value(0), "Delay for staggered sending") + + ("data-in-socket-type", bpo::value()->default_value("pull"), "Data input socket type: sub/pull") + ("data-in-buff-size", bpo::value()->default_value(10), "Data input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-in-method", bpo::value()->default_value("bind"), "Data input method: bind/connect") + // ("data-in-address", bpo::value()->required(), "Data input address, e.g.: \"tcp://localhost:5555\"") + ("data-in-rate-logging", bpo::value()->default_value(1), "Log data input rate on socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("push"), "Output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(10), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("connect"), "Output method: bind/connect") + // ("data-out-address", bpo::value>()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(1), "Log output rate on socket, 1/0") + + ("hb-in-socket-type", bpo::value()->default_value("sub"), "Heartbeat in socket type: sub/pull") + ("hb-in-buff-size", bpo::value()->default_value(100), "Heartbeat in buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("hb-in-method", bpo::value()->default_value("bind"), "Heartbeat in method: bind/connect") + // ("hb-in-address", bpo::value()->required(), "Heartbeat in address, e.g.: \"tcp://localhost:5555\"") + ("hb-in-rate-logging", bpo::value()->default_value(0), "Log heartbeat in rate on socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -110,34 +104,41 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::notify(vm); - if (vm.count("id")) { _options->id = vm["id"].as(); } - if (vm.count("flp-index")) { _options->flpIndex = vm["flp-index"].as(); } - if (vm.count("event-size")) { _options->eventSize = vm["event-size"].as(); } - if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("num-inputs")) { _options->numInputs = vm["num-inputs"].as(); } - if (vm.count("num-outputs")) { _options->numOutputs = vm["num-outputs"].as(); } - if (vm.count("heartbeat-timeout")) { _options->heartbeatTimeoutInMs = vm["heartbeat-timeout"].as(); } - if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } - if (vm.count("send-offset")) { _options->sendOffset = vm["send-offset"].as(); } - - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as>(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as>(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as>(); } - // if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as>(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as>(); } - - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as(); } - // if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as>(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as(); } + if (vm.count("id")) { _options->id = vm["id"].as(); } + if (vm.count("flp-index")) { _options->flpIndex = vm["flp-index"].as(); } + if (vm.count("event-size")) { _options->eventSize = vm["event-size"].as(); } + if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } + if (vm.count("num-epns")) { _options->numEPNs = vm["num-epns"].as(); } + if (vm.count("heartbeat-timeout")) { _options->heartbeatTimeoutInMs = vm["heartbeat-timeout"].as(); } + if (vm.count("test-mode")) { _options->testMode = vm["test-mode"].as(); } + if (vm.count("send-offset")) { _options->sendOffset = vm["send-offset"].as(); } + if (vm.count("send-delay")) { _options->sendDelay = vm["send-delay"].as(); } + + if (vm.count("data-in-socket-type")) { _options->dataInSocketType = vm["data-in-socket-type"].as(); } + if (vm.count("data-in-buff-size")) { _options->dataInBufSize = vm["data-in-buff-size"].as(); } + if (vm.count("data-in-method")) { _options->dataInMethod = vm["data-in-method"].as(); } + // if (vm.count("data-in-address")) { _options->dataInAddress = vm["data-in-address"].as(); } + if (vm.count("data-in-rate-logging")) { _options->dataInRateLogging = vm["data-in-rate-logging"].as(); } + + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + // if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as>(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } + + if (vm.count("hb-in-socket-type")) { _options->hbInSocketType = vm["hb-in-socket-type"].as(); } + if (vm.count("hb-in-buff-size")) { _options->hbInBufSize = vm["hb-in-buff-size"].as(); } + if (vm.count("hb-in-method")) { _options->hbInMethod = vm["hb-in-method"].as(); } + // if (vm.count("hb-in-address")) { _options->hbInAddress = vm["hb-in-address"].as(); } + if (vm.count("hb-in-rate-logging")) { _options->hbInRateLogging = vm["hb-in-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + FLPSender flp; + flp.CatchSignals(); DeviceOptions_t options; try { @@ -148,18 +149,32 @@ int main(int argc, char** argv) return 1; } + if (options.numEPNs <= 0) { + LOG(ERROR) << "Configured with 0 EPNs, exiting. Use --num-epns program option."; + exit(EXIT_FAILURE); + } + + LOG(INFO) << "FLP Sender, ID: " << options.id << " (PID: " << getpid() << ")"; + map IPs; FairMQ::tools::getHostIPs(IPs); stringstream ss; if (IPs.count("ib0")) { - ss << "tcp://" << IPs["ib0"] << ":5655"; + ss << "tcp://" << IPs["ib0"]; + } else if (IPs.count("eth0")) { + ss << "tcp://" << IPs["eth0"]; } else { - ss << "tcp://" << IPs["eth0"] << ":5655"; + LOG(ERROR) << "Could not find ib0 or eth0 interface"; + exit(EXIT_FAILURE); } - string initialInputAddress = ss.str(); + LOG(INFO) << "Running on " << ss.str(); + + ss << ":5655"; + + string ownAddress = ss.str(); // DDS // Waiting for properties @@ -180,14 +195,11 @@ int main(int argc, char** argv) } } - LOG(INFO) << "FLP Sender"; - LOG(INFO) << "PID: " << getpid(); - FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); flp.SetTransport(transportFactory); - // configure device + // Configure device. flp.SetProperty(FLPSender::Id, options.id); flp.SetProperty(FLPSender::Index, options.flpIndex); flp.SetProperty(FLPSender::NumIoThreads, options.ioThreads); @@ -196,34 +208,35 @@ int main(int argc, char** argv) flp.SetProperty(FLPSender::TestMode, options.testMode); flp.SetProperty(FLPSender::SendOffset, options.sendOffset); - // configure inputs - for (int i = 0; i < options.inputSocketType.size(); ++i) { - FairMQChannel inputChannel; - inputChannel.UpdateType(options.inputSocketType.at(i)); - inputChannel.UpdateMethod(options.inputMethod.at(i)); - inputChannel.UpdateSndBufSize(options.inputBufSize.at(i)); - inputChannel.UpdateRcvBufSize(options.inputBufSize.at(i)); - inputChannel.UpdateRateLogging(options.inputRateLogging.at(i)); - flp.fChannels["data-in"].push_back(inputChannel); + // Configure data input channel (address is set later when received from DDS). + FairMQChannel dataInChannel(options.dataInSocketType, options.dataInMethod, ""); + dataInChannel.UpdateSndBufSize(options.dataInBufSize); + dataInChannel.UpdateRcvBufSize(options.dataInBufSize); + dataInChannel.UpdateRateLogging(options.dataInRateLogging); + flp.fChannels["data-in"].push_back(dataInChannel); + + // Configure data output channels (address is set later when received from DDS). + for (int i = 0; i < options.numEPNs; ++i) { + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, ""); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + flp.fChannels["data-out"].push_back(dataOutChannel); } - flp.fChannels["data-in"].at(0).UpdateAddress(initialInputAddress); // commands - flp.fChannels["data-in"].at(1).UpdateAddress(initialInputAddress); // heartbeats + // configure heartbeat input channel + FairMQChannel hbInChannel(options.hbInSocketType, options.hbInMethod, ownAddress); + hbInChannel.UpdateSndBufSize(options.hbInBufSize); + hbInChannel.UpdateRcvBufSize(options.hbInBufSize); + hbInChannel.UpdateRateLogging(options.hbInRateLogging); + flp.fChannels["heartbeat-in"].push_back(hbInChannel); + if (options.testMode == 1) { // In test mode, assign address that was received from the FLPSyncSampler via DDS. - flp.fChannels["data-in"].at(2).UpdateAddress(values.begin()->second); // FLPSyncSampler signal + flp.fChannels["data-in"].at(0).UpdateAddress(values.begin()->second); // FLPSyncSampler signal } else { // In regular mode, assign placeholder address, that will be set when binding. - flp.fChannels["data-in"].at(2).UpdateAddress(initialInputAddress); // data - } - - // configure outputs - for (int i = 0; i < options.numOutputs; ++i) { - FairMQChannel outputChannel(options.outputSocketType, options.outputMethod, ""); - outputChannel.UpdateSndBufSize(options.outputBufSize); - outputChannel.UpdateRcvBufSize(options.outputBufSize); - outputChannel.UpdateRateLogging(options.outputRateLogging); - flp.fChannels["data-out"].push_back(outputChannel); + flp.fChannels["data-in"].at(0).UpdateAddress(ownAddress); // data } flp.ChangeState("INIT_DEVICE"); @@ -231,12 +244,12 @@ int main(int argc, char** argv) if (options.testMode == 0) { // In regular mode, advertise the bound data input address to the DDS. - ddsKeyValue.putValue("FLPSenderInputAddress", flp.fChannels["data-in"].at(2).GetAddress()); + ddsKeyValue.putValue("FLPSenderInputAddress", flp.fChannels["data-in"].at(0).GetAddress()); } - ddsKeyValue.putValue("FLPSenderHeartbeatInputAddress", flp.fChannels["data-in"].at(1).GetAddress()); + ddsKeyValue.putValue("FLPSenderHeartbeatInputAddress", flp.fChannels["heartbeat-in"].at(0).GetAddress()); - dds::key_value::CKeyValue::valuesMap_t values2; + dds::key_value::CKeyValue::valuesMap_t epn_addr_values; // Receive the EPNReceiver input addresses from DDS. { @@ -244,19 +257,19 @@ int main(int argc, char** argv) condition_variable keyCondition; ddsKeyValue.subscribe([&keyCondition](const string& /*_key*/, const string& /*_value*/) {keyCondition.notify_all();}); - ddsKeyValue.getValues("EPNReceiverInputAddress", &values2); - while (values2.size() != options.numOutputs) { + ddsKeyValue.getValues("EPNReceiverInputAddress", &epn_addr_values); + while (epn_addr_values.size() != options.numEPNs) { unique_lock lock(keyMutex); keyCondition.wait_until(lock, chrono::system_clock::now() + chrono::milliseconds(1000)); - ddsKeyValue.getValues("EPNReceiverInputAddress", &values2); + ddsKeyValue.getValues("EPNReceiverInputAddress", &epn_addr_values); } } // Assign the received EPNReceiver input addresses to the device. - dds::key_value::CKeyValue::valuesMap_t::const_iterator it_values2 = values2.begin(); - for (int i = 0; i < options.numOutputs; ++i) { - flp.fChannels["data-out"].at(i).UpdateAddress(it_values2->second); - it_values2++; + auto it_epn_addr_values = epn_addr_values.begin(); + for (int i = 0; i < options.numEPNs; ++i) { + flp.fChannels["data-out"].at(i).UpdateAddress(it_epn_addr_values->second); + it_epn_addr_values++; } // TODO: sort the data channels @@ -269,8 +282,6 @@ int main(int argc, char** argv) flp.ChangeState("RUN"); flp.WaitForEndOfState("RUN"); - flp.ChangeState("STOP"); - flp.ChangeState("RESET_TASK"); flp.WaitForEndOfState("RESET_TASK"); diff --git a/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx b/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx index b7f61c634c654..5fb989a940201 100644 --- a/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/runO2Prototype/runFLPSyncSampler.cxx @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -26,45 +25,23 @@ using namespace std; using namespace AliceO2::Devices; -FLPSyncSampler sampler; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - sampler.ChangeState(FLPSyncSampler::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; int eventRate; int ioThreads; - string inputSocketType; - int inputBufSize; - string inputMethod; - // string inputAddress; - int inputRateLogging; - - string outputSocketType; - int outputBufSize; - string outputMethod; - // string outputAddress; - int outputRateLogging; + string dataOutSocketType; + int dataOutBufSize; + string dataOutMethod; + // string dataOutAddress; + int dataOutRateLogging; + + string ackInSocketType; + int ackInBufSize; + string ackInMethod; + // string ackInAddress; + int ackInRateLogging; } DeviceOptions_t; inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) @@ -76,18 +53,21 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::options_description desc("Options"); desc.add_options() ("id", bpo::value()->required(), "Device ID") - ("event-rate", bpo::value()->default_value(0), "Event rate limit in maximum number of events per second") + ("event-rate", bpo::value()->default_value(100), "Event rate limit in maximum number of events per second") ("io-threads", bpo::value()->default_value(1), "Number of I/O threads") - ("input-socket-type", bpo::value()->required(), "Input socket type: sub/pull") - ("input-buff-size", bpo::value()->required(), "Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("input-method", bpo::value()->required(), "Input method: bind/connect") - // ("input-address", bpo::value()->required(), "Input address, e.g.: \"tcp://localhost:5555\"") - ("input-rate-logging", bpo::value()->default_value(1), "Log input rate on socket, 1/0") - ("output-socket-type", bpo::value()->required(), "Output socket type: pub/push") - ("output-buff-size", bpo::value()->required(), "Output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") - ("output-method", bpo::value()->required(), "Output method: bind/connect") - // ("output-address", bpo::value()->required(), "Output address, e.g.: \"tcp://localhost:5555\"") - ("output-rate-logging", bpo::value()->default_value(1), "Log output rate on socket, 1/0") + + ("data-out-socket-type", bpo::value()->default_value("pub"), "Data output socket type: pub/push") + ("data-out-buff-size", bpo::value()->default_value(100), "Data output buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("data-out-method", bpo::value()->default_value("bind"), "Data output method: bind/connect") + // ("data-out-address", bpo::value()->required(), "Data output address, e.g.: \"tcp://localhost:5555\"") + ("data-out-rate-logging", bpo::value()->default_value(0), "Log output rate on data socket, 1/0") + + ("ack-in-socket-type", bpo::value()->default_value("pull"), "Acknowledgement Input socket type: sub/pull") + ("ack-in-buff-size", bpo::value()->default_value(100), "Acknowledgement Input buffer size in number of messages (ZeroMQ)/bytes(nanomsg)") + ("ack-in-method", bpo::value()->default_value("bind"), "Acknowledgement Input method: bind/connect") + // ("ack-in-address", bpo::value()->required(), "Acknowledgement Input address, e.g.: \"tcp://localhost:5555\"") + ("ack-in-rate-logging", bpo::value()->default_value(0), "Log input rate on Acknowledgement socket, 1/0") + ("help", "Print help messages"); bpo::variables_map vm; @@ -100,28 +80,29 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) bpo::notify(vm); - if (vm.count("id")) { _options->id = vm["id"].as(); } - if (vm.count("event-rate")) { _options->eventRate = vm["event-rate"].as(); } - if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } + if (vm.count("id")) { _options->id = vm["id"].as(); } + if (vm.count("event-rate")) { _options->eventRate = vm["event-rate"].as(); } + if (vm.count("io-threads")) { _options->ioThreads = vm["io-threads"].as(); } - if (vm.count("input-socket-type")) { _options->inputSocketType = vm["input-socket-type"].as(); } - if (vm.count("input-buff-size")) { _options->inputBufSize = vm["input-buff-size"].as(); } - if (vm.count("input-method")) { _options->inputMethod = vm["input-method"].as(); } - // if (vm.count("input-address")) { _options->inputAddress = vm["input-address"].as(); } - if (vm.count("input-rate-logging")) { _options->inputRateLogging = vm["input-rate-logging"].as(); } + if (vm.count("data-out-socket-type")) { _options->dataOutSocketType = vm["data-out-socket-type"].as(); } + if (vm.count("data-out-buff-size")) { _options->dataOutBufSize = vm["data-out-buff-size"].as(); } + if (vm.count("data-out-method")) { _options->dataOutMethod = vm["data-out-method"].as(); } + // if (vm.count("data-out-address")) { _options->dataOutAddress = vm["data-out-address"].as(); } + if (vm.count("data-out-rate-logging")) { _options->dataOutRateLogging = vm["data-out-rate-logging"].as(); } - if (vm.count("output-socket-type")) { _options->outputSocketType = vm["output-socket-type"].as(); } - if (vm.count("output-buff-size")) { _options->outputBufSize = vm["output-buff-size"].as(); } - if (vm.count("output-method")) { _options->outputMethod = vm["output-method"].as(); } - // if (vm.count("output-address")) { _options->outputAddress = vm["output-address"].as(); } - if (vm.count("output-rate-logging")) { _options->outputRateLogging = vm["output-rate-logging"].as(); } + if (vm.count("ack-in-socket-type")) { _options->ackInSocketType = vm["ack-in-socket-type"].as(); } + if (vm.count("ack-in-buff-size")) { _options->ackInBufSize = vm["ack-in-buff-size"].as(); } + if (vm.count("ack-in-method")) { _options->ackInMethod = vm["ack-in-method"].as(); } + // if (vm.count("ack-in-address")) { _options->ackInAddress = vm["ack-in-address"].as(); } + if (vm.count("ack-in-rate-logging")) { _options->ackInRateLogging = vm["ack-in-rate-logging"].as(); } return true; } int main(int argc, char** argv) { - s_catch_signals(); + FLPSyncSampler sampler; + sampler.CatchSignals(); DeviceOptions_t options; try { @@ -132,22 +113,27 @@ int main(int argc, char** argv) return 1; } + LOG(INFO) << "FLP Sync Sampler, ID: " << options.id << " (PID: " << getpid() << ")"; + map IPs; FairMQ::tools::getHostIPs(IPs); stringstream ss; if (IPs.count("ib0")) { - ss << "tcp://" << IPs["ib0"] << ":5655"; + ss << "tcp://" << IPs["ib0"]; + } else if (IPs.count("eth0")) { + ss << "tcp://" << IPs["eth0"]; } else { - ss << "tcp://" << IPs["eth0"] << ":5655"; + LOG(ERROR) << "Could not find ib0 or eth0 interface"; + exit(EXIT_FAILURE); } - string initialInputAddress = ss.str(); - string initialOutputAddress = ss.str(); + LOG(INFO) << "Running on " << ss.str(); + + ss << ":5655"; - LOG(INFO) << "FLP Sync Sampler"; - LOG(INFO) << "PID: " << getpid(); + string ownAddress = ss.str(); FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); @@ -157,17 +143,17 @@ int main(int argc, char** argv) sampler.SetProperty(FLPSyncSampler::NumIoThreads, options.ioThreads); sampler.SetProperty(FLPSyncSampler::EventRate, options.eventRate); - FairMQChannel inputChannel(options.inputSocketType, options.inputMethod, initialInputAddress); - inputChannel.UpdateSndBufSize(options.inputBufSize); - inputChannel.UpdateRcvBufSize(options.inputBufSize); - inputChannel.UpdateRateLogging(options.inputRateLogging); - sampler.fChannels["data-in"].push_back(inputChannel); + FairMQChannel dataOutChannel(options.dataOutSocketType, options.dataOutMethod, ownAddress); + dataOutChannel.UpdateSndBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRcvBufSize(options.dataOutBufSize); + dataOutChannel.UpdateRateLogging(options.dataOutRateLogging); + sampler.fChannels["data-out"].push_back(dataOutChannel); - FairMQChannel outputChannel(options.outputSocketType, options.outputMethod, initialOutputAddress); - outputChannel.UpdateSndBufSize(options.outputBufSize); - outputChannel.UpdateRcvBufSize(options.outputBufSize); - outputChannel.UpdateRateLogging(options.outputRateLogging); - sampler.fChannels["data-out"].push_back(outputChannel); + FairMQChannel ackInChannel(options.ackInSocketType, options.ackInMethod, ownAddress); + ackInChannel.UpdateSndBufSize(options.ackInBufSize); + ackInChannel.UpdateRcvBufSize(options.ackInBufSize); + ackInChannel.UpdateRateLogging(options.ackInRateLogging); + sampler.fChannels["ack-in"].push_back(ackInChannel); sampler.ChangeState("INIT_DEVICE"); sampler.WaitForInitialValidation(); @@ -175,7 +161,7 @@ int main(int argc, char** argv) // Advertise the bound addresses via DDS properties dds::key_value::CKeyValue ddsKeyValue; ddsKeyValue.putValue("FLPSyncSamplerOutputAddress", sampler.fChannels["data-out"].at(0).GetAddress()); - ddsKeyValue.putValue("FLPSyncSamplerInputAddress", sampler.fChannels["data-in"].at(0).GetAddress()); + ddsKeyValue.putValue("FLPSyncSamplerInputAddress", sampler.fChannels["ack-in"].at(0).GetAddress()); sampler.WaitForEndOfState("INIT_DEVICE"); @@ -185,8 +171,6 @@ int main(int argc, char** argv) sampler.ChangeState("RUN"); sampler.WaitForEndOfState("RUN"); - sampler.ChangeState("STOP"); - sampler.ChangeState("RESET_TASK"); sampler.WaitForEndOfState("RESET_TASK"); diff --git a/devices/flp2epn-dynamic/O2EPNex.cxx b/devices/flp2epn-dynamic/O2EPNex.cxx index 55275b6449f60..b832141f98b84 100644 --- a/devices/flp2epn-dynamic/O2EPNex.cxx +++ b/devices/flp2epn-dynamic/O2EPNex.cxx @@ -31,7 +31,7 @@ void O2EPNex::Run() string ownAddress = fChannels["data-in"].at(0).GetAddress(); int ownAddressLength = strlen(ownAddress.c_str()); - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { if (timeDif >= fHeartbeatIntervalInMs) { referenceTime = boost::posix_time::microsec_clock::local_time(); diff --git a/devices/flp2epn-dynamic/O2FLPex.cxx b/devices/flp2epn-dynamic/O2FLPex.cxx index 1c18dc212e5fc..64c306483add2 100644 --- a/devices/flp2epn-dynamic/O2FLPex.cxx +++ b/devices/flp2epn-dynamic/O2FLPex.cxx @@ -90,7 +90,7 @@ void O2FLPex::Run() delete[] payload; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { // Receive heartbeat FairMQMessage* heartbeatMsg = fTransportFactory->CreateMessage(); diff --git a/devices/flp2epn-dynamic/run/runEPN_dynamic.cxx b/devices/flp2epn-dynamic/run/runEPN_dynamic.cxx index 5651b4071b41a..aba93315bd169 100644 --- a/devices/flp2epn-dynamic/run/runEPN_dynamic.cxx +++ b/devices/flp2epn-dynamic/run/runEPN_dynamic.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2EPNex epn; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - epn.ChangeState(O2EPNex::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -133,7 +110,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2EPNex epn; + epn.CatchSignals(); DeviceOptions_t options; try @@ -186,17 +164,7 @@ int main(int argc, char** argv) epn.WaitForEndOfState("INIT_TASK"); epn.ChangeState("RUN"); - epn.WaitForEndOfState("RUN"); - - epn.ChangeState("STOP"); - - epn.ChangeState("RESET_TASK"); - epn.WaitForEndOfState("RESET_TASK"); - - epn.ChangeState("RESET_DEVICE"); - epn.WaitForEndOfState("RESET_DEVICE"); - - epn.ChangeState("END"); + epn.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn-dynamic/run/runFLP_dynamic.cxx b/devices/flp2epn-dynamic/run/runFLP_dynamic.cxx index 9ac5a19354c62..448302552dc35 100644 --- a/devices/flp2epn-dynamic/run/runFLP_dynamic.cxx +++ b/devices/flp2epn-dynamic/run/runFLP_dynamic.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2FLPex flp; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - flp.ChangeState(O2FLPex::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -138,7 +115,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2FLPex flp; + flp.CatchSignals(); DeviceOptions_t options; try @@ -192,17 +170,7 @@ int main(int argc, char** argv) flp.WaitForEndOfState("INIT_TASK"); flp.ChangeState("RUN"); - flp.WaitForEndOfState("RUN"); - - flp.ChangeState("STOP"); - - flp.ChangeState("RESET_TASK"); - flp.WaitForEndOfState("RESET_TASK"); - - flp.ChangeState("RESET_DEVICE"); - flp.WaitForEndOfState("RESET_DEVICE"); - - flp.ChangeState("END"); + flp.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn/O2EPNex.cxx b/devices/flp2epn/O2EPNex.cxx index ea373e512bebd..3e0520b25ee47 100644 --- a/devices/flp2epn/O2EPNex.cxx +++ b/devices/flp2epn/O2EPNex.cxx @@ -16,7 +16,7 @@ O2EPNex::O2EPNex() void O2EPNex::Run() { - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { FairMQMessage* msg = fTransportFactory->CreateMessage(); fChannels["data-in"].at(0).Receive(msg); diff --git a/devices/flp2epn/O2EpnMerger.cxx b/devices/flp2epn/O2EpnMerger.cxx index 5dce301a4efef..4960b1b3aa5fb 100644 --- a/devices/flp2epn/O2EpnMerger.cxx +++ b/devices/flp2epn/O2EpnMerger.cxx @@ -22,7 +22,7 @@ void O2EpnMerger::Run() bool received = false; int NoOfMsgParts = fChannels["data-in"].size() - 1; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { FairMQMessage* msg = fTransportFactory->CreateMessage(); poller->Poll(100); @@ -49,23 +49,21 @@ void O2EpnMerger::Run() //-------------------- - // editor comment: i think following block shouldn't be here, but i'll just leave it here... + // while (CheckCurrentState(RUNNING)) { + // FairMQMessage* msg = fTransportFactory->CreateMessage(); - while (GetCurrentState() == RUNNING) { - FairMQMessage* msg = fTransportFactory->CreateMessage(); - - fChannels["data-in"].at(0).Receive(msg); + // fChannels["data-in"].at(0).Receive(msg); - int inputSize = msg->GetSize(); - int numInput = inputSize / sizeof(Content); - Content* input = reinterpret_cast(msg->GetData()); + // int inputSize = msg->GetSize(); + // int numInput = inputSize / sizeof(Content); + // Content* input = reinterpret_cast(msg->GetData()); - // for (int i = 0; i < numInput; ++i) { - // LOG(INFO) << (&input[i])->x << " " << (&input[i])->y << " " << (&input[i])->z << " " << (&input[i])->a << " " << (&input[i])->b; - // } + // // for (int i = 0; i < numInput; ++i) { + // // LOG(INFO) << (&input[i])->x << " " << (&input[i])->y << " " << (&input[i])->z << " " << (&input[i])->a << " " << (&input[i])->b; + // // } - delete msg; - } + // delete msg; + // } } O2EpnMerger::~O2EpnMerger() diff --git a/devices/flp2epn/O2FLPex.cxx b/devices/flp2epn/O2FLPex.cxx index 48990e6ed7619..59a2239d27bcf 100644 --- a/devices/flp2epn/O2FLPex.cxx +++ b/devices/flp2epn/O2FLPex.cxx @@ -37,7 +37,7 @@ void O2FLPex::Run() LOG(DEBUG) << "Message size: " << fEventSize * sizeof(Content) << " bytes."; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { Content* payload = new Content[fEventSize]; for (int i = 0; i < fEventSize; ++i) { diff --git a/devices/flp2epn/O2Merger.cxx b/devices/flp2epn/O2Merger.cxx index 228a449cd63de..b116dc0693438 100644 --- a/devices/flp2epn/O2Merger.cxx +++ b/devices/flp2epn/O2Merger.cxx @@ -25,7 +25,7 @@ void O2Merger::Run() int NoOfMsgParts = fChannels["data-in"].size() - 1; - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { FairMQMessage* msg = fTransportFactory->CreateMessage(); poller->Poll(100); diff --git a/devices/flp2epn/O2Proxy.cxx b/devices/flp2epn/O2Proxy.cxx index 349917158bf0c..4db1a009e389f 100644 --- a/devices/flp2epn/O2Proxy.cxx +++ b/devices/flp2epn/O2Proxy.cxx @@ -23,7 +23,7 @@ O2Proxy::~O2Proxy() void O2Proxy::Run() { - while (GetCurrentState() == RUNNING) { + while (CheckCurrentState(RUNNING)) { // int i = 0; int64_t more = 0; size_t more_size = sizeof more; diff --git a/devices/flp2epn/run/runEPN.cxx b/devices/flp2epn/run/runEPN.cxx index 21e44f6a528de..a5011ef0b8f35 100644 --- a/devices/flp2epn/run/runEPN.cxx +++ b/devices/flp2epn/run/runEPN.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2EPNex epn; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - epn.ChangeState(O2EPNex::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -103,7 +80,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2EPNex epn; + epn.CatchSignals(); DeviceOptions_t options; try @@ -143,17 +121,7 @@ int main(int argc, char** argv) epn.WaitForEndOfState("INIT_TASK"); epn.ChangeState("RUN"); - epn.WaitForEndOfState("RUN"); - - epn.ChangeState("STOP"); - - epn.ChangeState("RESET_TASK"); - epn.WaitForEndOfState("RESET_TASK"); - - epn.ChangeState("RESET_DEVICE"); - epn.WaitForEndOfState("RESET_DEVICE"); - - epn.ChangeState("END"); + epn.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn/run/runEPN_M.cxx b/devices/flp2epn/run/runEPN_M.cxx index db38a7621a40c..719b892b4b1cd 100644 --- a/devices/flp2epn/run/runEPN_M.cxx +++ b/devices/flp2epn/run/runEPN_M.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2EpnMerger epn; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - epn.ChangeState(O2EpnMerger::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -103,7 +80,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2EpnMerger epn; + epn.CatchSignals(); DeviceOptions_t options; try @@ -143,17 +121,7 @@ int main(int argc, char** argv) epn.WaitForEndOfState("INIT_TASK"); epn.ChangeState("RUN"); - epn.WaitForEndOfState("RUN"); - - epn.ChangeState("STOP"); - - epn.ChangeState("RESET_TASK"); - epn.WaitForEndOfState("RESET_TASK"); - - epn.ChangeState("RESET_DEVICE"); - epn.WaitForEndOfState("RESET_DEVICE"); - - epn.ChangeState("END"); + epn.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn/run/runFLP.cxx b/devices/flp2epn/run/runFLP.cxx index 75a99e8e6ef57..0499d68256f79 100644 --- a/devices/flp2epn/run/runFLP.cxx +++ b/devices/flp2epn/run/runFLP.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2FLPex flp; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - flp.ChangeState(O2FLPex::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -108,7 +85,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2FLPex flp; + flp.CatchSignals(); DeviceOptions_t options; try @@ -149,17 +127,7 @@ int main(int argc, char** argv) flp.WaitForEndOfState("INIT_TASK"); flp.ChangeState("RUN"); - flp.WaitForEndOfState("RUN"); - - flp.ChangeState("STOP"); - - flp.ChangeState("RESET_TASK"); - flp.WaitForEndOfState("RESET_TASK"); - - flp.ChangeState("RESET_DEVICE"); - flp.WaitForEndOfState("RESET_DEVICE"); - - flp.ChangeState("END"); + flp.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn/run/runMerger.cxx b/devices/flp2epn/run/runMerger.cxx index 2a8e11084dab3..73c1bddef1ce1 100644 --- a/devices/flp2epn/run/runMerger.cxx +++ b/devices/flp2epn/run/runMerger.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2Merger merger; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - merger.ChangeState(O2Merger::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -128,7 +105,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2Merger merger; + merger.CatchSignals(); DeviceOptions_t options; try @@ -179,17 +157,7 @@ int main(int argc, char** argv) merger.WaitForEndOfState("INIT_TASK"); merger.ChangeState("RUN"); - merger.WaitForEndOfState("RUN"); - - merger.ChangeState("STOP"); - - merger.ChangeState("RESET_TASK"); - merger.WaitForEndOfState("RESET_TASK"); - - merger.ChangeState("RESET_DEVICE"); - merger.WaitForEndOfState("RESET_DEVICE"); - - merger.ChangeState("END"); + merger.InteractiveStateLoop(); return 0; } diff --git a/devices/flp2epn/run/runProxy.cxx b/devices/flp2epn/run/runProxy.cxx index e1f6d263412dc..0aa65ef99a182 100644 --- a/devices/flp2epn/run/runProxy.cxx +++ b/devices/flp2epn/run/runProxy.cxx @@ -6,7 +6,6 @@ */ #include -#include #include "boost/program_options.hpp" @@ -21,28 +20,6 @@ using namespace std; -O2Proxy proxy; - -static void s_signal_handler (int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - proxy.ChangeState(O2Proxy::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals (void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - typedef struct DeviceOptions { string id; @@ -123,7 +100,8 @@ inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) int main(int argc, char** argv) { - s_catch_signals(); + O2Proxy proxy; + proxy.CatchSignals(); DeviceOptions_t options; try @@ -171,17 +149,7 @@ int main(int argc, char** argv) proxy.WaitForEndOfState("INIT_TASK"); proxy.ChangeState("RUN"); - proxy.WaitForEndOfState("RUN"); - - proxy.ChangeState("STOP"); - - proxy.ChangeState("RESET_TASK"); - proxy.WaitForEndOfState("RESET_TASK"); - - proxy.ChangeState("RESET_DEVICE"); - proxy.WaitForEndOfState("RESET_DEVICE"); - - proxy.ChangeState("END"); + proxy.InteractiveStateLoop(); return 0; } diff --git a/devices/roundtrip/CMakeLists.txt b/devices/roundtrip/CMakeLists.txt deleted file mode 100644 index 34bc16def7ab3..0000000000000 --- a/devices/roundtrip/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -set(INCLUDE_DIRECTORIES - ${CMAKE_SOURCE_DIR}/devices/roundtrip -) - -set(SYSTEM_INCLUDE_DIRECTORIES - ${BASE_INCLUDE_DIRECTORIES} - ${Boost_INCLUDE_DIR} - ${FAIRROOT_INCLUDE_DIR} - ${ZMQ_INCLUDE_DIR} - ${AlFa_DIR}/include -) - -include_directories(${INCLUDE_DIRECTORIES}) -include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES}) - -# configure_file( -# ${CMAKE_SOURCE_DIR}/devices/flp2epn-distributed/run/startFLP2EPN-distributed.sh.in ${CMAKE_BINARY_DIR}/bin/startFLP2EPN-distributed.sh -# ) - -set(LINK_DIRECTORIES - ${Boost_LIBRARY_DIRS} - ${FAIRROOT_LIBRARY_DIR} - ${AlFa_DIR}/lib -) - -link_directories(${LINK_DIRECTORIES}) - -set(SRCS - RoundtripClient.cxx - RoundtripServer.cxx -) - -if(FAIRMQ_DEPENDENCIES) - set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - ${FAIRMQ_DEPENDENCIES} - FairMQ - ) -else(FAIRMQ_DEPENDENCIES) - set(DEPENDENCIES - ${DEPENDENCIES} - ${CMAKE_THREAD_LIBS_INIT} - boost_date_time boost_thread boost_timer boost_system boost_program_options boost_chrono FairMQ - ) -endif(FAIRMQ_DEPENDENCIES) - -set(LIBRARY_NAME RoundtripTest) - -GENERATE_LIBRARY() - -Set(Exe_Names - ${Exe_Names} - rtclient - rtserver -) - -set(Exe_Source - runRoundtripClient.cxx - runRoundtripServer.cxx -) - -list(LENGTH Exe_Names _length) -math(EXPR _length ${_length}-1) - -ForEach(_file RANGE 0 ${_length}) - list(GET Exe_Names ${_file} _name) - list(GET Exe_Source ${_file} _src) - set(EXE_NAME ${_name}) - set(SRCS ${_src}) - set(DEPENDENCIES RoundtripTest) - GENERATE_EXECUTABLE() -EndForEach(_file RANGE 0 ${_length}) diff --git a/devices/roundtrip/RoundtripClient.cxx b/devices/roundtrip/RoundtripClient.cxx deleted file mode 100644 index 6a383f8bfeeb1..0000000000000 --- a/devices/roundtrip/RoundtripClient.cxx +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * RoundtripClient.cpp - * - * @since 2014-10-10 - * @author A. Rybalchenko - */ - -#include -#include "RoundtripClient.h" -#include "FairMQMessage.h" -#include "FairMQTransportFactory.h" -#include "boost/date_time/posix_time/posix_time_types.hpp" -#include "boost/date_time/posix_time/ptime.hpp" // for ptime - -using namespace std; -using boost::posix_time::ptime; - -RoundtripClient::RoundtripClient() - : fText() -{ -} - -void RoundtripClient::Run() -{ - ptime startTime; - ptime endTime; - - map averageTimes; - - int size = 0; - - while (size < 20000000) - { - size += 1000000; - void* buffer = operator new[](size); - FairMQMessage* msg = fTransportFactory->CreateMessage(buffer, size); - FairMQMessage* reply = fTransportFactory->CreateMessage(); - - startTime = boost::posix_time::microsec_clock::local_time(); - - fChannels["data"].at(0).Send(msg); - fChannels["data"].at(0).Receive(reply); - - endTime = boost::posix_time::microsec_clock::local_time(); - - averageTimes[size] = (endTime - startTime).total_microseconds(); - - delete msg; - delete reply; - } - - for (auto it = averageTimes.begin(); it != averageTimes.end(); ++it) - { - std::cout << it->first << ": " << it->second << " microseconds" << std::endl; - } -} - - -void RoundtripClient::SetProperty(const int key, const string& value) -{ - switch (key) - { - case Text: - fText = value; - break; - default: - FairMQDevice::SetProperty(key, value); - break; - } -} - -string RoundtripClient::GetProperty(const int key, const string& default_ /*= ""*/) -{ - switch (key) - { - case Text: - return fText; - break; - default: - return FairMQDevice::GetProperty(key, default_); - } -} - -void RoundtripClient::SetProperty(const int key, const int value) -{ - switch (key) - { - default: - FairMQDevice::SetProperty(key, value); - break; - } -} - -int RoundtripClient::GetProperty(const int key, const int default_ /*= 0*/) -{ - switch (key) - { - default: - return FairMQDevice::GetProperty(key, default_); - } -} diff --git a/devices/roundtrip/RoundtripClient.h b/devices/roundtrip/RoundtripClient.h deleted file mode 100644 index 63d0c29462817..0000000000000 --- a/devices/roundtrip/RoundtripClient.h +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * RoundtripClient.h - * - * @since 2014-10-10 - * @author A. Rybalchenko - */ - -#ifndef ROUNDTRIPCLIENT_H_ -#define ROUNDTRIPCLIENT_H_ - -#include - -#include "FairMQDevice.h" - -class RoundtripClient : public FairMQDevice -{ - public: - enum - { - Text = FairMQDevice::Last, - Last - }; - RoundtripClient(); - virtual ~RoundtripClient() {}; - - virtual void SetProperty(const int key, const std::string& value); - virtual std::string GetProperty(const int key, const std::string& default_ = ""); - virtual void SetProperty(const int key, const int value); - virtual int GetProperty(const int key, const int default_ = 0); - - protected: - std::string fText; - - virtual void Run(); -}; - -#endif /* ROUNDTRIPCLIENT_H_ */ diff --git a/devices/roundtrip/RoundtripServer.cxx b/devices/roundtrip/RoundtripServer.cxx deleted file mode 100644 index 79d5bb9d8d077..0000000000000 --- a/devices/roundtrip/RoundtripServer.cxx +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * RoundtripServer.cxx - * - * @since 2014-10-10 - * @author A. Rybalchenko - */ - -#include "RoundtripServer.h" -#include "FairMQLogger.h" - -using namespace std; - -void RoundtripServer::Run() -{ - while (GetCurrentState() == RUNNING) - { - FairMQMessage* request = fTransportFactory->CreateMessage(); - fChannels["data"].at(0).Receive(request); - delete request; - - void* buffer = operator new[](1); - FairMQMessage* reply = fTransportFactory->CreateMessage(buffer, 1); - fChannels["data"].at(0).Send(reply); - delete reply; - } -} diff --git a/devices/roundtrip/RoundtripServer.h b/devices/roundtrip/RoundtripServer.h deleted file mode 100644 index 1366eb60696fb..0000000000000 --- a/devices/roundtrip/RoundtripServer.h +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * RoundtripServer.h - * - * @since 2014-10-10 - * @author A. Rybalchenko - */ - -#ifndef ROUNDTRIPSERVER_H_ -#define ROUNDTRIPSERVER_H_ - -#include "FairMQDevice.h" - -class RoundtripServer : public FairMQDevice -{ - public: - RoundtripServer() {}; - virtual ~RoundtripServer() {}; - - protected: - virtual void Run(); -}; - -#endif /* ROUNDTRIPSERVER_H_ */ diff --git a/devices/roundtrip/runRoundtripClient.cxx b/devices/roundtrip/runRoundtripClient.cxx deleted file mode 100644 index d7d5833ebdb37..0000000000000 --- a/devices/roundtrip/runRoundtripClient.cxx +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * runExampleClient.cxx - * - * @since 2013-04-23 - * @author D. Klein, A. Rybalchenko - */ - -#include -#include - -#include "boost/program_options.hpp" - -#include "FairMQLogger.h" -#include "RoundtripClient.h" - -#ifdef NANOMSG -#include "FairMQTransportFactoryNN.h" -#else -#include "FairMQTransportFactoryZMQ.h" -#endif - -using namespace std; - -RoundtripClient client; - -static void s_signal_handler(int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - client.ChangeState(RoundtripClient::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals(void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - -typedef struct DeviceOptions -{ - DeviceOptions() : - text() {} - - string text; -} DeviceOptions_t; - -inline bool parse_cmd_line(int _argc, char* _argv[], DeviceOptions* _options) -{ - if (_options == NULL) - throw runtime_error("Internal error: options' container is empty."); - - namespace bpo = boost::program_options; - bpo::options_description desc("Options"); - desc.add_options() - ("text,t", bpo::value()->default_value("something"), "Text to send to server") - ("help", "Print help messages"); - - bpo::variables_map vm; - bpo::store(bpo::parse_command_line(_argc, _argv, desc), vm); - - if ( vm.count("help") ) - { - LOG(INFO) << "EPN" << endl << desc; - return false; - } - - bpo::notify(vm); - - if ( vm.count("text") ) - _options->text = vm["text"].as(); - - return true; -} - -int main(int argc, char** argv) -{ - s_catch_signals(); - - DeviceOptions_t options; - try - { - if (!parse_cmd_line(argc, argv, &options)) - return 0; - } - catch (exception& e) - { - LOG(ERROR) << e.what(); - return 1; - } - - LOG(INFO) << "PID: " << getpid(); - -#ifdef NANOMSG - FairMQTransportFactory* transportFactory = new FairMQTransportFactoryNN(); -#else - FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); -#endif - - client.SetTransport(transportFactory); - - client.SetProperty(RoundtripClient::Id, "client"); - client.SetProperty(RoundtripClient::NumIoThreads, 1); - client.SetProperty(RoundtripClient::Text, options.text); - - FairMQChannel channel("req", "connect", "tcp://localhost:5005"); - channel.UpdateSndBufSize(10000); - channel.UpdateRcvBufSize(10000); - channel.UpdateRateLogging(1); - client.fChannels["data"].push_back(channel); - - client.ChangeState("INIT_DEVICE"); - client.WaitForEndOfState("INIT_DEVICE"); - - client.ChangeState("INIT_TASK"); - client.WaitForEndOfState("INIT_TASK"); - - client.ChangeState("RUN"); - client.WaitForEndOfState("RUN"); - - client.ChangeState("STOP"); - - client.ChangeState("RESET_TASK"); - client.WaitForEndOfState("RESET_TASK"); - - client.ChangeState("RESET_DEVICE"); - client.WaitForEndOfState("RESET_DEVICE"); - - client.ChangeState("END"); - - return 0; -} diff --git a/devices/roundtrip/runRoundtripServer.cxx b/devices/roundtrip/runRoundtripServer.cxx deleted file mode 100644 index 922786e1b1973..0000000000000 --- a/devices/roundtrip/runRoundtripServer.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/******************************************************************************** - * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * - * * - * This software is distributed under the terms of the * - * GNU Lesser General Public Licence version 3 (LGPL) version 3, * - * copied verbatim in the file "LICENSE" * - ********************************************************************************/ -/** - * runExampleServer.cxx - * - * @since 2013-04-23 - * @author D. Klein, A. Rybalchenko - */ - -#include -#include - -#include "FairMQLogger.h" -#include "RoundtripServer.h" - -#ifdef NANOMSG -#include "FairMQTransportFactoryNN.h" -#else -#include "FairMQTransportFactoryZMQ.h" -#endif - -using namespace std; - -RoundtripServer server; - -static void s_signal_handler(int signal) -{ - cout << endl << "Caught signal " << signal << endl; - - server.ChangeState(RoundtripServer::END); - - cout << "Shutdown complete. Bye!" << endl; - exit(1); -} - -static void s_catch_signals(void) -{ - struct sigaction action; - action.sa_handler = s_signal_handler; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - sigaction(SIGINT, &action, NULL); - sigaction(SIGTERM, &action, NULL); -} - -int main(int argc, char** argv) -{ - s_catch_signals(); - - LOG(INFO) << "PID: " << getpid(); - -#ifdef NANOMSG - FairMQTransportFactory* transportFactory = new FairMQTransportFactoryNN(); -#else - FairMQTransportFactory* transportFactory = new FairMQTransportFactoryZMQ(); -#endif - - server.SetTransport(transportFactory); - - server.SetProperty(RoundtripServer::Id, "server"); - server.SetProperty(RoundtripServer::NumIoThreads, 1); - - FairMQChannel channel("rep", "bind", "tcp://*:5005"); - channel.UpdateSndBufSize(10000); - channel.UpdateRcvBufSize(10000); - channel.UpdateRateLogging(1); - server.fChannels["data"].push_back(channel); - - server.ChangeState("INIT_DEVICE"); - server.WaitForEndOfState("INIT_DEVICE"); - - server.ChangeState("INIT_TASK"); - server.WaitForEndOfState("INIT_TASK"); - - server.ChangeState("RUN"); - server.WaitForEndOfState("RUN"); - - server.ChangeState("STOP"); - - server.ChangeState("RESET_TASK"); - server.WaitForEndOfState("RESET_TASK"); - - server.ChangeState("RESET_DEVICE"); - server.WaitForEndOfState("RESET_DEVICE"); - - server.ChangeState("END"); - - return 0; -} diff --git a/topologies/o2prototype_topology.xml b/topologies/o2prototype_topology.xml index e9a30c5a1273e..eda471fedaeb2 100644 --- a/topologies/o2prototype_topology.xml +++ b/topologies/o2prototype_topology.xml @@ -59,7 +59,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio
- $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id flpSender_%collectionIndex%_%taskIndex% --event-size 593750 --num-inputs 3 --num-outputs 4 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --input-socket-type sub --input-buff-size 10 --input-method bind --input-rate-logging 0 --output-socket-type push --output-buff-size 10 --output-method connect --output-rate-logging 1 + $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id 0 --num-epns 1 FLPSenderInputAddress FLPSenderHeartbeatInputAddress @@ -68,7 +68,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN_%collectionIndex%_%taskIndex% --num-outputs 3 --num-flps 2 --input-socket-type pull --input-buff-size 10 --input-method bind --input-rate-logging 1 --output-socket-type pub --output-buff-size 10 --output-method connect --output-rate-logging 0 --nextstep-socket-type push --nextstep-buff-size 10 --nextstep-method bind --nextstep-rate-logging 1 + $ALICEO2_INSTALL_DIR/bin/epnReceiver_dds --id EPN0 --num-flps 1 FLPSenderHeartbeatInputAddress EPNReceiverInputAddress From 8478891deaca44ad12ac91d163828a4460330f25 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Mon, 28 Sep 2015 13:31:23 +0200 Subject: [PATCH 25/34] Use FindDDS CMake module from FairRoot --- CMakeLists.txt | 1 + devices/aliceHLTwrapper/CMakeLists.txt | 12 +++++------- devices/flp2epn-distributed/CMakeLists.txt | 22 +++++++--------------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e7b1bfe3d81c..34bf07fa0998b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,7 @@ endif(ALICEO2_MODULAR_BUILD) find_package(CERNLIB) find_package(HEPMC) find_package(IWYU) +find_package(DDS) if(NOT BOOST_ROOT) Set(Boost_NO_SYSTEM_PATHS TRUE) diff --git a/devices/aliceHLTwrapper/CMakeLists.txt b/devices/aliceHLTwrapper/CMakeLists.txt index 6e583e9ddfceb..9b9a297509b7d 100644 --- a/devices/aliceHLTwrapper/CMakeLists.txt +++ b/devices/aliceHLTwrapper/CMakeLists.txt @@ -10,14 +10,12 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${AlFa_DIR}/include ) -set(DDS_LOCATION $ENV{DDS_LOCATION}) - -if(DDS_LOCATION) +if(DDS_FOUND) add_definitions(-DENABLE_DDS) set(SYSTEM_INCLUDE_DIRECTORIES ${SYSTEM_INCLUDE_DIRECTORIES} - $ENV{DDS_LOCATION}/include + ${DDS_INCLUDE_DIR} ) endif() @@ -34,10 +32,10 @@ set(LINK_DIRECTORIES ${AlFa_DIR}/lib ) -if(DDS_LOCATION) +if(DDS_FOUND) set(LINK_DIRECTORIES ${LINK_DIRECTORIES} - $ENV{DDS_LOCATION}/lib + ${DDS_LIBRARY_DIR} ) endif() @@ -52,7 +50,7 @@ set(SRCS EventSampler.cxx ) -if(DDS_LOCATION) +if(DDS_FOUND) set(DEPENDENCIES ${DEPENDENCIES} dds-key-value-lib diff --git a/devices/flp2epn-distributed/CMakeLists.txt b/devices/flp2epn-distributed/CMakeLists.txt index cbaf0957dc700..06bd1cca49659 100644 --- a/devices/flp2epn-distributed/CMakeLists.txt +++ b/devices/flp2epn-distributed/CMakeLists.txt @@ -10,20 +10,12 @@ set(SYSTEM_INCLUDE_DIRECTORIES ${AlFa_DIR}/include ) -set(DDS_LOCATION $ENV{DDS_LOCATION}) - -if(DDS_LOCATION) - message(STATUS "DDS found at ${DDS_LOCATION}") -else() - message(STATUS "DDS not found") -endif() - -if(DDS_LOCATION) +if(DDS_FOUND) add_definitions(-DENABLE_DDS) set(SYSTEM_INCLUDE_DIRECTORIES ${SYSTEM_INCLUDE_DIRECTORIES} - $ENV{DDS_LOCATION}/include + ${DDS_INCLUDE_DIR} ) endif() @@ -40,10 +32,10 @@ set(LINK_DIRECTORIES ${AlFa_DIR}/lib ) -if(DDS_LOCATION) +if(DDS_FOUND) set(LINK_DIRECTORIES ${LINK_DIRECTORIES} - $ENV{DDS_LOCATION}/lib + ${DDS_LIBRARY_DIR} ) endif() @@ -70,7 +62,7 @@ else(FAIRMQ_DEPENDENCIES) ) endif(FAIRMQ_DEPENDENCIES) -if(DDS_LOCATION) +if(DDS_FOUND) set(DEPENDENCIES ${DEPENDENCIES} dds-key-value-lib @@ -88,7 +80,7 @@ Set(Exe_Names epnReceiver ) -if(DDS_LOCATION) +if(DDS_FOUND) set(Exe_Names ${Exe_Names} flpSyncSampler_dds @@ -103,7 +95,7 @@ set(Exe_Source run/runEPNReceiver.cxx ) -if(DDS_LOCATION) +if(DDS_FOUND) set(Exe_Source ${Exe_Source} runO2Prototype/runFLPSyncSampler.cxx From 296739e0fefc8e52bd0198cd105942196e94d323 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Thu, 8 Oct 2015 14:53:59 +0200 Subject: [PATCH 26/34] Add README for flp2epn-distributed --- README.md | 9 ++- devices/flp2epn-distributed/FrameBuilder.cxx | 54 ---------------- devices/flp2epn-distributed/FrameBuilder.h | 29 --------- devices/flp2epn-distributed/README.md | 64 +++++++++++++++++++ docs/images/flp2epn-distr-rtt.png | Bin 0 -> 30553 bytes topologies/o2prototype_topology.xml | 2 +- 6 files changed, 73 insertions(+), 85 deletions(-) delete mode 100644 devices/flp2epn-distributed/FrameBuilder.cxx delete mode 100644 devices/flp2epn-distributed/FrameBuilder.h create mode 100644 devices/flp2epn-distributed/README.md create mode 100644 docs/images/flp2epn-distr-rtt.png diff --git a/README.md b/README.md index a95a0376aca60..3ff18bc68aca7 100644 --- a/README.md +++ b/README.md @@ -49,4 +49,11 @@ Alice O2 project software. Simulation and reconstraction software for the ALICE If the flage -DBUILD_DOXYGEN=ON is set when calling cmake, the doxygen documentation will be generated when calling make. The generated html files can then be found in "build_o2/doxygen/doc/html" -Doxygen documantation is also available online [here](http://aliceo2group.github.io/AliceO2/) \ No newline at end of file +Doxygen documantation is also available online [here](http://aliceo2group.github.io/AliceO2/) + +### Compiling with custom DDS location + +To include custom DDS location in the compilation, provide DDS_PATH flag when calling cmake. For example: +```bash +cmake -DDDS_PATH="/home/username/DDS/0.11.27.g79f48d4/" .. +``` \ No newline at end of file diff --git a/devices/flp2epn-distributed/FrameBuilder.cxx b/devices/flp2epn-distributed/FrameBuilder.cxx deleted file mode 100644 index a85e234b52fa6..0000000000000 --- a/devices/flp2epn-distributed/FrameBuilder.cxx +++ /dev/null @@ -1,54 +0,0 @@ -/** - * FrameBuilder.cxx - * - * @since 2014-10-21 - * @author D. Klein, A. Rybalchenko, M. Al-Turany - */ - -#include -#include - -#include "FairMQLogger.h" -#include "FairMQPoller.h" - -#include "FrameBuilder.h" - -using namespace AliceO2::Devices; - -FrameBuilder::FrameBuilder() -{ -} - -void FrameBuilder::Run() -{ - FairMQPoller* poller = fTransportFactory->CreatePoller(fChannels.at("data-in")); - - fNumInputs = fChannels.at("data-in").size(); - int noOfMsgParts = fNumInputs - 1; - - while (CheckCurrentState(RUNNING)) { - FairMQMessage* msg = fTransportFactory->CreateMessage(); - - poller->Poll(100); - - for (int i = 0; i < fNumInputs; ++i) { - if (poller->CheckInput(i)) { - if (fChannels.at("data-in").at(i).Receive(msg) > 0) { - if (i < noOfMsgParts) { - fChannels.at("data-out").at(0).Send(msg, "snd-more"); - } else { - fChannels.at("data-out").at(0).Send(msg); - } - } - } - } - - delete msg; - } - - delete poller; -} - -FrameBuilder::~FrameBuilder() -{ -} diff --git a/devices/flp2epn-distributed/FrameBuilder.h b/devices/flp2epn-distributed/FrameBuilder.h deleted file mode 100644 index 111d48b5a5f76..0000000000000 --- a/devices/flp2epn-distributed/FrameBuilder.h +++ /dev/null @@ -1,29 +0,0 @@ -/** - * FrameBuilder.h - * - * @since 2014-10-21 - * @author D. Klein, A. Rybalchenko, M. Al-Turany - */ - -#ifndef ALICEO2_DEVICES_FRAMEBUILDER_H_ -#define ALICEO2_DEVICES_FRAMEBUILDER_H_ - -#include "FairMQDevice.h" - -namespace AliceO2 { -namespace Devices { - -class FrameBuilder : public FairMQDevice -{ - public: - FrameBuilder(); - virtual ~FrameBuilder(); - - protected: - virtual void Run(); -}; - -} // namespace Devices -} // namespace AliceO2 - -#endif diff --git a/devices/flp2epn-distributed/README.md b/devices/flp2epn-distributed/README.md new file mode 100644 index 0000000000000..f533e639239e2 --- /dev/null +++ b/devices/flp2epn-distributed/README.md @@ -0,0 +1,64 @@ +#### Prototype Devices for the transport between FLPs and EPNs +-------------------------------------------------------------- + +#### General + +The devices implement following topology: + +![FLP2EPN topology](../../docs/images/flp2epn-distr-rtt.png?raw=true "FLP2EPN topology") + +- **flpSyncSampler** publishes timeframe IDs at configurable rate (only for the *test mode*). +- **flpSenders** generate dummy data of configurable size and distribute it to the available epnReceivers. +- **epnReceivers** collect all sub-timeframes (according to number of FLPs), merge them and send further. +- flpSenders choose which epnReceiver to send a given sub-timeframe to based on its ID (`timeframeId % NumEPNs`), ensuring that sub-timeframes with the same ID arrive at the same epnReceiver (without need for additional synchronization). +- Upon collecting sub-timeframes from all flpSenders, epnReceivers send confirmation to the sampler with the timeframe ID to measure roundtrip time. +- epnReceivers can also measure intervals between receiving from the same FLP (used to see the effect of traffic shaping). +- The devices can run in *test mode* (as described above) and *default mode* where flpSenders receive data instead of generating it (as used by the Alice HLT devices). +- Optional deployment and execution via DDS. + +#### Device configuration + +The devices are configured via command line options. Most of the command line options have default values. These default values are for running in the *default mode*. Running in *test mode* requires a few modifications. + +These are the required device options: + +**flpSyncSampler** (only for the *test mode*) + + - `--id arg` Device ID + - `--data-out-address arg` Data output address, e.g.: "tcp://localhost:5555" + - `--ack-in-address arg` Acknowledgement Input address, e.g.: "tcp://localhost:5556" + +**flpSender** + + - `--id arg` Device ID + - `--num-epns arg` Number of EPNs + - `--data-in-address arg` Data input address, e.g.: "tcp://localhost:5555" + - `--data-out-address arg` Data output address, e.g.: "tcp://localhost:5555" + - `--hb-in-address arg` Heartbeat input address, e.g.: "tcp://localhost:5555" + +Default overrides for *test mode*: + + - `--test-mode arg (=0)` "1" to run in test mode + - `--data-in-socket-type arg (=pull)` "sub" for test mode + - `--data-in-method arg (=bind)` "connect" for test mode + - `--data-in-address arg` In test mode, the signal from flpSyncSampler sends to this address (data is generated). + +**epnReceiver** + + - `--id arg` Device ID + - `--num-flps arg` Number of FLPs + - `--data-in-address arg` Data input address, e.g.: "tcp://localhost:5555" + - `--data-out-address arg` Output address, e.g.: "tcp://localhost:5555" + - `--hb-out-address arg` Heartbeat output address, e.g.: "tcp://localhost:5555" + +Default overrides for *test mode*: + + - `--data-out-socket-type arg (=push)` "pub" for test mode (pub will just discard the data because no receiver in test mode). + - `--ack-out-address arg` For test mode provide address of the flpSyncSampler. + +To list *all* available device options, run the executable with `--help`. + +When running with DDS, configuration of addresses is also not required, because these are configured dynamically. + +Example for the *test mode* can be found in `run/startFLP2EPN-distributed.sh.in` for manual run, or `runO2Prototype/flp_epn_topology.xml` for DDS run. For *default mode* there is an example DDS topology in `../topologies/o2prototype_topology.xml`. + diff --git a/docs/images/flp2epn-distr-rtt.png b/docs/images/flp2epn-distr-rtt.png new file mode 100644 index 0000000000000000000000000000000000000000..580d4233a8b474c947c34d4d9cedeeb8e6b5bd98 GIT binary patch literal 30553 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 literal 0 HcmV?d00001 diff --git a/topologies/o2prototype_topology.xml b/topologies/o2prototype_topology.xml index eda471fedaeb2..f3905acd7824a 100644 --- a/topologies/o2prototype_topology.xml +++ b/topologies/o2prototype_topology.xml @@ -59,7 +59,7 @@ The following parameters need adjustment when extending the FLP-EPN configuratio - $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id 0 --num-epns 1 + $ALICEO2_INSTALL_DIR/bin/flpSender_dds --id FLP0 --num-epns 1 FLPSenderInputAddress FLPSenderHeartbeatInputAddress From a32e059f2626f45e0d988f69aafff87746fe0f89 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Fri, 9 Oct 2015 12:51:37 +0200 Subject: [PATCH 27/34] Include high level boost headers --- devices/flp2epn-distributed/EPNReceiver.cxx | 12 +++++++++--- devices/flp2epn-distributed/EPNReceiver.h | 6 ++++-- devices/flp2epn-distributed/FLPSender.h | 4 +++- devices/flp2epn-distributed/FLPSyncSampler.cxx | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/devices/flp2epn-distributed/EPNReceiver.cxx b/devices/flp2epn-distributed/EPNReceiver.cxx index aa4c30c5eefc0..f4fd07c7a65a8 100644 --- a/devices/flp2epn-distributed/EPNReceiver.cxx +++ b/devices/flp2epn-distributed/EPNReceiver.cxx @@ -5,10 +5,16 @@ * @author D. Klein, A. Rybalchenko, M. Al-Turany, C. Kouzinopoulos */ +#include // size_t +#include // writing to file (DEBUG) + +#include +#include + +#include "FairMQLogger.h" + #include "EPNReceiver.h" -#include "boost/preprocessor/seq/enum.hpp" // for BOOST_PP_SEQ_ENUM_1 -#include "boost/preprocessor/seq/size.hpp" -#include + using namespace std; using namespace AliceO2::Devices; diff --git a/devices/flp2epn-distributed/EPNReceiver.h b/devices/flp2epn-distributed/EPNReceiver.h index f1b24d3e91db9..7837521e10a6f 100644 --- a/devices/flp2epn-distributed/EPNReceiver.h +++ b/devices/flp2epn-distributed/EPNReceiver.h @@ -11,8 +11,10 @@ #include #include #include -#include "FairMQDevice.h" // for FairMQDevice, etc -#include "boost/date_time/posix_time/ptime.hpp" // for ptime + +#include + +#include "FairMQDevice.h" namespace AliceO2 { namespace Devices { diff --git a/devices/flp2epn-distributed/FLPSender.h b/devices/flp2epn-distributed/FLPSender.h index 941822abcef38..a1987d3623a3e 100644 --- a/devices/flp2epn-distributed/FLPSender.h +++ b/devices/flp2epn-distributed/FLPSender.h @@ -11,8 +11,10 @@ #include #include #include + +#include + #include "FairMQDevice.h" // for FairMQDevice, etc -#include "boost/date_time/posix_time/ptime.hpp" // for ptime namespace AliceO2 { namespace Devices { diff --git a/devices/flp2epn-distributed/FLPSyncSampler.cxx b/devices/flp2epn-distributed/FLPSyncSampler.cxx index 742e061729e90..4cdd7a760d28e 100644 --- a/devices/flp2epn-distributed/FLPSyncSampler.cxx +++ b/devices/flp2epn-distributed/FLPSyncSampler.cxx @@ -5,13 +5,13 @@ * @author D. Klein, A. Rybalchenko */ -#include #include #include #include #include "FairMQLogger.h" + #include "FLPSyncSampler.h" using namespace std; From 0e4b1080bf528d72db0a64c8e77f94d32c3a7ad0 Mon Sep 17 00:00:00 2001 From: chkouzin Date: Wed, 14 Oct 2015 10:18:56 +0200 Subject: [PATCH 28/34] Specify a full path to the USE_MDFILE_AS_MAINPAGE option to select the top level README.md file Remove unused AliceO2Doxygen.conf configuration file Remove trailing whitespaces from the Doxygen configuration file Rewording of the README.md files --- README.md | 6 +- doxygen/AliceO2Doxygen.conf | 2353 ----------------------------------- doxygen/README.md | 5 +- doxygen/doxyfile.in | 130 +- 4 files changed, 70 insertions(+), 2424 deletions(-) delete mode 100644 doxygen/AliceO2Doxygen.conf diff --git a/README.md b/README.md index 3ff18bc68aca7..3e0cd6b27ef64 100644 --- a/README.md +++ b/README.md @@ -40,14 +40,14 @@ Alice O2 project software. Simulation and reconstraction software for the ALICE cd AliceO2 mkdir build_o2 cd build_o2 - cmake ../ + cmake ../ # -DBUILD_DOXYGEN=ON ( add this option to cmake to generate the doxygen documentation) make . config.sh [or source config.csh] ### Generating the doxygen documentation -If the flage -DBUILD_DOXYGEN=ON is set when calling cmake, the doxygen documentation will be generated when calling make. The generated html files can then be found in "build_o2/doxygen/doc/html" +To automatically generate documentation for the AliceO2 project using Doxygen, set the flag -DBUILD_DOXYGEN=ON when calling cmake; the doxygen documentation will then be generated when calling make. The generated html files can be found in the "doxygen/doc/html" subdirectory of the build directory. Doxygen documantation is also available online [here](http://aliceo2group.github.io/AliceO2/) @@ -56,4 +56,4 @@ Doxygen documantation is also available online [here](http://aliceo2group.github To include custom DDS location in the compilation, provide DDS_PATH flag when calling cmake. For example: ```bash cmake -DDDS_PATH="/home/username/DDS/0.11.27.g79f48d4/" .. -``` \ No newline at end of file +``` diff --git a/doxygen/AliceO2Doxygen.conf b/doxygen/AliceO2Doxygen.conf deleted file mode 100644 index 2f9a9dd2f658c..0000000000000 --- a/doxygen/AliceO2Doxygen.conf +++ /dev/null @@ -1,2353 +0,0 @@ -# Doxyfile 1.8.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = AliceO2 - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = /Users/turany/fairsoft/docs/AliceO2 - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = YES - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 2 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = /Users/turany/fairsoft/docs/src/AliceO2 - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = .git/ \ - build/ \ - build-dir/ \ - html-docs/ - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = README.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = /Users/turany/fairsoft/docs/AliceO2 - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /