Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Apd Toolbox
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jan Reher
Apd Toolbox
Commits
234aac3f
Commit
234aac3f
authored
5 years ago
by
Jan Reher
Browse files
Options
Downloads
Patches
Plain Diff
Added program to query the batch (before and after irradiation) of a list of APDs.
parent
847e5d5a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
getbatch.cpp
+41
-0
41 additions, 0 deletions
getbatch.cpp
with
41 additions
and
0 deletions
getbatch.cpp
0 → 100644
+
41
−
0
View file @
234aac3f
// Basic
#include
<fstream>
#include
<iostream>
#include
<iomanip>
#include
<string>
#include
<vector>
// Boost
#include
<boost/program_options.hpp>
// Custom
#include
"ProdDbAccess.h"
#include
"toolbox.cpp"
using
namespace
std
;
namespace
po
=
boost
::
program_options
;
static
string
fileName
=
"serials.dat"
;
int
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
<
2
)
{
cerr
<<
"ERROR: Missing parameters! Please provide the name of a text file containing the serials needed."
<<
endl
;
exit
(
1
);
}
if
(
argc
>
2
)
{
cerr
<<
"ERROR: Too many parameters! Please only provide the name of a text file containing the serials needed."
<<
endl
;
exit
(
1
);
}
ProdDbAccess
*
_dba
=
new
ProdDbAccess
();
fileName
=
string
(
argv
[
1
]);
vector
<
string
>
apdSerials
=
loadSerialsFromFileName
(
fileName
);
for
(
size_t
i
=
0
;
i
<
apdSerials
.
size
()
;
i
++
)
{
if
(
apdSerials
[
i
].
size
()
==
9
)
apdSerials
[
i
]
=
"0"
+
apdSerials
[
i
];
cout
<<
"S/N: "
<<
apdSerials
[
i
]
<<
" New: "
<<
_dba
->
getBatchNew
(
uint
(
stoul
(
apdSerials
[
i
]
)
)
)
<<
" Old: "
<<
_dba
->
getBatchIrr
(
uint
(
stoul
(
apdSerials
[
i
]
)
)
)
<<
endl
;
}
return
0
;
}
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