本文整理汇总了C++中CDFData类的典型用法代码示例。如果您正苦于以下问题:C++ CDFData类的具体用法?C++ CDFData怎么用?C++ CDFData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CDFData类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BadFilenameTest
void CDFFileReaderTest::BadFilenameTest()
{
CDFData data;
CDFFileReader reader;
data.SetFilename("CDFMetaDataBad");
CPPUNIT_ASSERT_THROW(reader.Read(data, CDFFileReader::ReadSequential), affymetrix_calvin_exceptions::FileNotFoundException);
}
示例2: UnknownQCProbeSetNameTest
void CDFFileReaderTest::UnknownQCProbeSetNameTest()
{
CDFData data;
CDFFileReader reader;
reader.SetFilename(SMALL_QCCDF_FILE);
reader.Read(data, CDFFileReader::ReadByProbeSetName);
CDFQCProbeSetInformation info;
CPPUNIT_ASSERT_THROW(data.GetQCProbeSetInformation(L"hello", info), ProbeSetNotFoundException);
}
示例3: GetQCProbeSetInformationWithProbeSetNumberOutOfBoundsTest
void CDFFileReaderTest::GetQCProbeSetInformationWithProbeSetNumberOutOfBoundsTest()
{
CDFData data;
CDFFileReader reader;
reader.SetFilename(SMALL_QCCDF_FILE);
reader.Read(data, CDFFileReader::ReadByProbeSetNumber);
CDFQCProbeSetInformation info;
CPPUNIT_ASSERT_THROW(data.GetQCProbeSetInformation(11, info), ProbeSetNotFoundException);
}
示例4: ReadQCCDFProbeSetInformationOpenProbeNameModeInWrongMode
void CDFFileReaderTest::ReadQCCDFProbeSetInformationOpenProbeNameModeInWrongMode()
{
CDFData data;
CDFFileReader reader;
reader.SetFilename(SMALL_QCCDF_FILE);
reader.Read(data, CDFFileReader::ReadByProbeSetName);
CDFQCProbeSetInformation info;
CPPUNIT_ASSERT_THROW(data.GetQCProbeSetInformation(3, info), CDFAccessNotSupportedByModeException);
}
示例5: ReadCDFProbeSetInformationOpenProbeIndexModeInWrongMode
void CDFFileReaderTest::ReadCDFProbeSetInformationOpenProbeIndexModeInWrongMode()
{
CDFData data;
CDFFileReader reader;
reader.SetFilename(SMALL_CDF_FILE);
reader.Read(data, CDFFileReader::ReadByProbeSetNumber);
CDFProbeSetInformation info;
CPPUNIT_ASSERT_THROW(data.GetProbeSetInformation(L"hello", info), CDFAccessNotSupportedByModeException);
}
示例6: UseGetProbeSEtInformationTOReadQCCDFFileTest
void CDFFileReaderTest::UseGetProbeSEtInformationTOReadQCCDFFileTest()
{
CDFData data;
CDFFileReader reader;
reader.SetFilename(SMALL_QCCDF_FILE);
reader.Read(data, CDFFileReader::ReadByProbeSetNumber);
CDFProbeSetInformation info;
CPPUNIT_ASSERT_THROW(data.GetProbeSetInformation(0, info), ProbeSetNotFoundException);
CPPUNIT_ASSERT_THROW(data.GetProbeSetInformation(L"hello", info), ProbeSetNotFoundException);
}
示例7: CheckQCGetProbeSetName
void CDFFileReaderTest::CheckQCGetProbeSetName(CDFData& data)
{
int32_t probeSetCnt = data.GetProbeSetCnt();
wchar_t name[100];
for (int32_t i = 0; i < probeSetCnt; ++i)
{
FormatString1(name, 100, L"control_%d", i);
CPPUNIT_ASSERT(data.GetProbeSetName(i) == name);
}
}
示例8: GenericFileWriter
CDFCntrlFileWriter::CDFCntrlFileWriter(CDFData &p)
{
writer = new GenericFileWriter(p.GetFileHeader());
contentsPos = 0;
WriteHeaders();
dataGroupWriter = 0;
//skip ahead to the position of the first probe set dataSet
int32_t probes = p.GetProbeSetCnt();
int32_t size = probes * ((MAX_CDF_PROBE_SET_NAME_LENGTH * 2) + 8);
writer->SeekFromCurrentPos(size);
// Set the file position of the next DataGroup
writer->GetDataGroupWriter(0).UpdateNextDataGroupPos();
}
示例9: Read
void CDFFileReader::Read(CDFData& data, ReadMode mode)
{
data.Clear();
//data.GetGenericData().UseMemoryMapping(false);
GenericFileReader reader;
if (fileName.empty())
fileName = data.GetFilename();
reader.SetFilename(fileName);
reader.ReadHeader(data.GetGenericData(), GenericFileReader::ReadNoDataGroupHeader);
switch(mode)
{
case ReadSequential:
data.PrepareForSequentialAccess();
break;
case ReadByProbeSetNumber:
data.PrepareForAccessByProbeSetIndex();
break;
case ReadByProbeSetName:
data.PrepareForAccessByProbeSetName();
break;
default:
data.PrepareForSequentialAccess();
break;
}
}
示例10: ReadSmallCDFFileSeqModeTest
void CDFFileReaderTest::ReadSmallCDFFileSeqModeTest()
{
CDFData data;
CDFFileReader reader;
CPPUNIT_ASSERT_NO_THROW(reader.SetFilename(SMALL_CDF_FILE));
CPPUNIT_ASSERT_NO_THROW(reader.Read(data, CDFFileReader::ReadSequential));
int32_t probeSetCnt = data.GetProbeSetCnt();
for (int32_t i = 0; i < probeSetCnt; ++i)
{
CDFProbeSetInformation info;
data.GetProbeSetInformation(i, info);
CheckSmallCDFProbeSetInformation(i, info);
}
CheckGetProbeSetName(data);
}
示例11: ReadSmallCDFFileProbeSetNumberModeTest
void CDFFileReaderTest::ReadSmallCDFFileProbeSetNumberModeTest()
{
CDFData data;
CDFFileReader reader;
CPPUNIT_ASSERT_NO_THROW(reader.SetFilename(SMALL_CDF_FILE));
CPPUNIT_ASSERT_NO_THROW(reader.Read(data, CDFFileReader::ReadByProbeSetNumber));
int32_t probeSetCnt = data.GetProbeSetCnt();
// go backwards
for (int32_t i = probeSetCnt-1; i >= 0; --i)
{
CDFProbeSetInformation info;
data.GetProbeSetInformation(i, info);
CheckSmallCDFProbeSetInformation(i, info);
}
CheckGetProbeSetName(data);
}
示例12: ReadSmallQCCDFFileProbeSetNameModeTest
void CDFFileReaderTest::ReadSmallQCCDFFileProbeSetNameModeTest()
{
CDFData data;
CDFFileReader reader;
CPPUNIT_ASSERT_NO_THROW(reader.SetFilename(SMALL_QCCDF_FILE));
CPPUNIT_ASSERT_NO_THROW(reader.Read(data, CDFFileReader::ReadByProbeSetName));
int32_t probeSetCnt = data.GetProbeSetCnt();
// go backwards
for (int32_t i = probeSetCnt-1; i >= 0; --i)
{
wchar_t name[100];
FormatString1(name, 100, L"control_%d", i);
CDFQCProbeSetInformation info;
data.GetQCProbeSetInformation(name, info);
CheckSmallQCCDFProbeSetInformation(i, info);
}
CheckQCGetProbeSetName(data);
}
示例13: ReadSmallCDFFileBasicTest
void CDFFileReaderTest::ReadSmallCDFFileBasicTest()
{
CDFData data;
CDFFileReader reader;
CPPUNIT_ASSERT_NO_THROW(reader.SetFilename(SMALL_CDF_FILE));
CPPUNIT_ASSERT_NO_THROW(reader.Read(data));
CPPUNIT_ASSERT(data.GetFilename() == SMALL_CDF_FILE);
FileHeader* fh = data.GetFileHeader();
u_int32_t pos = fh->GetFirstDataGroupFilePos();
CPPUNIT_ASSERT(pos == 0x1BD);
CPPUNIT_ASSERT(data.GetProbeSetCnt() == 10);
CPPUNIT_ASSERT(data.GetArrayRows() == 10*2);
CPPUNIT_ASSERT(data.GetArrayCols() == 11);
}