Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bedtools2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
R3
legacy
bedtools2
Commits
88ac8da9
Commit
88ac8da9
authored
11 years ago
by
nkindlon
Browse files
Options
Downloads
Patches
Plain Diff
added fifo handling
parent
8085e45a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp
+5
-0
5 additions, 0 deletions
src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp
src/utils/FileRecordTools/FileReaders/InputStreamMgr.h
+2
-0
2 additions, 0 deletions
src/utils/FileRecordTools/FileReaders/InputStreamMgr.h
with
7 additions
and
0 deletions
src/utils/FileRecordTools/FileReaders/InputStreamMgr.cpp
+
5
−
0
View file @
88ac8da9
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include
"gzstream.h"
#include
"gzstream.h"
#include
"CompressionTools.h"
#include
"CompressionTools.h"
const
char
*
InputStreamMgr
::
FIFO_STRING_LITERAL
=
"/dev/fd"
;
InputStreamMgr
::
InputStreamMgr
(
const
QuickString
&
filename
,
bool
buildScanBuffer
)
InputStreamMgr
::
InputStreamMgr
(
const
QuickString
&
filename
,
bool
buildScanBuffer
)
:
:
_filename
(
filename
),
_filename
(
filename
),
...
@@ -55,6 +57,9 @@ bool InputStreamMgr::init()
...
@@ -55,6 +57,9 @@ bool InputStreamMgr::init()
}
}
_pushBackStreamBuf
=
new
PushBackStreamBuf
(
cin
.
rdbuf
());
_pushBackStreamBuf
=
new
PushBackStreamBuf
(
cin
.
rdbuf
());
}
else
{
}
else
{
if
(
strncmp
(
_filename
.
c_str
(),
FIFO_STRING_LITERAL
,
strlen
(
FIFO_STRING_LITERAL
))
==
0
)
{
_isStdin
=
true
;
}
_inputFileStream
=
new
ifstream
(
_filename
.
c_str
());
_inputFileStream
=
new
ifstream
(
_filename
.
c_str
());
if
(
_inputFileStream
->
fail
())
{
if
(
_inputFileStream
->
fail
())
{
cerr
<<
"Error: Unable to open file "
<<
_filename
<<
". Exiting."
<<
endl
;
cerr
<<
"Error: Unable to open file "
<<
_filename
<<
". Exiting."
<<
endl
;
...
...
This diff is collapsed.
Click to expand it.
src/utils/FileRecordTools/FileReaders/InputStreamMgr.h
+
2
−
0
View file @
88ac8da9
...
@@ -52,6 +52,8 @@ private:
...
@@ -52,6 +52,8 @@ private:
static
const
int
SCAN_BUFFER_SIZE
=
4096
;
// 4 K buffer
static
const
int
SCAN_BUFFER_SIZE
=
4096
;
// 4 K buffer
static
const
int
MIN_SCAN_BUFFER_SIZE
=
2048
;
static
const
int
MIN_SCAN_BUFFER_SIZE
=
2048
;
int
_numBytesInBuffer
;
//this will hold the length of the buffer after the scan.
int
_numBytesInBuffer
;
//this will hold the length of the buffer after the scan.
static
const
char
*
FIFO_STRING_LITERAL
;
bool
bamDetected
(
int
numChars
,
int
currChar
);
bool
bamDetected
(
int
numChars
,
int
currChar
);
void
decompressBuffer
();
void
decompressBuffer
();
...
...
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