Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
8ce56341
Commit
8ce56341
authored
17 years ago
by
Ruud Overeem
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1143: hostname can now be specified during load of components.
Default hostname is still dop50.astron.nl.
parent
df19dd48
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MAC/Deployment/data/bin/load_OTDB_comps.cc
+22
-10
22 additions, 10 deletions
MAC/Deployment/data/bin/load_OTDB_comps.cc
with
22 additions
and
10 deletions
MAC/Deployment/data/bin/load_OTDB_comps.cc
+
22
−
10
View file @
8ce56341
...
...
@@ -36,24 +36,36 @@ int main (int argc, char* argv[]) {
INIT_LOGGER
(
"logger.log_prop"
);
// check invocation syntax
if
(
argc
!=
3
)
{
cout
<<
"Usage: load_all_comps databasename orderFile"
<<
endl
;
return
(
1
);
}
string
dbName
,
hostname
,
orderFile
;
switch
(
argc
)
{
case
3
:
dbName
=
argv
[
1
];
hostname
=
"dop50.astron.nl"
;
orderFile
=
argv
[
2
];
break
;
case
4
:
dbName
=
argv
[
1
];
hostname
=
argv
[
2
];
orderFile
=
argv
[
3
];
break
;
default:
cout
<<
"Usage: load_all_comps databasename [hostname] orderFile"
<<
endl
;
cout
<<
" hostname defaults to dop50.astron.nl"
<<
endl
;
return
(
1
);
}
// check if file can be opened
ifstream
inFile
;
inFile
.
open
(
argv
[
2
]
);
inFile
.
open
(
orderFile
.
c_str
()
);
if
(
!
inFile
)
{
cout
<<
"ERROR: can not open order-file: "
<<
argv
[
2
]
<<
endl
;
cout
<<
"ERROR: can not open order-file: "
<<
orderFile
<<
endl
;
return
(
1
);
}
// Open the database connection
string
dbName
(
argv
[
1
]);
cout
<<
"### Using database "
<<
dbName
<<
" ###"
<<
endl
;
OTDBconnection
conn
(
"paulus"
,
"boskabouter"
,
dbName
);
cout
<<
"### Using database "
<<
dbName
<<
" at "
<<
hostname
<<
" ###"
<<
endl
;
OTDBconnection
conn
(
"paulus"
,
"boskabouter"
,
dbName
,
hostname
);
try
{
if
(
!
conn
.
connect
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment