6 #include "artdaq/Application/LoadParameterSet.hh"
7 #include "otsdaq/ConfigurationInterface/ConfigurationInterface.h"
8 #include "otsdaq/ConfigurationInterface/ConfigurationManagerRW.h"
20 std::cout <<
"\n\nusage: Two arguments:\n\n\t otsdaq_import_system_aliases "
21 "<path_to_import_database_folder> <path_to_active_groups_file> "
22 "<import_prepend_base_name (optional)> \n\n"
23 <<
"\t\t Default values: \n\t\t\timport_prepend_base_name = \"" << prependBaseName <<
"\" "
25 <<
"\t\tfor example:\n\n"
26 <<
"\t\t\totsdaq_import_system_aliases "
27 "~/databaseToImport/filesystemdb/test_db "
28 "~/UserDataToImport/ServiceData/ActiveTableGroups.cfg"
31 std::cout <<
"\n\n\tExample active groups file content:\n\n"
32 <<
"testContext\n2\nTableEditWizBackbone\n3\ndefaultConfig\n1\n\n"
35 std::cout <<
"\n\nNote: This assumes artdaq db file type interface. "
36 <<
"The current database/ will be backed up to database_<linuxtime>/ "
37 <<
"before importing the active groups.\n\n"
41 void ImportSystemAliasTableGroups(fhicl::ParameterSet pset)
43 __COUT__ <<
"=================================================\n";
44 __COUT__ <<
"=================================================\n";
45 __COUT__ <<
"=================================================\n";
46 __COUT__ <<
"Importing External System Aliases!" << std::endl;
48 std::string prependBaseName = pset.get<std::string>(
"prepend_name",
"Imported");
49 const std::string groupAliasesTableName = ConfigurationManager::GROUP_ALIASES_TABLE_NAME;
50 const std::string versionAliasesTableName = ConfigurationManager::VERSION_ALIASES_TABLE_NAME;
53 if(pset.get<
bool>(
"do_help",
false) || !pset.has_key(
"current_database_path") || !pset.has_key(
"active_groups_file"))
59 std::string pathToImportDatabase = pset.get<std::string>(
"current_database_path");
60 std::string pathToImportActiveGroups = pset.get<std::string>(
"active_groups_file");
62 __COUTV__(pathToImportDatabase);
63 __COUTV__(pathToImportActiveGroups);
64 __COUTV__(prependBaseName);
72 setenv(
"CONFIGURATION_TYPE",
"File", 1);
73 setenv(
"CONFIGURATION_DATA_PATH", (std::string(__ENV__(
"USER_DATA")) +
"/ConfigurationDataExamples").c_str(), 1);
74 setenv(
"TABLE_INFO_PATH", (std::string(__ENV__(
"USER_DATA")) +
"/TableInfo").c_str(), 1);
78 setenv(
"SERVICE_DATA_PATH", (std::string(__ENV__(
"USER_DATA")) +
"/ServiceData").c_str(), 1);
82 setenv(
"OTSDAQ_LIB", (std::string(__ENV__(
"USER_DATA")) +
"/").c_str(), 1);
83 setenv(
"OTSDAQ_UTILITIES_LIB", (std::string(__ENV__(
"USER_DATA")) +
"/").c_str(), 1);
86 setenv(
"OTS_MAIN_PORT",
"2015", 1);
89 setenv(
"XDAQ_CONFIGURATION_DATA_PATH", (std::string(__ENV__(
"USER_DATA")) +
"/XDAQConfigurations").c_str(), 1);
90 setenv(
"XDAQ_CONFIGURATION_XML",
"otsConfigurationNoRU_CMake", 1);
151 std::map<std::string ,
153 originalGroupAliasMap;
159 std::map<std::string ,
161 originalTableAliasMap;
167 std::map< std::pair<std::string, TableGroupKey>, std::string > groupErrors;
172 __COUT__ <<
"Getting started..." << std::endl;
175 bool importedDbInPlace =
false;
177 __COUT__ <<
"Configuration manager initialized." << __E__;
179 std::string nowTime = std::to_string(time(0));
180 std::string currentDir = __ENV__(
"ARTDAQ_DATABASE_URI");
182 if(currentDir.find(
"filesystemdb://") != 0)
184 __SS__ <<
"filesystemdb:// was not found in $ARTDAQ_DATABASE_URI!" << std::endl;
185 __COUT_ERR__ <<
"\n" << ss.str();
189 currentDir = currentDir.substr(std::string(
"filesystemdb://").length());
190 while(currentDir.length() && currentDir[currentDir.length() - 1] ==
'/')
191 currentDir = currentDir.substr(0, currentDir.length() - 1);
193 __COUTV__(currentDir);
195 std::string backupDir = currentDir +
"_" + nowTime;
196 std::string importDir = pathToImportDatabase +
"_" + nowTime;
197 std::string tmpCurrentDir = currentDir +
"_tmp_" + nowTime;
201 std::map<std::string , std::map<std::string , TableVersion >> existingTableAliases =
202 cfgMgr->ConfigurationManager::getVersionAliases();
203 std::map<std::string , std::pair<std::string , TableGroupKey>> existingGroupAliases = cfgMgr->getActiveGroupAliases();
208 __COUT__ <<
"Backing up current database at '" << currentDir <<
"' to '" << backupDir <<
"'" << __E__;
209 std::system((
"cp -r " + currentDir +
" " + backupDir).c_str());
211 __COUT__ <<
"Backing up current database at '" << pathToImportDatabase <<
"' to '" << importDir <<
"'" << __E__;
212 std::system((
"cp -r " + pathToImportDatabase +
" " + importDir).c_str());
216 __COUT__ <<
"Swap to import-db" << std::endl;
217 if(rename(currentDir.c_str(), tmpCurrentDir.c_str()) < 0)
219 __SS__ <<
"Problem!" << std::endl;
222 if(rename(importDir.c_str(), currentDir.c_str()) < 0)
224 __SS__ <<
"Problem!" << std::endl;
227 importedDbInPlace =
true;
233 cfgMgr->restoreActiveTableGroups(
true , pathToImportActiveGroups);
236 std::map<std::string, std::pair<std::string, TableGroupKey>> activeGroupsMap = cfgMgr->getActiveTableGroups();
238 for(
const auto& activeGroup : activeGroupsMap)
240 if(activeGroup.second.second.isInvalid())
242 if(activeGroup.second.first ==
"")
245 __COUTV__(activeGroup.second.first);
246 __COUTV__(activeGroup.second.second);
248 groupSet.insert(std::pair<std::pair<std::string, TableGroupKey>, TableGroupKey>(
249 std::pair<std::string, TableGroupKey>(activeGroup.second.first, activeGroup.second.second), TableGroupKey()));
253 std::map<std::string, TableVersion> activeVersions = cfgMgr->getActiveVersions();
254 if(activeVersions.find(groupAliasesTableName) == activeVersions.end())
256 __SS__ <<
"\nActive version of " << groupAliasesTableName <<
" missing! " << groupAliasesTableName
257 <<
" is a required member of the Backbone configuration group."
258 <<
"\n\nLikely you need to activate a valid Backbone group." << std::endl;
261 if(activeVersions.find(versionAliasesTableName) == activeVersions.end())
263 __SS__ <<
"\nActive version of " << versionAliasesTableName <<
" missing! " << versionAliasesTableName
264 <<
" is a required member of the Backbone configuration group."
265 <<
"\n\nLikely you need to activate a valid Backbone group." << std::endl;
269 std::vector<std::pair<std::string, ConfigurationTree>> aliasNodePairs = cfgMgr->getNode(groupAliasesTableName).getChildren();
270 std::string aliasName;
271 for(
auto& aliasPair : aliasNodePairs)
273 if(TableGroupKey(aliasPair.second.getNode(
"GroupKey").getValueAsString()).isInvalid())
275 if(aliasPair.second.getNode(
"GroupName").getValueAsString() ==
"")
278 aliasName = aliasPair.second.getNode(
"GroupKeyAlias").getValueAsString();
282 if(aliasName[0] >=
'a' && aliasName[0] <=
'z')
284 aliasName = prependBaseName + aliasName;
285 __COUTV__(aliasName);
286 __COUTV__(aliasPair.second.getNode(
"GroupName").getValueAsString());
287 __COUTV__(aliasPair.second.getNode(
"GroupKey").getValueAsString());
291 if(existingGroupAliases.find(aliasName) != existingGroupAliases.end())
293 __SS__ <<
"Conflicting group alias '" << aliasName <<
"' found!" << __E__;
297 groupSet.insert(std::pair<std::pair<std::string, TableGroupKey>, TableGroupKey>(
298 std::pair<std::string, TableGroupKey>(aliasPair.second.getNode(
"GroupName").getValueAsString(),
299 TableGroupKey(aliasPair.second.getNode(
"GroupKey").getValueAsString())),
302 originalGroupAliasMap[aliasName] = std::pair<std::string, TableGroupKey>(aliasPair.second.getNode(
"GroupName").getValueAsString(),
303 TableGroupKey(aliasPair.second.getNode(
"GroupKey").getValueAsString()));
306 aliasNodePairs = cfgMgr->getNode(versionAliasesTableName).getChildren();
307 for(
auto& aliasPair : aliasNodePairs)
309 if(TableVersion(aliasPair.second.getNode(
"Version").getValueAsString()).isInvalid())
311 if(aliasPair.second.getNode(
"TableName").getValueAsString() ==
"")
313 aliasName = aliasPair.second.getNode(
"VersionAlias").getValueAsString();
317 if(aliasName[0] >=
'a' && aliasName[0] <=
'z')
319 aliasName = prependBaseName + aliasName;
320 __COUTV__(aliasPair.second.getNode(
"TableName").getValueAsString());
321 __COUTV__(aliasName);
322 __COUTV__(aliasPair.second.getNode(
"Version").getValueAsString());
326 if(existingTableAliases.find(aliasName) != existingTableAliases.end())
328 __SS__ <<
"Conflicting table version alias '" << aliasName <<
"' found!" << __E__;
332 originalTableAliasMap[aliasName] = std::pair<std::string, TableVersion>(aliasPair.second.getNode(
"TableName").getValueAsString(),
333 TableVersion(aliasPair.second.getNode(
"Version").getValueAsString()));
336 catch(
const std::runtime_error& e)
338 __COUT_ERR__ <<
"There was a fatal error: " << e.what() << __E__;
340 __COUT__ <<
"Run the following to return to your previous database structure:" << std::endl;
341 __COUT__ <<
"\t otsdaq_flatten_system_aliases -1 " << backupDir <<
"\n\n" << std::endl;
346 __COUTV__(StringMacros::mapToString(existingGroupAliases));
347 __COUTV__(StringMacros::mapToString(existingTableAliases));
349 __COUT__ <<
"Identified groups:" << std::endl;
350 for(
auto& group : groupSet)
351 __COUT__ <<
"\t" << group.first.first <<
" " << group.first.second << std::endl;
353 __COUT__ <<
"Identified group aliases:" << std::endl;
354 for(
auto& groupAlias : originalGroupAliasMap)
355 __COUT__ <<
"\t" << groupAlias.first <<
" ==> " << groupAlias.second.first <<
"-" << groupAlias.second.second << std::endl;
363 TableVersion newVersion;
364 TableGroupKey newKey;
367 std::string accumulateErrors =
"";
370 std::map<std::string, TableVersion> memberMap;
371 std::map<std::string , std::string > groupAliases;
372 std::string groupComment;
373 std::string groupAuthor;
374 std::string groupCreateTime;
375 time_t groupCreateTime_t;
376 TableBase* groupMetadataTable = cfgMgr->getMetadataTable();
378 __COUT__ <<
"Proceeding with handling of identified groups..." << __E__;
381 for(
auto& groupPair : groupSet)
390 __COUTV__(importedDbInPlace);
392 if(!importedDbInPlace)
394 __COUT__ <<
"Swap to import-db" << std::endl;
395 if(rename(currentDir.c_str(), tmpCurrentDir.c_str()) < 0)
397 __SS__ <<
"Problem!" << std::endl;
400 if(rename(importDir.c_str(), currentDir.c_str()) < 0)
402 __SS__ <<
"Problem!" << std::endl;
405 importedDbInPlace =
true;
411 __COUT__ <<
"****************************" << std::endl;
412 __COUT__ <<
"Loading members for " << groupPair.first.first <<
"(" << groupPair.first.second <<
")" << std::endl;
419 cfgMgr->loadTableGroup(groupPair.first.first,
420 groupPair.first.second,
432 catch(std::runtime_error& e)
434 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first <<
"(" << groupPair.first.second <<
")" << std::endl;
435 __COUT__ << e.what() << std::endl;
440 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first <<
"(" << groupPair.first.second <<
")" << std::endl;
456 groupErrors.insert(std::pair<std::pair<std::string, TableGroupKey>, std::string>(
457 std::pair<std::string, TableGroupKey>(groupPair.first.first, groupPair.first.second),
"Error caught loading the group."));
462 if(importedDbInPlace)
464 __COUT__ <<
"Swap to current-db" << std::endl;
465 if(rename(currentDir.c_str(), importDir.c_str()) < 0)
467 __SS__ <<
"Problem!" << std::endl;
470 if(rename(tmpCurrentDir.c_str(), currentDir.c_str()) < 0)
472 __SS__ <<
"Problem!" << std::endl;
475 importedDbInPlace =
false;
483 for(
auto& memberPair : memberMap)
485 __COUT__ << memberPair.first <<
":v" << memberPair.second << std::endl;
489 if(newTableVersionMap.find(std::pair<std::string, TableVersion>(memberPair.first, memberPair.second)) != newTableVersionMap.end())
491 __COUT__ <<
"Table was already modified!" << std::endl;
492 memberPair.second = newTableVersionMap[std::pair<std::string, TableVersion>(memberPair.first, memberPair.second)];
493 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v" << memberPair.second << std::endl;
499 config = cfgMgr->getTableByName(memberPair.first);
500 cfgView = config->getViewP();
502 newVersion = TableVersion::getNextVersion(theInterface_->findLatestVersion(config));
503 __COUTV__(newVersion);
504 cfgView->setVersion(newVersion);
505 theInterface_->saveActiveVersion(config);
514 newTableVersionMap.insert(std::pair<std::pair<std::string, TableVersion>, TableVersion>(
515 std::pair<std::string, TableVersion>(memberPair.first, memberPair.second), newVersion));
517 memberPair.second = newVersion;
519 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v" << memberPair.second << std::endl;
522 __COUT__ <<
"Member map completed" << __E__;
523 __COUTV__(StringMacros::mapToString(memberMap));
528 __COUTV__(StringMacros::mapToString(groupAliases));
529 __COUTV__(groupComment);
530 __COUTV__(groupAuthor);
531 __COUTV__(groupCreateTime);
532 sscanf(groupCreateTime.c_str(),
"%ld", &groupCreateTime_t);
533 __COUTV__(groupCreateTime_t);
537 while(groupMetadataTable->getViewP()->getNumberOfRows() > 1)
538 groupMetadataTable->getViewP()->deleteRow(0);
539 if(groupMetadataTable->getViewP()->getNumberOfRows() == 0)
540 groupMetadataTable->getViewP()->addRow();
544 groupMetadataTable->getViewP()->setValue(
545 StringMacros::mapToString(groupAliases,
"," ,
":" ), 0, ConfigurationManager::METADATA_COL_ALIASES);
546 groupMetadataTable->getViewP()->setValue(groupComment, 0, ConfigurationManager::METADATA_COL_COMMENT);
547 groupMetadataTable->getViewP()->setValue(groupAuthor, 0, ConfigurationManager::METADATA_COL_AUTHOR);
548 groupMetadataTable->getViewP()->setValue(groupCreateTime_t, 0, ConfigurationManager::METADATA_COL_TIMESTAMP);
551 newVersion = TableVersion::getNextVersion(theInterface_->findLatestVersion(groupMetadataTable));
552 __COUTV__(newVersion);
553 groupMetadataTable->getViewP()->setVersion(newVersion);
554 theInterface_->saveActiveVersion(groupMetadataTable);
557 memberMap[groupMetadataTable->getTableName()] = groupMetadataTable->getViewVersion();
561 newKey = TableGroupKey::getNextKey(theInterface_->findLatestGroupKey(groupPair.first.first));
566 theInterface_->saveTableGroup(memberMap, TableGroupKey::getFullGroupString(groupPair.first.first, newKey));
569 groupPair.second = newKey;
571 catch(std::runtime_error& e)
573 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" (" << groupPair.first.second <<
") " << std::endl;
574 __COUT__ << e.what() << std::endl;
576 groupErrors.insert(std::pair<std::pair<std::string, TableGroupKey>, std::string>(
577 std::pair<std::string, TableGroupKey>(groupPair.first.first, groupPair.first.second),
"Error caught saving the group."));
581 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" (" << groupPair.first.second <<
") " << std::endl;
583 groupErrors.insert(std::pair<std::pair<std::string, TableGroupKey>, std::string>(
584 std::pair<std::string, TableGroupKey>(groupPair.first.first, groupPair.first.second),
"Error caught saving the group."));
592 __COUT__ <<
"Completed group and table saving for " << count <<
" groups." << __E__;
593 __COUT__ <<
"Created tables:" << std::endl;
594 for(
auto& tablePair : newTableVersionMap)
595 __COUT__ <<
"\t" << tablePair.first.first <<
"-v" << tablePair.first.second <<
" ==> " << tablePair.second << std::endl;
597 __COUT__ <<
"Created groups:" << std::endl;
598 for(
auto& group : groupSet)
599 __COUT__ <<
"\t" << group.first.first <<
"(" << group.first.second <<
") ==> " << group.second << std::endl;
603 if(importedDbInPlace)
605 __COUT__ <<
"Swap to current-db" << std::endl;
606 if(rename(currentDir.c_str(), importDir.c_str()) < 0)
608 __SS__ <<
"Problem!" << std::endl;
611 if(rename(tmpCurrentDir.c_str(), currentDir.c_str()) < 0)
613 __SS__ <<
"Problem!" << std::endl;
616 importedDbInPlace =
false;
621 FILE* fp = fopen((currentDir +
"/README_otsdaq_import.txt").c_str(),
"a");
624 __COUT__ <<
"\tError opening README file!" << std::endl;
632 timeinfo = localtime(&rawtime);
633 strftime(buffer, 200,
"%b %d, %Y %I:%M:%S%p %Z", timeinfo);
636 "This database...\t %s \t received an import from...\t %s \t at this "
637 "time \t %lu \t %s\n\n",
639 pathToImportDatabase.c_str(),
649 cfgMgr->restoreActiveTableGroups(
true );
659 __COUT__ <<
"Modifying the active Backbone table to reflect new table versions and "
668 std::string activeBackboneGroupName = cfgMgr->getActiveGroupName(ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE);
669 cfgMgr->loadTableGroup(
670 activeBackboneGroupName, cfgMgr->getActiveGroupKey(ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE),
true, &memberMap, 0, &accumulateErrors);
672 std::map<std::string, TableVersion> activeMap = cfgMgr->getActiveVersions();
675 if(activeMap.find(groupAliasesTableName) != activeMap.end())
677 __COUT__ <<
"\n\nModifying " << groupAliasesTableName << std::endl;
678 config = cfgMgr->getTableByName(groupAliasesTableName);
679 cfgView = config->getViewP();
681 unsigned int col0 = cfgView->findCol(
"GroupKeyAlias");
682 unsigned int col1 = cfgView->findCol(
"GroupName");
683 unsigned int col2 = cfgView->findCol(
"GroupKey");
691 for(
auto& aliasPair : originalGroupAliasMap)
693 auto groupIt = groupSet.find(std::pair<std::string, TableGroupKey>(aliasPair.second.first, aliasPair.second.second));
695 if(groupIt == groupSet.end())
697 __COUT__ <<
"Error! Could not find the new entry for the original group " << aliasPair.second.first <<
"(" << aliasPair.second.second <<
")"
701 row = cfgView->addRow(
"import_aliases",
true );
702 cfgView->setValue(aliasPair.first, row, col0);
703 cfgView->setValue(aliasPair.second.first, row, col1);
704 cfgView->setValue(groupIt->second.toString(), row, col2);
711 if(activeMap.find(versionAliasesTableName) != activeMap.end())
713 __COUT__ <<
"\n\nModifying " << versionAliasesTableName << std::endl;
714 config = cfgMgr->getTableByName(versionAliasesTableName);
715 cfgView = config->getViewP();
716 unsigned int col0 = cfgView->findCol(
"VersionAlias");
717 unsigned int col1 = cfgView->findCol(
"TableName");
718 unsigned int col2 = cfgView->findCol(
"Version");
727 for(
auto& aliasPair : originalTableAliasMap)
729 auto tableIt = newTableVersionMap.find(std::pair<std::string, TableVersion>(aliasPair.second.first, aliasPair.second.second));
731 if(tableIt == newTableVersionMap.end())
733 __COUT__ <<
"Error! Could not find the new entry for the original table " << aliasPair.second.first <<
"(" << aliasPair.second.second <<
")"
737 row = cfgView->addRow(
"import_aliases",
true );
738 cfgView->setValue(aliasPair.first, row, col0);
739 cfgView->setValue(aliasPair.second.first, row, col1);
740 cfgView->setValue(tableIt->second.toString(), row, col2);
749 config = cfgMgr->getTableByName(groupAliasesTableName);
750 cfgView = config->getViewP();
751 newVersion = TableVersion::getNextVersion(theInterface_->findLatestVersion(config));
752 __COUTV__(newVersion);
753 cfgView->setVersion(newVersion);
754 theInterface_->saveActiveVersion(config);
756 memberMap[groupAliasesTableName] = newVersion;
759 __COUT__ <<
"\t to...\t" << groupAliasesTableName <<
":v" << memberMap[groupAliasesTableName] << std::endl;
761 __COUT__ << versionAliasesTableName <<
":v" << memberMap[versionAliasesTableName] << std::endl;
763 config = cfgMgr->getTableByName(versionAliasesTableName);
764 cfgView = config->getViewP();
765 newVersion = TableVersion::getNextVersion(theInterface_->findLatestVersion(config));
766 __COUTV__(newVersion);
767 cfgView->setVersion(newVersion);
768 theInterface_->saveActiveVersion(config);
770 memberMap[versionAliasesTableName] = newVersion;
772 __COUT__ <<
"\t to...\t" << versionAliasesTableName <<
":v" << memberMap[versionAliasesTableName] << std::endl;
774 __COUT__ <<
"Backbone member map completed" << __E__;
775 __COUTV__(StringMacros::mapToString(memberMap));
777 newKey = TableGroupKey::getNextKey(theInterface_->findLatestGroupKey(activeBackboneGroupName));
782 theInterface_->saveTableGroup(memberMap, TableGroupKey::getFullGroupString(activeBackboneGroupName, newKey));
784 std::string renameFile = ConfigurationManager::ACTIVE_GROUPS_FILENAME +
"." + nowTime;
785 rename(ConfigurationManager::ACTIVE_GROUPS_FILENAME.c_str(), renameFile.c_str());
787 __COUT__ <<
"Backing up '" << ConfigurationManager::ACTIVE_GROUPS_FILENAME <<
"' to ... '" << renameFile <<
"'" << std::endl;
789 cfgMgr->activateTableGroup(activeBackboneGroupName,
793 catch(
const std::runtime_error& e)
795 __COUT_ERR__ <<
"There was a fatal error during backbone modification: " << e.what() << __E__;
802 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups:" << std::endl;
803 for(
const auto& group : groupSet)
804 __COUT__ <<
"\t" << group.first.first <<
": " << group.first.second <<
" => " << group.second << std::endl;
805 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups end." << std::endl;
809 __COUT__ <<
"End of Importing Active Table Groups!\n\n\n" << std::endl;
811 __COUT__ <<
"****************************" << std::endl;
812 __COUT__ <<
"There were " << groupSet.size() <<
" groups considered, and there were " << groupErrors.size() <<
" errors found handling those groups."
814 __COUT__ <<
"The following errors were found handling the groups:" << std::endl;
815 for(
auto& groupErr : groupErrors)
816 __COUT__ <<
"\t" << groupErr.first.first <<
" " << groupErr.first.second <<
": \t" << groupErr.second << std::endl;
817 __COUT__ <<
"End of errors.\n\n" << std::endl;
819 __COUT__ <<
"Run the following to return to your previous database structure:" << std::endl;
820 __COUT__ <<
"\t otsdaq_flatten_system_aliases -1 " << backupDir <<
"\n\n" << std::endl;
825 int main(
int argc,
char* argv[])
827 auto pset = artdaq::LoadParameterSet(argc, argv,
"otsdaq_import_fhicl",
"Import a ParameterSet to the otsdaq database");
828 ImportSystemAliasTableGroups(pset);