Skip to content

Commit

Permalink
psftestraw checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lekez2005 committed Apr 20, 2021
1 parent 2870629 commit 262109b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
lib_LTLIBRARIES = libpsf.la

bin_PROGRAMS = psftest
bin_PROGRAMS = psftest psftestraw
psftest_SOURCES = psftest.cc
psftest_CXXFLAGS = -I../include ${BOOST_CPPFLAGS}
psftest_LDFLAGS = libpsf.la

psftestraw_SOURCES = psftest.cc
psftestraw_CXXFLAGS = -I../include ${BOOST_CPPFLAGS}
psftestraw_LDFLAGS = libpsf.la

libpsf_la_SOURCES = psf.cc psfdata.cc psfproperty.cc psfchunk.cc \
psfcontainer.cc psfindexedcontainer.cc psfgroup.cc psffile.cc \
psftype.cc psfstruct.cc psfsections.cc psftrace.cc \
Expand Down
27 changes: 16 additions & 11 deletions src/psftestraw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
int main(int argc, char *argv[]) {
char * filename = argv[1];

PSFDataSet data(filename);
data.open();
try{
PSFDataSet data(filename);
data.open();


PSFDoubleVector* vout = (PSFDoubleVector *) data.get_signal_vector("vout");
PSFDoubleVector* vout = (PSFDoubleVector *) data.get_signal_vector("i(vvdd)");

for (auto prop: data.get_header_properties()){
std::cout << prop.first << ": \t" << *prop.second << std::endl;
// for (auto prop: data.get_header_properties()){
// std::cout << prop.first << ": \t" << *prop.second << std::endl;
// }

// for (auto i = vout->begin(); i != vout->end(); ++i)
// std::cout << *i << ' ';

std::cout << "\nNumber of time points = " << vout->size() << std::endl;
data.close();
}catch (IncorrectChunk &exc){
std::cerr << "Exception caught " << exc.what() << "\n";
}

for (auto i = vout->begin(); i != vout->end(); ++i)
std::cout << *i << ' ';

std::cout << "\nNumber of time points = " << vout->size() << std::endl;
data.close();
}

0 comments on commit 262109b

Please sign in to comment.