1 #ifndef _ots_ARTDAQTableBase_h_
2 #define _ots_ARTDAQTableBase_h_
4 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
5 #include "otsdaq/TableCore/TableBase.h"
8 #define OUT out << tabStr << commentStr
9 #define PUSHTAB tabStr += "\t"
10 #define POPTAB tabStr.resize(tabStr.size() - 1)
11 #define PUSHCOMMENT commentStr += "# "
12 #define POPCOMMENT commentStr.resize(commentStr.size() - 2)
22 ARTDAQTableBase(std::string tableName, std::string* accumulatedExceptions = 0);
26 static const std::string ARTDAQ_SUPERVISOR_TABLE;
28 enum class ARTDAQAppType {
37 std::string
const READER =
"reader";
38 std::string
const BUILDER =
"builder";
39 std::string
const LOGGER =
"logger";
40 std::string
const DISPATCHER =
"dispatcher";
44 DEFAULT_MAX_FRAGMENT_SIZE = 1048576
52 std::set<int> sources;
57 static const int NULL_SUBSYSTEM_DESTINATION;
66 : label(l), hostname(h), subsystem(s) {}
70 static const std::string& getTypeString (ARTDAQAppType type);
71 static std::string getFHICLFilename (ARTDAQTableBase::ARTDAQAppType type,
const std::string& name);
72 static std::string getFlatFHICLFilename (ARTDAQTableBase::ARTDAQAppType type,
const std::string& name);
73 static void flattenFHICL (ARTDAQTableBase::ARTDAQAppType type,
const std::string& name);
75 static void insertParameters (std::ostream& out, std::string& tabStr, std::string& commentStr,
ConfigurationTree parameterLink,
const std::string& parameterPreamble,
bool onlyInsertAtTableParameters =
false,
bool includeAtTableParameters =
false);
76 static std::string insertModuleType (std::ostream& out, std::string& tabStr, std::string& commentStr,
ConfigurationTree moduleTypeNode);
78 static void outputReaderFHICL (
80 const std::string& selfHost,
81 size_t maxFragmentSizeBytes);
84 static void outputDataReceiverFHICL (
87 const std::string& selfHost,
89 ARTDAQTableBase::ARTDAQAppType appType,
90 size_t maxFragmentSizeBytes);
92 static void extractArtdaqInfo (
94 std::map<int /*subsystem ID*/, ARTDAQTableBase::SubsystemInfo>& subsystems,
95 std::map<ARTDAQTableBase::ARTDAQAppType, std::list<ARTDAQTableBase::ProcessInfo>>& processes,
96 bool doWriteFHiCL =
false,
97 size_t maxFragmentSizeBytes = ARTDAQTableBase::DEFAULT_MAX_FRAGMENT_SIZE,