9 #include "otsdaq-core/ConfigurationInterface/ConfigurationInterface.h"
10 #include "otsdaq-core/ConfigurationInterface/ConfigurationManagerRW.h"
22 void FlattenActiveSystemAliasTableGroups(
int argc,
char* argv[])
24 std::cout <<
"=================================================\n";
25 std::cout <<
"=================================================\n";
26 std::cout <<
"=================================================\n";
27 __COUT__ <<
"\nFlattening Active System Aliases!" << std::endl;
29 std::cout <<
"\n\nusage: Two arguments:\n\t <baseFlatVersion> <pathToSwapIn "
31 <<
"\t Default values: baseFlatVersion = 0, pathToSwapIn = \"\" \n\n"
34 std::cout <<
"\n\nNote: you can optionally just swap databases (and not modify their "
36 <<
" by providing an invalid baseFlatVersion of -1.\n\n"
39 std::cout <<
"\n\nNote: This assumes artdaq db file type interface. "
40 <<
"The current database/ will be moved to database_<linuxtime>/ "
41 <<
"and if a pathToSwapIn is specified it will be copied to database/ "
42 <<
"before saving the currently active groups.\n\n"
45 std::cout <<
"argc = " << argc << std::endl;
46 for(
int i = 0; i < argc; i++)
47 std::cout <<
"argv[" << i <<
"] = " << argv[i] << std::endl;
51 std::cout <<
"Error! Must provide at least one parameter.\n\n" << std::endl;
56 std::string flatVersionStr = argv[1];
57 if(flatVersionStr.find(
'h') != std::string::npos)
60 <<
"Recognized parameter 1. as a 'help' option. Usage was printed. Exiting."
66 std::string pathToSwapIn =
"";
68 sscanf(argv[1],
"%d", &flatVersion);
70 pathToSwapIn = argv[2];
72 __COUT__ <<
"flatVersion = " << flatVersion << std::endl;
73 __COUT__ <<
"pathToSwapIn = " << pathToSwapIn << std::endl;
83 setenv(
"CONFIGURATION_TYPE",
"File", 1);
84 setenv(
"CONFIGURATION_DATA_PATH",
85 (std::string(getenv(
"USER_DATA")) +
"/ConfigurationDataExamples").c_str(),
88 "TABLE_INFO_PATH", (std::string(getenv(
"USER_DATA")) +
"/TableInfo").c_str(), 1);
92 setenv(
"SERVICE_DATA_PATH",
93 (std::string(getenv(
"USER_DATA")) +
"/ServiceData").c_str(),
98 setenv(
"OTSDAQ_LIB", (std::string(getenv(
"USER_DATA")) +
"/").c_str(), 1);
99 setenv(
"OTSDAQ_UTILITIES_LIB", (std::string(getenv(
"USER_DATA")) +
"/").c_str(), 1);
102 setenv(
"OTS_MAIN_PORT",
"2015", 1);
105 setenv(
"XDAQ_CONFIGURATION_DATA_PATH",
106 (std::string(getenv(
"USER_DATA")) +
"/XDAQConfigurations").c_str(),
108 setenv(
"XDAQ_CONFIGURATION_XML",
"otsConfigurationNoRU_CMake", 1);
115 std::cout <<
"\n\n\n" << __COUT_HDR_FL__ <<
"Loading active Aliases..." << std::endl;
143 std::map<std::pair<std::string, TableGroupKey>,
TableGroupKey> groupSet;
145 std::map<std::pair<std::string, TableVersion>,
TableVersion> modifiedTables;
146 std::map<std::string, std::pair<TableGroupKey, TableGroupKey>> activeGroupKeys;
147 std::map<std::pair<std::string, TableGroupKey>, std::string> groupErrors;
149 std::string activeBackboneGroupName =
"";
150 std::string activeContextGroupName =
"";
151 std::string activeIterateGroupName =
"";
152 std::string activeConfigGroupName =
"";
154 std::string nowTime = std::to_string(time(0));
156 std::string thenTime =
"";
157 if(pathToSwapIn !=
"")
159 thenTime = pathToSwapIn.substr(pathToSwapIn.rfind(
'_') + 1);
160 __COUT__ <<
"thenTime = " << thenTime << std::endl;
165 std::map<std::string, std::pair<std::string, TableGroupKey>> activeGroupsMap =
166 cfgMgr->getActiveTableGroups();
168 for(
const auto& activeGroup : activeGroupsMap)
170 groupSet.insert(std::pair<std::pair<std::string, TableGroupKey>,
TableGroupKey>(
171 std::pair<std::string, TableGroupKey>(activeGroup.second.first,
172 activeGroup.second.second),
174 activeGroupKeys.insert(
175 std::pair<std::string, std::pair<TableGroupKey, TableGroupKey>>(
176 activeGroup.second.first,
177 std::pair<TableGroupKey, TableGroupKey>(activeGroup.second.second,
180 if(activeGroup.first == ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE)
182 activeBackboneGroupName = activeGroup.second.first;
183 __COUT__ <<
"found activeBackboneGroupName = " << activeBackboneGroupName
186 else if(activeGroup.first == ConfigurationManager::ACTIVE_GROUP_NAME_CONTEXT)
188 activeContextGroupName = activeGroup.second.first;
189 __COUT__ <<
"found activeContextGroupName = " << activeContextGroupName
192 else if(activeGroup.first == ConfigurationManager::ACTIVE_GROUP_NAME_ITERATE)
194 activeIterateGroupName = activeGroup.second.first;
195 __COUT__ <<
"found activeIterateGroupName = " << activeIterateGroupName
198 else if(activeGroup.first ==
199 ConfigurationManager::ACTIVE_GROUP_NAME_CONFIGURATION)
201 activeConfigGroupName = activeGroup.second.first;
202 __COUT__ <<
"found activeConfigGroupName = " << activeConfigGroupName
210 const std::string groupAliasesTableName =
211 ConfigurationManager::GROUP_ALIASES_TABLE_NAME;
212 std::map<std::string, TableVersion> activeVersions = cfgMgr->getActiveVersions();
213 if(activeVersions.find(groupAliasesTableName) == activeVersions.end())
215 __SS__ <<
"\nActive version of " << groupAliasesTableName <<
" missing! "
216 << groupAliasesTableName
217 <<
" is a required member of the Backbone configuration group."
218 <<
"\n\nLikely you need to activate a valid Backbone group." << std::endl;
222 std::vector<std::pair<std::string, ConfigurationTree>> aliasNodePairs =
223 cfgMgr->getNode(groupAliasesTableName).getChildren();
224 for(
auto& groupPair : aliasNodePairs)
225 groupSet.insert(std::pair<std::pair<std::string, TableGroupKey>,
TableGroupKey>(
226 std::pair<std::string, TableGroupKey>(
227 groupPair.second.getNode(
"GroupName").getValueAsString(),
228 TableGroupKey(groupPair.second.getNode(
"GroupKey").getValueAsString())),
231 __COUT__ <<
"Identified groups:" << std::endl;
232 for(
auto& group : groupSet)
233 __COUT__ << group.first.first <<
" " << group.first.second << std::endl;
234 __COUT__ << std::endl;
235 __COUT__ << std::endl;
240 std::string currentDir = __ENV__(
"ARTDAQ_DATABASE_URI");
242 if(currentDir.find(
"filesystemdb://") != 0)
244 __SS__ <<
"filesystemdb:// was not found in $ARTDAQ_DATABASE_URI!" << std::endl;
245 __COUT_ERR__ <<
"\n" << ss.str();
249 currentDir = currentDir.substr(std::string(
"filesystemdb://").length());
250 while(currentDir.length() &&
251 currentDir[currentDir.length() - 1] ==
'/')
252 currentDir = currentDir.substr(0, currentDir.length() - 1);
253 std::string moveToDir = currentDir +
"_" + nowTime;
256 __SS__ << (
"Aborting move! Must at least give version argument to flatten to!")
258 __COUT_ERR__ <<
"\n" << ss.str();
262 if(pathToSwapIn !=
"")
265 if((dp = opendir(pathToSwapIn.c_str())) == 0)
267 __COUT__ <<
"ERROR:(" << errno <<
"). Can't open directory: " << pathToSwapIn
275 __COUT__ <<
"Moving current directory: \t" << currentDir << std::endl;
276 __COUT__ <<
"\t... to: \t\t" << moveToDir << std::endl;
278 rename(currentDir.c_str(), moveToDir.c_str());
280 if(pathToSwapIn !=
"")
282 __COUT__ <<
"Swapping in directory: \t" << pathToSwapIn << std::endl;
283 __COUT__ <<
"\t.. to: \t\t" << currentDir << std::endl;
284 rename(pathToSwapIn.c_str(), currentDir.c_str());
288 std::string activeGroupsFile =
289 ConfigurationManager::ACTIVE_GROUPS_FILENAME +
"." + thenTime;
290 FILE* fp = fopen(activeGroupsFile.c_str(),
"r");
293 __COUT__ <<
"Swapping active groups file: \t" << activeGroupsFile
295 __COUT__ <<
"\t.. to: \t\t" << ConfigurationManager::ACTIVE_GROUPS_FILENAME
297 rename(activeGroupsFile.c_str(),
298 ConfigurationManager::ACTIVE_GROUPS_FILENAME.c_str());
308 std::string accumulateErrors =
"";
312 std::map<std::string , std::string > groupAliases;
313 std::string groupComment;
314 std::string groupAuthor;
315 std::string groupCreateTime;
316 time_t groupCreateTime_t;
317 TableBase* groupMetadataTable = cfgMgr->getMetadataTable();
323 __COUT__ <<
"\n\nflatVersion " <<
TableVersion(flatVersion)
324 <<
" is an invalid or temporary version. Skipping to end!" << std::endl;
328 for(
auto& groupPair : groupSet)
332 __COUT__ <<
"****************************" << std::endl;
333 __COUT__ <<
"Loading members for " << groupPair.first.first <<
"("
334 << groupPair.first.second <<
")" << std::endl;
335 __COUT__ <<
"flatVersion = " << flatVersion << std::endl;
338 if(pathToSwapIn !=
"")
340 __COUT__ <<
"REVERT by Swapping back directory: \t" << currentDir
342 __COUT__ <<
"\t.. to: \t\t" << pathToSwapIn << std::endl;
343 if(rename(currentDir.c_str(), pathToSwapIn.c_str()) < 0)
345 __SS__ <<
"Problem!" << std::endl;
351 __COUT__ <<
"REVERT by Moving directory: \t" << currentDir << std::endl;
352 __COUT__ <<
"\t.. to temporary directory: \t\t" << (moveToDir +
"_tmp")
354 if(rename(currentDir.c_str(), (moveToDir +
"_tmp").c_str()) < 0)
356 __SS__ <<
"Problem!" << std::endl;
361 __COUT__ <<
"REVERT by Moving directory: \t" << moveToDir << std::endl;
362 __COUT__ <<
"\t... to: \t\t" << currentDir << std::endl;
363 if(rename(moveToDir.c_str(), currentDir.c_str()) < 0)
365 __SS__ <<
"Problem!" << std::endl;
373 accumulateErrors =
"";
374 cfgMgr->loadTableGroup(groupPair.first.first,
375 groupPair.first.second,
387 catch(std::runtime_error& e)
389 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first
390 <<
"(" << groupPair.first.second <<
")" << std::endl;
391 __COUT__ << e.what() << std::endl;
396 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first
397 <<
"(" << groupPair.first.second <<
")" << std::endl;
406 __COUT__ <<
"Moving current directory: \t" << currentDir << std::endl;
407 __COUT__ <<
"\t... to: \t\t" << moveToDir << std::endl;
408 if(rename(currentDir.c_str(), moveToDir.c_str()) < 0)
410 __SS__ <<
"Problem!" << std::endl;
414 if(pathToSwapIn !=
"")
416 __COUT__ <<
"Swapping in directory: \t" << pathToSwapIn << std::endl;
417 __COUT__ <<
"\t.. to: \t\t" << currentDir << std::endl;
418 if(rename(pathToSwapIn.c_str(), currentDir.c_str()) < 0)
420 __SS__ <<
"Problem!" << std::endl;
426 __COUT__ <<
"Moving temporary directory: \t" << (moveToDir +
"_tmp")
428 __COUT__ <<
"\t.. to current directory: \t\t" << currentDir << std::endl;
429 if(rename((moveToDir +
"_tmp").c_str(), currentDir.c_str()) < 0)
431 __SS__ <<
"Problem!" << std::endl;
445 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
446 std::pair<std::string, TableGroupKey>(groupPair.first.first,
447 groupPair.first.second),
448 "Error caught loading the group."));
457 for(
auto& memberPair : memberMap)
459 __COUT__ << memberPair.first <<
":v" << memberPair.second << std::endl;
463 if(modifiedTables.find(std::pair<std::string, TableVersion>(
464 memberPair.first, memberPair.second)) != modifiedTables.end())
466 __COUT__ <<
"Table was already modified!" << std::endl;
468 modifiedTables[std::pair<std::string, TableVersion>(
469 memberPair.first, memberPair.second)];
470 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v"
471 << memberPair.second << std::endl;
476 config = cfgMgr->getTableByName(memberPair.first);
477 cfgView = config->getViewP();
479 theInterface_->saveActiveVersion(config);
483 cfgView->setVersion(memberPair.second);
486 modifiedTables.insert(
487 std::pair<std::pair<std::string, TableVersion>,
TableVersion>(
488 std::pair<std::string, TableVersion>(memberPair.first,
492 memberPair.second = flatVersion;
494 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v" << memberPair.second
501 __COUTV__(StringMacros::mapToString(groupAliases));
502 __COUTV__(groupComment);
503 __COUTV__(groupAuthor);
504 __COUTV__(groupCreateTime);
505 sscanf(groupCreateTime.c_str(),
"%ld", &groupCreateTime_t);
506 __COUTV__(groupCreateTime_t);
510 while(groupMetadataTable->getViewP()->getNumberOfRows() > 1)
511 groupMetadataTable->getViewP()->deleteRow(0);
512 if(groupMetadataTable->getViewP()->getNumberOfRows() == 0)
513 groupMetadataTable->getViewP()->addRow();
517 groupMetadataTable->getViewP()->setValue(
518 StringMacros::mapToString(
519 groupAliases,
"," ,
":" ),
521 ConfigurationManager::METADATA_COL_ALIASES);
522 groupMetadataTable->getViewP()->setValue(
523 groupComment, 0, ConfigurationManager::METADATA_COL_COMMENT);
524 groupMetadataTable->getViewP()->setValue(
525 groupAuthor, 0, ConfigurationManager::METADATA_COL_AUTHOR);
526 groupMetadataTable->getViewP()->setValue(
527 groupCreateTime_t, 0, ConfigurationManager::METADATA_COL_TIMESTAMP);
530 groupMetadataTable->getViewP()->setVersion(
TableVersion(flatVersion));
531 theInterface_->saveActiveVersion(groupMetadataTable);
534 memberMap[groupMetadataTable->getTableName()] =
535 groupMetadataTable->getViewVersion();
539 theInterface_->saveTableGroup(
541 TableGroupKey::getFullGroupString(groupPair.first.first,
548 if(activeGroupKeys.find(groupPair.first.first) != activeGroupKeys.end() &&
549 activeGroupKeys[groupPair.first.first].first == groupPair.first.second)
550 activeGroupKeys[groupPair.first.first].second =
553 catch(std::runtime_error& e)
555 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" ("
556 << groupPair.first.second <<
") " << std::endl;
557 __COUT__ << e.what() << std::endl;
560 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
561 std::pair<std::string, TableGroupKey>(groupPair.first.first,
562 groupPair.first.second),
563 "Error caught saving the group."));
567 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" ("
568 << groupPair.first.second <<
") " << std::endl;
571 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
572 std::pair<std::string, TableGroupKey>(groupPair.first.first,
573 groupPair.first.second),
574 "Error caught saving the group."));
585 FILE* fp = fopen((moveToDir +
"/README_otsdaq_flatten.txt").c_str(),
"a");
587 __COUT__ <<
"\tError opening README file!" << std::endl;
595 timeinfo = localtime(&rawtime);
596 strftime(buffer, 200,
"%b %d, %Y %I:%M%p %Z", timeinfo);
599 "This database was moved from...\n\t %s \nto...\n\t %s \nat this "
600 "time \n\t %lu \t %s\n\n\n",
612 FILE* fp = fopen((currentDir +
"/README_otsdaq_flatten.txt").c_str(),
"a");
615 __COUT__ <<
"\tError opening README file!" << std::endl;
623 timeinfo = localtime(&rawtime);
624 strftime(buffer, 200,
"%b %d, %Y %I:%M:%S%p %Z", timeinfo);
627 "This database was moved from...\t %s \t to...\t %s at this time \t "
629 pathToSwapIn.c_str(),
663 if(activeBackboneGroupName ==
"")
665 __COUT__ <<
"No active Backbone table identified." << std::endl;
671 <<
"Modifying the active Backbone table to reflect new table versions and "
676 cfgMgr->loadTableGroup(activeBackboneGroupName,
677 activeGroupKeys[activeBackboneGroupName].second,
686 const std::string groupAliasesName =
687 ConfigurationManager::GROUP_ALIASES_TABLE_NAME;
688 const std::string versionAliasesName =
689 ConfigurationManager::VERSION_ALIASES_TABLE_NAME;
691 std::map<std::string, TableVersion> activeMap = cfgMgr->getActiveVersions();
694 if(activeMap.find(groupAliasesName) != activeMap.end())
696 __COUT__ <<
"\n\nModifying " << groupAliasesName << std::endl;
697 config = cfgMgr->getTableByName(groupAliasesName);
698 cfgView = config->getViewP();
700 unsigned int col1 = cfgView->findCol(
"GroupName");
701 unsigned int col2 = cfgView->findCol(
"GroupKey");
708 for(
unsigned int row = 0; row < cfgView->getNumberOfRows(); ++row)
711 for(
const auto& group : groupSet)
712 if(group.second.isInvalid())
714 else if(cfgView->getDataView()[row][col1] == group.first.first &&
715 cfgView->getDataView()[row][col2] ==
716 group.first.second.toString())
719 __COUT__ <<
"Changing row " << row <<
" for "
720 << cfgView->getDataView()[row][col1]
721 <<
" key=" << cfgView->getDataView()[row][col2]
722 <<
" to NEW key=" << group.second << std::endl;
723 cfgView->setValue(group.second.toString(), row, col2);
729 cfgView->deleteRow(row--);
735 if(activeMap.find(versionAliasesName) != activeMap.end())
737 __COUT__ <<
"\n\nModifying " << versionAliasesName << std::endl;
738 config = cfgMgr->getTableByName(versionAliasesName);
739 cfgView = config->getViewP();
740 unsigned int col1 = cfgView->findCol(
"TableName");
741 unsigned int col2 = cfgView->findCol(
"Version");
745 for(
unsigned int row = 0; row < cfgView->getNumberOfRows(); ++row)
748 for(
const auto& table : modifiedTables)
749 if(cfgView->getDataView()[row][col1] == table.first.first &&
750 cfgView->getDataView()[row][col2] == table.first.second.toString())
753 __COUT__ <<
"Changing row " << row <<
" for "
754 << cfgView->getDataView()[row][col1]
755 <<
" version=" << cfgView->getDataView()[row][col2]
756 <<
" to NEW version=" << table.second << std::endl;
757 cfgView->setValue(table.second.toString(), row, col2);
763 cfgView->deleteRow(row--);
769 __COUT__ << groupAliasesName <<
":v" << memberMap[groupAliasesName] << std::endl;
771 config = cfgMgr->getTableByName(groupAliasesName);
772 cfgView = config->getViewP();
774 theInterface_->saveActiveVersion(config);
776 memberMap[groupAliasesName] = flatVersion;
778 __COUT__ <<
"\t to...\t" << groupAliasesName <<
":v"
779 << memberMap[groupAliasesName] << std::endl;
781 __COUT__ << versionAliasesName <<
":v" << memberMap[versionAliasesName]
784 config = cfgMgr->getTableByName(versionAliasesName);
785 cfgView = config->getViewP();
787 theInterface_->saveActiveVersion(config);
789 memberMap[versionAliasesName] = flatVersion;
791 __COUT__ <<
"\t to...\t" << versionAliasesName <<
":v"
792 << memberMap[versionAliasesName] << std::endl;
795 theInterface_->saveTableGroup(
797 TableGroupKey::getFullGroupString(activeBackboneGroupName,
800 activeGroupKeys[activeBackboneGroupName].second =
TableGroupKey(flatVersion);
802 __COUT__ <<
"New to-be-active backbone group " << activeBackboneGroupName <<
":v"
803 << activeGroupKeys[activeBackboneGroupName].second << std::endl;
812 << __COUT_HDR_FL__ <<
"Manipulating the Active Groups file..."
816 FILE* fp = fopen(ConfigurationManager::ACTIVE_GROUPS_FILENAME.c_str(),
"r");
819 __SS__ <<
"Original active groups file '"
820 << ConfigurationManager::ACTIVE_GROUPS_FILENAME <<
"' not found."
825 __COUT__ <<
"Backing up file: " << ConfigurationManager::ACTIVE_GROUPS_FILENAME
830 std::string renameFile =
831 ConfigurationManager::ACTIVE_GROUPS_FILENAME +
"." + nowTime;
832 rename(ConfigurationManager::ACTIVE_GROUPS_FILENAME.c_str(), renameFile.c_str());
834 __COUT__ <<
"Backup file name: " << renameFile << std::endl;
836 TableGroupKey *theConfigurationTableGroupKey_, *theContextTableGroupKey_,
837 *theBackboneTableGroupKey_, *theIterateTableGroupKey_;
838 std::string theConfigurationTableGroup_, theContextTableGroup_,
839 theBackboneTableGroup_, theIterateTableGroup_;
841 theConfigurationTableGroup_ = activeConfigGroupName;
842 theConfigurationTableGroupKey_ = &(activeGroupKeys[activeConfigGroupName].second);
844 theContextTableGroup_ = activeContextGroupName;
845 theContextTableGroupKey_ = &(activeGroupKeys[activeContextGroupName].second);
847 theBackboneTableGroup_ = activeBackboneGroupName;
848 theBackboneTableGroupKey_ = &(activeGroupKeys[activeBackboneGroupName].second);
850 theIterateTableGroup_ = activeIterateGroupName;
851 theIterateTableGroupKey_ = &(activeGroupKeys[activeIterateGroupName].second);
855 __COUT__ <<
"Updating persistent active groups to "
856 << ConfigurationManager::ACTIVE_GROUPS_FILENAME <<
" ..."
859 std::string fn = ConfigurationManager::ACTIVE_GROUPS_FILENAME;
860 FILE* fp = fopen(fn.c_str(),
"w");
864 fprintf(fp,
"%s\n", theContextTableGroup_.c_str());
867 theContextTableGroupKey_
868 ? theContextTableGroupKey_->toString().c_str()
870 fprintf(fp,
"%s\n", theBackboneTableGroup_.c_str());
873 theBackboneTableGroupKey_
874 ? theBackboneTableGroupKey_->toString().c_str()
876 fprintf(fp,
"%s\n", theConfigurationTableGroup_.c_str());
879 theConfigurationTableGroupKey_
880 ? theConfigurationTableGroupKey_->toString().c_str()
882 fprintf(fp,
"%s\n", theIterateTableGroup_.c_str());
885 theIterateTableGroupKey_
886 ? theIterateTableGroupKey_->toString().c_str()
894 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups:" << std::endl;
895 for(
const auto& group : groupSet)
896 __COUT__ <<
"\t" << group.first.first <<
": " << group.first.second <<
" => "
897 << group.second << std::endl;
898 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups end." << std::endl;
902 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Active Groups:" << std::endl;
903 for(
const auto& activeGroup : activeGroupKeys)
904 __COUT__ <<
"\t" << activeGroup.first <<
": " << activeGroup.second.first
905 <<
" => " << activeGroup.second.second << std::endl;
907 __COUT__ << activeBackboneGroupName <<
" is the "
908 << ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE <<
"." << std::endl;
909 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Active Groups end." << std::endl;
914 << __COUT_HDR_FL__ <<
"End of Flattening Active Table Groups!\n\n\n"
917 __COUT__ <<
"****************************" << std::endl;
918 __COUT__ <<
"There were " << groupSet.size() <<
" groups considered, and there were "
919 << groupErrors.size() <<
" errors found handling those groups." << std::endl;
920 __COUT__ <<
"The following errors were found handling the groups:" << std::endl;
921 for(
auto& groupErr : groupErrors)
922 __COUT__ <<
"\t" << groupErr.first.first <<
" " << groupErr.first.second <<
": \t"
923 << groupErr.second << std::endl;
924 __COUT__ <<
"End of errors.\n\n" << std::endl;
926 __COUT__ <<
"Run the following to return to your previous database structure:"
928 __COUT__ <<
"\t otsdaq_flatten_system_aliases -1 " << moveToDir <<
"\n\n"
934 int main(
int argc,
char* argv[])
936 FlattenActiveSystemAliasTableGroups(argc, argv);