Skip to content

Commit adaabb3

Browse files
committed
Use correct file extension
1 parent 461f5c2 commit adaabb3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/include/core/G3Reader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class G3Reader : public G3Module {
2121
off_t Tell();
2222

2323
protected:
24-
virtual void StartFile(const std::string &path);
24+
virtual void StartFile(const std::string &path, const std::string &ext=".g3");
2525
virtual G3FramePtr FillFrame();
2626
bool prefix_file_;
2727
std::string cur_file_;

core/src/G3Reader.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ G3Reader::G3Reader(const std::vector<std::string> &filename, int n_frames_to_rea
2727
filename_.pop_front();
2828
}
2929

30-
void G3Reader::StartFile(const std::string &path)
30+
void G3Reader::StartFile(const std::string &path, const std::string &ext)
3131
{
3232
log_info("Starting file %s\n", path.c_str());
3333
cur_file_ = path;
3434
n_frames_cur_ = 0;
35-
g3_istream_from_path(stream_, path, timeout_, buffersize_);
35+
g3_istream_from_path(stream_, path, timeout_, buffersize_, ext);
3636
}
3737

3838
G3FramePtr G3Reader::FillFrame()

gcp/src/ARCFileReader.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ARCFileReader : public G3Reader {
8888
size_t buffersize=1024*1024);
8989

9090
private:
91-
void StartFile(const std::string &path) override;
91+
void StartFile(const std::string &path, const std::string &ext=".dat") override;
9292
G3FramePtr FillFrame() override;
9393
void ReadHeader();
9494

@@ -156,11 +156,11 @@ void ARCFileReader::SetExperiment(Experiment exp)
156156
}
157157
}
158158

159-
void ARCFileReader::StartFile(const std::string & path)
159+
void ARCFileReader::StartFile(const std::string &path, const std::string &ext)
160160
{
161161
// Open file, including whatever decompression/network access/etc.
162162
// may be required
163-
G3Reader::StartFile(path);
163+
G3Reader::StartFile(path, ext);
164164

165165
ReadHeader();
166166
}

0 commit comments

Comments
 (0)