6 #include "artdaq/Application/LoadParameterSet.hh"
7 #include "otsdaq-core/ConfigurationInterface/ConfigurationInterface.h"
8 #include "otsdaq-core/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 = \""
24 << prependBaseName <<
"\" "
26 <<
"\t\tfor example:\n\n"
27 <<
"\t\t\totsdaq_import_system_aliases "
28 "~/databaseToImport/filesystemdb/test_db "
29 "~/UserDataToImport/ServiceData/ActiveTableGroups.cfg"
32 std::cout <<
"\n\n\tExample active groups file content:\n\n"
33 <<
"testContext\n2\nTableEditWizBackbone\n3\ndefaultConfig\n1\n\n"
36 std::cout <<
"\n\nNote: This assumes artdaq db file type interface. "
37 <<
"The current database/ will be backed up to database_<linuxtime>/ "
38 <<
"before importing the active groups.\n\n"
42 void ImportSystemAliasTableGroups(fhicl::ParameterSet pset)
44 __COUT__ <<
"=================================================\n";
45 __COUT__ <<
"=================================================\n";
46 __COUT__ <<
"=================================================\n";
47 __COUT__ <<
"Importing External System Aliases!" << std::endl;
49 std::string prependBaseName = pset.get<std::string>(
"prepend_name",
"Imported");
50 const std::string groupAliasesTableName =
51 ConfigurationManager::GROUP_ALIASES_TABLE_NAME;
52 const std::string versionAliasesTableName =
53 ConfigurationManager::VERSION_ALIASES_TABLE_NAME;
56 if(pset.get<
bool>(
"do_help",
false) || !pset.has_key(
"current_database_path") ||
57 !pset.has_key(
"active_groups_file"))
63 std::string pathToImportDatabase = pset.get<std::string>(
"current_database_path");
64 std::string pathToImportActiveGroups = pset.get<std::string>(
"active_groups_file");
66 __COUTV__(pathToImportDatabase);
67 __COUTV__(pathToImportActiveGroups);
68 __COUTV__(prependBaseName);
76 setenv(
"CONFIGURATION_TYPE",
"File", 1);
77 setenv(
"CONFIGURATION_DATA_PATH",
78 (std::string(__ENV__(
"USER_DATA")) +
"/ConfigurationDataExamples").c_str(),
81 "TABLE_INFO_PATH", (std::string(__ENV__(
"USER_DATA")) +
"/TableInfo").c_str(), 1);
85 setenv(
"SERVICE_DATA_PATH",
86 (std::string(__ENV__(
"USER_DATA")) +
"/ServiceData").c_str(),
91 setenv(
"OTSDAQ_LIB", (std::string(__ENV__(
"USER_DATA")) +
"/").c_str(), 1);
92 setenv(
"OTSDAQ_UTILITIES_LIB", (std::string(__ENV__(
"USER_DATA")) +
"/").c_str(), 1);
95 setenv(
"OTS_MAIN_PORT",
"2015", 1);
98 setenv(
"XDAQ_CONFIGURATION_DATA_PATH",
99 (std::string(__ENV__(
"USER_DATA")) +
"/XDAQConfigurations").c_str(),
101 setenv(
"XDAQ_CONFIGURATION_XML",
"otsConfigurationNoRU_CMake", 1);
162 std::map<std::string ,
164 originalGroupAliasMap;
170 std::map<std::string ,
172 originalTableAliasMap;
178 std::map< std::pair<std::string, TableGroupKey>,
185 __COUT__ <<
"Getting started..." << std::endl;
188 bool importedDbInPlace =
false;
190 __COUT__ <<
"Configuration manager initialized." << __E__;
192 std::string nowTime = std::to_string(time(0));
193 std::string currentDir = __ENV__(
"ARTDAQ_DATABASE_URI");
195 if(currentDir.find(
"filesystemdb://") != 0)
197 __SS__ <<
"filesystemdb:// was not found in $ARTDAQ_DATABASE_URI!" << std::endl;
198 __COUT_ERR__ <<
"\n" << ss.str();
202 currentDir = currentDir.substr(std::string(
"filesystemdb://").length());
203 while(currentDir.length() &&
204 currentDir[currentDir.length() - 1] ==
'/')
205 currentDir = currentDir.substr(0, currentDir.length() - 1);
207 __COUTV__(currentDir);
209 std::string backupDir = currentDir +
"_" + nowTime;
210 std::string importDir = pathToImportDatabase +
"_" + nowTime;
211 std::string tmpCurrentDir = currentDir +
"_tmp_" + nowTime;
215 std::map<std::string ,
216 std::map<std::string , TableVersion >>
217 existingTableAliases = cfgMgr->ConfigurationManager::getVersionAliases();
218 std::map<std::string , std::pair<std::string , TableGroupKey>>
219 existingGroupAliases = cfgMgr->getActiveGroupAliases();
224 __COUT__ <<
"Backing up current database at '" << currentDir <<
"' to '"
225 << backupDir <<
"'" << __E__;
226 std::system((
"cp -r " + currentDir +
" " + backupDir).c_str());
228 __COUT__ <<
"Backing up current database at '" << pathToImportDatabase <<
"' to '"
229 << importDir <<
"'" << __E__;
230 std::system((
"cp -r " + pathToImportDatabase +
" " + importDir).c_str());
234 __COUT__ <<
"Swap to import-db" << std::endl;
235 if(rename(currentDir.c_str(), tmpCurrentDir.c_str()) < 0)
237 __SS__ <<
"Problem!" << std::endl;
240 if(rename(importDir.c_str(), currentDir.c_str()) < 0)
242 __SS__ <<
"Problem!" << std::endl;
245 importedDbInPlace =
true;
251 cfgMgr->restoreActiveTableGroups(
true , pathToImportActiveGroups);
254 std::map<std::string, std::pair<std::string, TableGroupKey>> activeGroupsMap =
255 cfgMgr->getActiveTableGroups();
257 for(
const auto& activeGroup : activeGroupsMap)
259 if(activeGroup.second.second.isInvalid())
261 if(activeGroup.second.first ==
"")
264 __COUTV__(activeGroup.second.first);
265 __COUTV__(activeGroup.second.second);
268 std::pair<std::pair<std::string, TableGroupKey>, TableGroupKey>(
269 std::pair<std::string, TableGroupKey>(activeGroup.second.first,
270 activeGroup.second.second),
275 std::map<std::string, TableVersion> activeVersions = cfgMgr->getActiveVersions();
276 if(activeVersions.find(groupAliasesTableName) == activeVersions.end())
278 __SS__ <<
"\nActive version of " << groupAliasesTableName <<
" missing! "
279 << groupAliasesTableName
280 <<
" is a required member of the Backbone configuration group."
281 <<
"\n\nLikely you need to activate a valid Backbone group."
285 if(activeVersions.find(versionAliasesTableName) == activeVersions.end())
287 __SS__ <<
"\nActive version of " << versionAliasesTableName <<
" missing! "
288 << versionAliasesTableName
289 <<
" is a required member of the Backbone configuration group."
290 <<
"\n\nLikely you need to activate a valid Backbone group."
295 std::vector<std::pair<std::string, ConfigurationTree>> aliasNodePairs =
296 cfgMgr->getNode(groupAliasesTableName).getChildren();
297 std::string aliasName;
298 for(
auto& aliasPair : aliasNodePairs)
300 if(TableGroupKey(aliasPair.second.getNode(
"GroupKey").getValueAsString())
303 if(aliasPair.second.getNode(
"GroupName").getValueAsString() ==
"")
306 aliasName = aliasPair.second.getNode(
"GroupKeyAlias").getValueAsString();
310 if(aliasName[0] >=
'a' && aliasName[0] <=
'z')
312 aliasName = prependBaseName + aliasName;
313 __COUTV__(aliasName);
314 __COUTV__(aliasPair.second.getNode(
"GroupName").getValueAsString());
315 __COUTV__(aliasPair.second.getNode(
"GroupKey").getValueAsString());
319 if(existingGroupAliases.find(aliasName) != existingGroupAliases.end())
321 __SS__ <<
"Conflicting group alias '" << aliasName <<
"' found!" << __E__;
326 std::pair<std::pair<std::string, TableGroupKey>, TableGroupKey>(
327 std::pair<std::string, TableGroupKey>(
328 aliasPair.second.getNode(
"GroupName").getValueAsString(),
330 aliasPair.second.getNode(
"GroupKey").getValueAsString())),
333 originalGroupAliasMap[aliasName] = std::pair<std::string, TableGroupKey>(
334 aliasPair.second.getNode(
"GroupName").getValueAsString(),
335 TableGroupKey(aliasPair.second.getNode(
"GroupKey").getValueAsString()));
338 aliasNodePairs = cfgMgr->getNode(versionAliasesTableName).getChildren();
339 for(
auto& aliasPair : aliasNodePairs)
341 if(TableVersion(aliasPair.second.getNode(
"Version").getValueAsString())
344 if(aliasPair.second.getNode(
"TableName").getValueAsString() ==
"")
346 aliasName = aliasPair.second.getNode(
"VersionAlias").getValueAsString();
350 if(aliasName[0] >=
'a' && aliasName[0] <=
'z')
352 aliasName = prependBaseName + aliasName;
353 __COUTV__(aliasPair.second.getNode(
"TableName").getValueAsString());
354 __COUTV__(aliasName);
355 __COUTV__(aliasPair.second.getNode(
"Version").getValueAsString());
359 if(existingTableAliases.find(aliasName) != existingTableAliases.end())
361 __SS__ <<
"Conflicting table version alias '" << aliasName <<
"' found!"
366 originalTableAliasMap[aliasName] = std::pair<std::string, TableVersion>(
367 aliasPair.second.getNode(
"TableName").getValueAsString(),
368 TableVersion(aliasPair.second.getNode(
"Version").getValueAsString()));
371 catch(
const std::runtime_error& e)
373 __COUT_ERR__ <<
"There was a fatal error: " << e.what() << __E__;
375 __COUT__ <<
"Run the following to return to your previous database structure:"
377 __COUT__ <<
"\t otsdaq_flatten_system_aliases -1 " << backupDir <<
"\n\n"
383 __COUTV__(StringMacros::mapToString(existingGroupAliases));
384 __COUTV__(StringMacros::mapToString(existingTableAliases));
386 __COUT__ <<
"Identified groups:" << std::endl;
387 for(
auto& group : groupSet)
388 __COUT__ <<
"\t" << group.first.first <<
" " << group.first.second << std::endl;
390 __COUT__ <<
"Identified group aliases:" << std::endl;
391 for(
auto& groupAlias : originalGroupAliasMap)
392 __COUT__ <<
"\t" << groupAlias.first <<
" ==> " << groupAlias.second.first <<
"-"
393 << groupAlias.second.second << std::endl;
402 TableVersion newVersion;
403 TableGroupKey newKey;
406 std::string accumulateErrors =
"";
409 std::map<std::string, TableVersion> memberMap;
410 std::map<std::string , std::string > groupAliases;
411 std::string groupComment;
412 std::string groupAuthor;
413 std::string groupCreateTime;
414 time_t groupCreateTime_t;
415 TableBase* groupMetadataTable = cfgMgr->getMetadataTable();
417 __COUT__ <<
"Proceeding with handling of identified groups..." << __E__;
420 for(
auto& groupPair : groupSet)
429 __COUTV__(importedDbInPlace);
431 if(!importedDbInPlace)
433 __COUT__ <<
"Swap to import-db" << std::endl;
434 if(rename(currentDir.c_str(), tmpCurrentDir.c_str()) < 0)
436 __SS__ <<
"Problem!" << std::endl;
439 if(rename(importDir.c_str(), currentDir.c_str()) < 0)
441 __SS__ <<
"Problem!" << std::endl;
444 importedDbInPlace =
true;
450 __COUT__ <<
"****************************" << std::endl;
451 __COUT__ <<
"Loading members for " << groupPair.first.first <<
"("
452 << groupPair.first.second <<
")" << std::endl;
459 cfgMgr->loadTableGroup(groupPair.first.first,
460 groupPair.first.second,
472 catch(std::runtime_error& e)
474 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first
475 <<
"(" << groupPair.first.second <<
")" << std::endl;
476 __COUT__ << e.what() << std::endl;
481 __COUT__ <<
"Error was caught loading members for " << groupPair.first.first
482 <<
"(" << groupPair.first.second <<
")" << std::endl;
499 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
500 std::pair<std::string, TableGroupKey>(groupPair.first.first,
501 groupPair.first.second),
502 "Error caught loading the group."));
507 if(importedDbInPlace)
509 __COUT__ <<
"Swap to current-db" << std::endl;
510 if(rename(currentDir.c_str(), importDir.c_str()) < 0)
512 __SS__ <<
"Problem!" << std::endl;
515 if(rename(tmpCurrentDir.c_str(), currentDir.c_str()) < 0)
517 __SS__ <<
"Problem!" << std::endl;
520 importedDbInPlace =
false;
528 for(
auto& memberPair : memberMap)
530 __COUT__ << memberPair.first <<
":v" << memberPair.second << std::endl;
534 if(newTableVersionMap.find(std::pair<std::string, TableVersion>(
535 memberPair.first, memberPair.second)) != newTableVersionMap.end())
537 __COUT__ <<
"Table was already modified!" << std::endl;
539 newTableVersionMap[std::pair<std::string, TableVersion>(
540 memberPair.first, memberPair.second)];
541 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v"
542 << memberPair.second << std::endl;
548 config = cfgMgr->getTableByName(memberPair.first);
549 cfgView = config->getViewP();
551 newVersion = TableVersion::getNextVersion(
552 theInterface_->findLatestVersion(config));
553 __COUTV__(newVersion);
554 cfgView->setVersion(newVersion);
555 theInterface_->saveActiveVersion(config);
564 newTableVersionMap.insert(
565 std::pair<std::pair<std::string, TableVersion>, TableVersion>(
566 std::pair<std::string, TableVersion>(memberPair.first,
570 memberPair.second = newVersion;
572 __COUT__ <<
"\t to...\t" << memberPair.first <<
":v" << memberPair.second
576 __COUT__ <<
"Member map completed" << __E__;
577 __COUTV__(StringMacros::mapToString(memberMap));
582 __COUTV__(StringMacros::mapToString(groupAliases));
583 __COUTV__(groupComment);
584 __COUTV__(groupAuthor);
585 __COUTV__(groupCreateTime);
586 sscanf(groupCreateTime.c_str(),
"%ld", &groupCreateTime_t);
587 __COUTV__(groupCreateTime_t);
591 while(groupMetadataTable->getViewP()->getNumberOfRows() > 1)
592 groupMetadataTable->getViewP()->deleteRow(0);
593 if(groupMetadataTable->getViewP()->getNumberOfRows() == 0)
594 groupMetadataTable->getViewP()->addRow();
598 groupMetadataTable->getViewP()->setValue(
599 StringMacros::mapToString(
600 groupAliases,
"," ,
":" ),
602 ConfigurationManager::METADATA_COL_ALIASES);
603 groupMetadataTable->getViewP()->setValue(
604 groupComment, 0, ConfigurationManager::METADATA_COL_COMMENT);
605 groupMetadataTable->getViewP()->setValue(
606 groupAuthor, 0, ConfigurationManager::METADATA_COL_AUTHOR);
607 groupMetadataTable->getViewP()->setValue(
608 groupCreateTime_t, 0, ConfigurationManager::METADATA_COL_TIMESTAMP);
611 newVersion = TableVersion::getNextVersion(
612 theInterface_->findLatestVersion(groupMetadataTable));
613 __COUTV__(newVersion);
614 groupMetadataTable->getViewP()->setVersion(newVersion);
615 theInterface_->saveActiveVersion(groupMetadataTable);
618 memberMap[groupMetadataTable->getTableName()] =
619 groupMetadataTable->getViewVersion();
623 newKey = TableGroupKey::getNextKey(
624 theInterface_->findLatestGroupKey(groupPair.first.first));
629 theInterface_->saveTableGroup(
631 TableGroupKey::getFullGroupString(groupPair.first.first, newKey));
634 groupPair.second = newKey;
636 catch(std::runtime_error& e)
638 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" ("
639 << groupPair.first.second <<
") " << std::endl;
640 __COUT__ << e.what() << std::endl;
643 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
644 std::pair<std::string, TableGroupKey>(groupPair.first.first,
645 groupPair.first.second),
646 "Error caught saving the group."));
650 __COUT__ <<
"Error was caught saving group " << groupPair.first.first <<
" ("
651 << groupPair.first.second <<
") " << std::endl;
654 std::pair<std::pair<std::string, TableGroupKey>, std::string>(
655 std::pair<std::string, TableGroupKey>(groupPair.first.first,
656 groupPair.first.second),
657 "Error caught saving the group."));
665 __COUT__ <<
"Completed group and table saving for " << count <<
" groups." << __E__;
666 __COUT__ <<
"Created tables:" << std::endl;
667 for(
auto& tablePair : newTableVersionMap)
668 __COUT__ <<
"\t" << tablePair.first.first <<
"-v" << tablePair.first.second
669 <<
" ==> " << tablePair.second << std::endl;
671 __COUT__ <<
"Created groups:" << std::endl;
672 for(
auto& group : groupSet)
673 __COUT__ <<
"\t" << group.first.first <<
"(" << group.first.second <<
") ==> "
674 << group.second << std::endl;
678 if(importedDbInPlace)
680 __COUT__ <<
"Swap to current-db" << std::endl;
681 if(rename(currentDir.c_str(), importDir.c_str()) < 0)
683 __SS__ <<
"Problem!" << std::endl;
686 if(rename(tmpCurrentDir.c_str(), currentDir.c_str()) < 0)
688 __SS__ <<
"Problem!" << std::endl;
691 importedDbInPlace =
false;
696 FILE* fp = fopen((currentDir +
"/README_otsdaq_import.txt").c_str(),
"a");
699 __COUT__ <<
"\tError opening README file!" << std::endl;
707 timeinfo = localtime(&rawtime);
708 strftime(buffer, 200,
"%b %d, %Y %I:%M:%S%p %Z", timeinfo);
711 "This database...\t %s \t received an import from...\t %s \t at this "
712 "time \t %lu \t %s\n\n",
714 pathToImportDatabase.c_str(),
724 cfgMgr->restoreActiveTableGroups(
true );
734 __COUT__ <<
"Modifying the active Backbone table to reflect new table versions and "
743 std::string activeBackboneGroupName =
744 cfgMgr->getActiveGroupName(ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE);
745 cfgMgr->loadTableGroup(
746 activeBackboneGroupName,
747 cfgMgr->getActiveGroupKey(ConfigurationManager::ACTIVE_GROUP_NAME_BACKBONE),
753 std::map<std::string, TableVersion> activeMap = cfgMgr->getActiveVersions();
756 if(activeMap.find(groupAliasesTableName) != activeMap.end())
758 __COUT__ <<
"\n\nModifying " << groupAliasesTableName << std::endl;
759 config = cfgMgr->getTableByName(groupAliasesTableName);
760 cfgView = config->getViewP();
762 unsigned int col0 = cfgView->findCol(
"GroupKeyAlias");
763 unsigned int col1 = cfgView->findCol(
"GroupName");
764 unsigned int col2 = cfgView->findCol(
"GroupKey");
772 for(
auto& aliasPair : originalGroupAliasMap)
774 auto groupIt = groupSet.find(std::pair<std::string, TableGroupKey>(
775 aliasPair.second.first, aliasPair.second.second));
777 if(groupIt == groupSet.end())
780 <<
"Error! Could not find the new entry for the original group "
781 << aliasPair.second.first <<
"(" << aliasPair.second.second <<
")"
785 row = cfgView->addRow(
"import_aliases",
true );
786 cfgView->setValue(aliasPair.first, row, col0);
787 cfgView->setValue(aliasPair.second.first, row, col1);
788 cfgView->setValue(groupIt->second.toString(), row, col2);
795 if(activeMap.find(versionAliasesTableName) != activeMap.end())
797 __COUT__ <<
"\n\nModifying " << versionAliasesTableName << std::endl;
798 config = cfgMgr->getTableByName(versionAliasesTableName);
799 cfgView = config->getViewP();
800 unsigned int col0 = cfgView->findCol(
"VersionAlias");
801 unsigned int col1 = cfgView->findCol(
"TableName");
802 unsigned int col2 = cfgView->findCol(
"Version");
811 for(
auto& aliasPair : originalTableAliasMap)
814 newTableVersionMap.find(std::pair<std::string, TableVersion>(
815 aliasPair.second.first, aliasPair.second.second));
817 if(tableIt == newTableVersionMap.end())
820 <<
"Error! Could not find the new entry for the original table "
821 << aliasPair.second.first <<
"(" << aliasPair.second.second <<
")"
825 row = cfgView->addRow(
"import_aliases",
true );
826 cfgView->setValue(aliasPair.first, row, col0);
827 cfgView->setValue(aliasPair.second.first, row, col1);
828 cfgView->setValue(tableIt->second.toString(), row, col2);
837 config = cfgMgr->getTableByName(groupAliasesTableName);
838 cfgView = config->getViewP();
840 TableVersion::getNextVersion(theInterface_->findLatestVersion(config));
841 __COUTV__(newVersion);
842 cfgView->setVersion(newVersion);
843 theInterface_->saveActiveVersion(config);
845 memberMap[groupAliasesTableName] = newVersion;
848 __COUT__ <<
"\t to...\t" << groupAliasesTableName <<
":v"
849 << memberMap[groupAliasesTableName] << std::endl;
851 __COUT__ << versionAliasesTableName <<
":v" << memberMap[versionAliasesTableName]
854 config = cfgMgr->getTableByName(versionAliasesTableName);
855 cfgView = config->getViewP();
857 TableVersion::getNextVersion(theInterface_->findLatestVersion(config));
858 __COUTV__(newVersion);
859 cfgView->setVersion(newVersion);
860 theInterface_->saveActiveVersion(config);
862 memberMap[versionAliasesTableName] =
865 __COUT__ <<
"\t to...\t" << versionAliasesTableName <<
":v"
866 << memberMap[versionAliasesTableName] << std::endl;
868 __COUT__ <<
"Backbone member map completed" << __E__;
869 __COUTV__(StringMacros::mapToString(memberMap));
871 newKey = TableGroupKey::getNextKey(
872 theInterface_->findLatestGroupKey(activeBackboneGroupName));
877 theInterface_->saveTableGroup(
879 TableGroupKey::getFullGroupString(activeBackboneGroupName, newKey));
881 std::string renameFile =
882 ConfigurationManager::ACTIVE_GROUPS_FILENAME +
"." + nowTime;
883 rename(ConfigurationManager::ACTIVE_GROUPS_FILENAME.c_str(), renameFile.c_str());
885 __COUT__ <<
"Backing up '" << ConfigurationManager::ACTIVE_GROUPS_FILENAME
886 <<
"' to ... '" << renameFile <<
"'" << std::endl;
888 cfgMgr->activateTableGroup(activeBackboneGroupName,
892 catch(
const std::runtime_error& e)
894 __COUT_ERR__ <<
"There was a fatal error during backbone modification: "
895 << e.what() << __E__;
902 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups:" << std::endl;
903 for(
const auto& group : groupSet)
904 __COUT__ <<
"\t" << group.first.first <<
": " << group.first.second <<
" => "
905 << group.second << std::endl;
906 std::cout <<
"\n\n" << __COUT_HDR_FL__ <<
"Resulting Groups end." << std::endl;
910 __COUT__ <<
"End of Importing Active Table Groups!\n\n\n" << std::endl;
912 __COUT__ <<
"****************************" << std::endl;
913 __COUT__ <<
"There were " << groupSet.size() <<
" groups considered, and there were "
914 << groupErrors.size() <<
" errors found handling those groups." << std::endl;
915 __COUT__ <<
"The following errors were found handling the groups:" << std::endl;
916 for(
auto& groupErr : groupErrors)
917 __COUT__ <<
"\t" << groupErr.first.first <<
" " << groupErr.first.second <<
": \t"
918 << groupErr.second << std::endl;
919 __COUT__ <<
"End of errors.\n\n" << std::endl;
921 __COUT__ <<
"Run the following to return to your previous database structure:"
923 __COUT__ <<
"\t otsdaq_flatten_system_aliases -1 " << backupDir <<
"\n\n"
929 int main(
int argc,
char* argv[])
931 auto pset = artdaq::LoadParameterSet(argc,
933 "otsdaq_import_fhicl",
934 "Import a ParameterSet to the otsdaq database");
935 ImportSystemAliasTableGroups(pset);