ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
Namespaces | Functions
util.hpp File Reference

Contains declaration for the async op utilities. More...

#include "../config.hpp"
#include <algorithm>
#include <optional>
#include <vector>
#include <Metadaqif.hpp>
#include <boost/thread/future.hpp>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>
#include "../error.hpp"
#include "../state.hpp"
#include "asyncOpParams.hpp"

Go to the source code of this file.

Namespaces

 daq
 
 daq::op
 
 daq::op::eventlog
 

Functions

template<class SourceType >
void daq::op::eventlog::Reply (AsyncOpParams &params, SourceType const &source, std::string description, bool error)
 
template<class SourceType >
void daq::op::eventlog::Request (AsyncOpParams &params, SourceType const &source, std::string description)
 
template<class F >
size_t daq::op::eventlog::CountExceptions (std::vector< F > const &futures) noexcept
 
template<class R , class Iterator , class Pred , class Sender , class ReplyHandler >
boost::future< std::vector< boost::future< R > > > daq::op::SendRequestAndCollectReplies (Iterator begin, Iterator end, Pred filter_pred, AsyncOpParams params, Sender sender, ReplyHandler reply_handler, std::string_view logging_description)
 Utility function to Send requests and collect replies. More...
 
template<class T >
std::vector< std::exception_ptr > daq::op::ExtractExceptions (std::vector< boost::future< T >> &futures)
 
void daq::op::UnwrapVoidReplies (boost::future< std::vector< boost::future< void >>> futures)
 Unwrap futures to extract errors. More...
 
template<class R >
std::vector< R > daq::op::UnwrapReplies (boost::future< std::vector< boost::future< R >>> &&futures)
 Unwrap replies. More...
 
template<class ReplyType >
std::optional< ReplyType > daq::op::HandleMetaDaqReply (char const *request, std::optional< State > expected_state, State success_state, std::optional< State > error_state, AsyncOpParams params, Source< MetaSource > &source, boost::future< ReplyType > &&fut)
 Reply handler that checks for exceptions in reply. More...
 
template<class ReplyType >
std::optional< ReplyType > daq::op::HandlePrimDaqReply (char const *request, std::optional< State > expected_state, State success_state, std::optional< State > error_state, AsyncOpParams params, Source< PrimSource > &source, boost::future< ReplyType > &&fut)
 Reply handler that checks for exceptions in reply. More...
 

Detailed Description

Contains declaration for the async op utilities.

Definition in file util.hpp.