Mercurial > hg > multitrack-audio-matcher
comparison src/OutputDataWriter.cpp @ 43:b7ad807c9cde
Added annotation writing and the src for the result calculator
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 04 May 2012 15:33:36 +0100 |
parents | |
children | e359b9bad811 |
comparison
equal
deleted
inserted
replaced
42:6a7982661703 | 43:b7ad807c9cde |
---|---|
1 /* | |
2 * outputDataWriter.cpp | |
3 * MultipleAudioMathcher | |
4 * | |
5 * Created by Andrew on 25/04/2012. | |
6 * Copyright 2012 QMUL. All rights reserved. | |
7 * | |
8 */ | |
9 | |
10 #include "OutputDataWriter.h" | |
11 | |
12 OutputDataWriter::OutputDataWriter(){ | |
13 filepath = "../../../data/output.txt"; | |
14 openFile(); | |
15 } | |
16 | |
17 void OutputDataWriter::writeOutput(const int& liveTime, const int& rehearsalTime, const int& playedRehearsalTime){ | |
18 | |
19 if (outputFile.is_open()){ | |
20 outputFile << liveTime/1000.0 << "\t" << rehearsalTime/1000.0 << "\t" << playedRehearsalTime/1000.0 << endl; | |
21 } | |
22 } | |
23 | |
24 void OutputDataWriter::openFile(){ | |
25 if (!outputFile.is_open()) | |
26 outputFile.open(filepath.c_str()); | |
27 } | |
28 | |
29 void OutputDataWriter::closeFile(){ | |
30 if (outputFile.is_open()) | |
31 outputFile.close(); | |
32 } |