1 #ifndef _ots_TableBase_h_
2 #define _ots_TableBase_h_
8 #include "otsdaq/TableCore/TableVersion.h"
9 #include "otsdaq/TableCore/TableView.h"
14 class ConfigurationManager;
17 #define __SELF_NODE__ getNode(getTableName())
22 const unsigned int MAX_VIEWS_IN_CACHE;
25 TableBase(
bool specialTable,
const std::string& specialTableName);
26 TableBase(
const std::string& tableName, std::string* accumulatedExceptions = 0);
33 void destroy (
void) { ; }
34 void reset (
bool keepTemporaryVersions =
false);
35 void deactivate (
void);
38 void print (std::ostream& out = std::cout)
const;
40 std::string getTypeId (
void);
46 void trimCache (
unsigned int trimSize = -1);
51 const std::string& getTableName (
void)
const;
52 const std::string& getTableDescription (
void)
const;
53 std::set<TableVersion> getStoredVersions (
void)
const;
65 void setTableName (
const std::string& tableName);
66 void setTableDescription (
const std::string& tableDescription);
73 const std::string& author,
74 const std::string& mergeApproach ,
75 std::map<std::pair<std::string /*original table*/, std::string /*original uidB*/>,
76 std::string >& uidConversionMap,
77 std::map<std::pair<std::string ,
78 std::pair<std::string ,
80 std::string >& groupidConversionMap,
81 bool fillRecordConversionMaps,
82 bool applyRecordConversionMaps,
83 bool generateUniqueDataColumns =
false);
87 static std::string convertToCaps (std::string& str,
bool isConfigName =
false);
89 bool latestAndMockupColumnNumberMismatch(
void)
const;
91 unsigned int getNumberOfStoredViews (
void)
const;
94 std::string tableName_;
95 std::string tableDescription_;
103 std::map<TableVersion, TableView> tableViews_;
TableVersion mergeViews(const TableView &sourceViewA, const TableView &sourceViewB, TableVersion destinationVersion, const std::string &author, const std::string &mergeApproach, std::map< std::pair< std::string, std::string >, std::string > &uidConversionMap, std::map< std::pair< std::string, std::pair< std::string, std::string > >, std::string > &groupidConversionMap, bool fillRecordConversionMaps, bool applyRecordConversionMaps, bool generateUniqueDataColumns=false)