Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VKSort
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
AUSA
Oliskir
VKSort
Commits
79fbc863
Commit
79fbc863
authored
7 years ago
by
Oliver Kirsebom
Browse files
Options
Downloads
Patches
Plain Diff
files were not being added in correct order - now fixed!
parent
6205c0ed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/vklib/VKSortedWriter.h
+6
-0
6 additions, 0 deletions
include/vklib/VKSortedWriter.h
sort.cpp
+7
-4
7 additions, 4 deletions
sort.cpp
source/VKSortedWriter.cpp
+6
-0
6 additions, 0 deletions
source/VKSortedWriter.cpp
source/VKSorter.cpp
+4
-0
4 additions, 0 deletions
source/VKSorter.cpp
with
23 additions
and
4 deletions
include/vklib/VKSortedWriter.h
+
6
−
0
View file @
79fbc863
...
...
@@ -47,6 +47,12 @@ namespace VEIKONKONE {
* Close sorter.
*/
void
close
();
/*
* Save meta data to output file.
* @param n Meta data.
*/
void
saveInfo
(
TNamed
&
n
);
private:
void
setup
();
...
...
This diff is collapsed.
Click to expand it.
sort.cpp
+
7
−
4
View file @
79fbc863
...
...
@@ -45,7 +45,7 @@ int main( int argc, char* argv[] ){
{
vector
<
string
>
input
;
findFiles
(
run
,
input
);
if
(
input
.
size
()
==
0
)
{
cout
<<
"Unable to find any files with run number "
<<
run
<<
endl
;
return
0
;
...
...
@@ -183,13 +183,16 @@ void findFiles(int run, vector<string>& input)
fname
=
file
->
GetName
();
if
(
!
file
->
IsDirectory
())
{
if
(
fname
.
EndsWith
(
Form
(
"%04d_ch000.txt"
,
run
)))
{
input
.
push_back
(
fname
.
Data
());
if
(
input
.
size
()
<
1
)
input
.
resize
(
1
);
input
[
0
]
=
fname
.
Data
();
}
else
if
(
fname
.
EndsWith
(
Form
(
"%04d_ch001.txt"
,
run
)))
{
input
.
push_back
(
fname
.
Data
());
if
(
input
.
size
()
<
2
)
input
.
resize
(
2
);
input
[
1
]
=
fname
.
Data
();
}
else
if
(
fname
.
EndsWith
(
Form
(
"%04d_ch002.txt"
,
run
)))
{
input
.
push_back
(
fname
.
Data
());
if
(
input
.
size
()
<
3
)
input
.
resize
(
3
);
input
[
2
]
=
fname
.
Data
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
source/VKSortedWriter.cpp
+
6
−
0
View file @
79fbc863
...
...
@@ -104,3 +104,9 @@ void VKSortedWriter::clear()
}
}
void
VKSortedWriter
::
saveInfo
(
TNamed
&
n
)
{
n
.
Write
();
}
This diff is collapsed.
Click to expand it.
source/VKSorter.cpp
+
4
−
0
View file @
79fbc863
...
...
@@ -24,6 +24,10 @@ VKSorter::VKSorter(vector<shared_ptr<VKRawReader>>& _readers, string output, Dou
writer
=
make_unique
<
VKSortedWriter
>
(
n
,
output
);
// log coincidence window to file
TNamed
info
(
"VetoWindow"
,
Form
(
"%.1f us"
,
window
));
writer
->
saveInfo
(
info
);
trigger
=
vector
<
bool
>
(
n
,
true
);
a0
=
vector
<
double
>
(
n
,
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