DataWriter.cc
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* DataWriter.cc
*
* Created on: Nov 14, 2012
* Author: AKKA IS
*/
#include "DataWriter.hh"
#include "Parameter.hh"
#include "ParamData.hh"
namespace AMDA {
namespace Parameters {
log4cxx::LoggerPtr DataWriter::_logger(log4cxx::Logger::getLogger("AMDA-Kernel.DataWriter"));
DataWriter::DataWriter(Parameter ¶meter) :
_parameter(parameter),
_signatureTrigger("") {
}
DataWriter::DataWriter(const DataWriter &pDataWriter, Parameter &pParameter) :
_parameter(pParameter),
_timeIntervalList(pDataWriter._timeIntervalList),
_paramData(),
_signatureTrigger(pDataWriter._signatureTrigger) {
//_paramData not copied, must a be different instance of pDataWriter
}
DataWriter::~DataWriter() {
}
TimeStamp DataWriter::init(TimeIntervalListSPtr pTimeIntervalList) {
LOG4CXX_DEBUG(_logger, "DataWriter => Initialise data writer for parameter: " << _parameter.getId());
_timeIntervalList = pTimeIntervalList;
TimeStamp timeStamp = init();
updateInfo(_parameter);
return timeStamp;
}
ParameterManager &DataWriter::getParameterManager() {
return _parameter.getParameterManager();
}
void DataWriter::updateInfo(Parameter & /*parameter*/) {
//nothing to do - each param getter can override this method to update specific param info
}
} /* namespace Parameters */
} /* namespace AMDA */