1 #ifndef _ots_SlowControlsTableBase_h_
2 #define _ots_SlowControlsTableBase_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)
26 virtual bool slowControlsChannelListHasChanged (
void)
const;
27 virtual void getSlowControlsChannelList (std::vector<std::pair<std::string , std::vector<std::string>>>& channelList)
const;
41 virtual bool outputEpicsPVFile (
ConfigurationManager* configManager, std::vector<std::pair<std::string , std::vector<std::string>>>* channelList = 0)
const;
43 virtual unsigned int slowControlsHandlerConfig (
44 std::stringstream& out
46 , std::vector<std::pair<std::string , std::vector<std::string>>>* channelList
49 virtual unsigned int slowControlsHandler (
50 std::stringstream& out
52 , std::string& commentStr
53 , std::string& subsystem
54 , std::string& location
56 , std::vector<std::pair<std::string , std::vector<std::string>>>* channelList
58 virtual std::string setFilePath ()
const = 0;
63 std::string
const colMetricName_ =
"MetricName";
64 std::string
const colStatus_ =
"Status";
65 std::string
const colUnits_ =
"Units";
66 std::string
const colChannelDataType_ =
"ChannelDataType";
67 std::string
const colLowLowThreshold_ =
"LowLowThreshold";
68 std::string
const colLowThreshold_ =
"LowThreshold";
69 std::string
const colHighThreshold_ =
"HighThreshold";
70 std::string
const colHighHighThreshold_ =
"HighHighThreshold";
73 bool isFirstAppInContext_ =
false;
74 bool channelListHasChanged_ =
false;
79 #define EPICS_CONFIG_PATH (std::string(__ENV__("USER_DATA")) + "/" + "EPICSConfigurations/")
80 #define EPICS_DIRTY_FILE_PATH \
82 getenv("OTSDAQ_EPICS_DATA")? \
83 (std::string(getenv("OTSDAQ_EPICS_DATA")) + "/" + "dirtyFlag.txt"): \
84 (EPICS_CONFIG_PATH + "/dirtyFlag.txt") )