00001 #include <string>
00002
00003 #include "boost/make_shared.hpp"
00004
00005 #include "MsgLogger/MsgLogger.h"
00006
00007 #include "Translator/HdfWriterEpicsPv.h"
00008 #include "Translator/epics.ddl.h"
00009
00010 using namespace Translator;
00011 using namespace std;
00012
00013 namespace {
00014
00015 const string logger(const string addTo="") {
00016 static const string base("Translator.HdfWriterEpicsPv");
00017 if (addTo.size()>0) {
00018 return base + std::string(".") + addTo;
00019 }
00020 return base;
00021 }
00022
00023 }
00024
00025 std::ostream & Translator::operator<<(std::ostream & o, HdfWriterEpicsPv::DispatchAction da) {
00026 if (da==HdfWriterEpicsPv::CreateWriteClose) o << "CreateWriteClose";
00027 else if (da==HdfWriterEpicsPv::CreateAppend) o << "CreateAppend";
00028 else if (da ==HdfWriterEpicsPv::Append) o << "Append";
00029 else o << "**unknown**";
00030 return o;
00031 }
00032
00033 HdfWriterEpicsPv::HdfWriterEpicsPv(const DataSetCreationProperties & oneElemDataSetCreationProperties,
00034 const DataSetCreationProperties & manyElemDataSetCreationProperties,
00035 boost::shared_ptr<HdfWriterEventId> hdfWriterEventId)
00036 : m_oneElemDataSetCreationProperties(oneElemDataSetCreationProperties),
00037 m_manyElemDataSetCreationProperties(manyElemDataSetCreationProperties),
00038 m_hdfWriterEventId(hdfWriterEventId)
00039 {
00040 m_hdfWriterGeneric = boost::make_shared<HdfWriterGeneric>("epics");
00041 }
00042
00043 void HdfWriterEpicsPv::closeDataset(hid_t groupId) {
00044 m_hdfWriterGeneric->closeDatasets(groupId);
00045 m_hdfWriterEventId->closeDataset(groupId);
00046 }
00047
00048 HdfWriterEpicsPv::~HdfWriterEpicsPv() {
00049 }
00050
00051
00052