Skip to content

Commit

Permalink
Merge pull request #16 from DUNE-DAQ/wpv_lintfixes
Browse files Browse the repository at this point in the history
apply lint suggestions
  • Loading branch information
willpvazquez authored Jul 23, 2021
2 parents 8811051 + 5c51996 commit deadbd4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
10 changes: 5 additions & 5 deletions plugins/PacmanCardReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ PacmanCardReader::do_configure(const data_t& args)
m_card_id = m_cfg.card_id;

// Config checks - make some if config values needed, felix example below
/*
if (m_num_links != m_elinks.size()) {
ers::fatal(ElinkConfigurationInconsistency(ERS_HERE, m_num_links));
}
*/
//
//if (m_num_links != m_elinks.size()) {
// ers::fatal(ElinkConfigurationInconsistency(ERS_HERE, m_num_links));
//}
//

// Configure components
TLOG(TLVL_WORK_STEPS) << "Configuring ZMQLinkHandler";
Expand Down
2 changes: 1 addition & 1 deletion src/CreateZMQLink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ createZMQLinkModel(const std::string& target)
} // namespace lbrulibs
} // namespace dunedaq

#endif // LBRULIBS_SRC_CREATEELINK_HPP_
#endif // LBRULIBS_SRC_CREATEZMQLINK_HPP_
2 changes: 1 addition & 1 deletion src/ZMQIssues.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ERS_DECLARE_ISSUE(lbrulibs, InitializationError, " ZMQ Initialization Error: " <

ERS_DECLARE_ISSUE(lbrulibs, GenericNDMessage, " ND Readout: " << initmsg, ((std::string)initmsg))

ERS_DECLARE_ISSUE(lbrulibs, ReceiveTimeoutExpired, "Unable to receive within timeout period: " << timeout << " milliseconds.",((int)timeout))
ERS_DECLARE_ISSUE(lbrulibs, ReceiveTimeoutExpired, "Unable to receive within timeout period: " << timeout << " milliseconds.",((int)timeout)) // NOLINT
} // namespace dunedaq

#endif // LBRULIBS_SRC_ZMQISSUES_HPP_
4 changes: 2 additions & 2 deletions src/ZMQLinkConcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#ifndef LBRULIBS_SRC_ZMQLINKCONCEPT_HPP_
#define LBRULIBS_SRC_ZMQLINKCONCEPT_HPP_

#include <nlohmann/json.hpp>
//#include "ipm/Subscriber.hpp"
#include "zmq.hpp"

#include <nlohmann/json.hpp>

#include <memory>
#include <sstream>
#include <string>
Expand Down
17 changes: 6 additions & 11 deletions src/ZMQLinkModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,24 @@
#define LBRULIBS_SRC_ZMQLINKMODEL_HPP_

#include "ZMQLinkConcept.hpp"
#include "zmq.hpp"

#include "readout/utils/ReusableThread.hpp"
#include "appfwk/DAQSink.hpp"
#include "logging/Logging.hpp"

#include "readout/utils/ReusableThread.hpp"
#include "readout/NDReadoutTypes.hpp"

#include <nlohmann/json.hpp>
#include <folly/ProducerConsumerQueue.h>

//#include "ipm/Subscriber.hpp"
#include "zmq.hpp"
#include "readout/NDReadoutTypes.hpp"

#include <string>
#include <mutex>
#include <atomic>
#include <memory>

namespace dunedaq::lbrulibs {
/*
ERS_DECLARE_ISSUE(lbrulibs,ReceiveTimeoutExpired,
"Unable to receive within timeout period (timeout period was " << timeout << " milliseconds)",
((int)timeout)) // NOLINT
*/

template<class TargetPayloadType>
class ZMQLinkModel : public ZMQLinkConcept {
public:
Expand Down Expand Up @@ -173,7 +168,7 @@ class ZMQLinkModel : public ZMQLinkConcept {
TLOG_DEBUG(1) << ": Pushing data into output_queue";
try {
TargetPayloadType* Payload = new TargetPayloadType();
std::memcpy((void *)&Payload->data, msg.data(), msg.size());
std::memcpy(static_cast<void *>(&Payload->data), msg.data(), msg.size());

m_sink_queue->push(*Payload, m_sink_timeout);
} catch (const appfwk::QueueTimeoutExpired& ex) {
Expand Down

0 comments on commit deadbd4

Please sign in to comment.