PPT Slide
3. Next write the code for the “DatumFileReader”. This reads one line from a file and uses it to create and initialise a Datum.
To do this we need to be specific about the method names and arguments. This has been defined for you in:
ComptonAnalysis/datumfr.h
Write the implementation code (I.e. the datumfr.c file) to match the method declarations given in this file.
Test it out by writing a simple test program which opens a file and then uses datumfr in a loop to create Datum(s) which you then print out using the dump() method. For this purpose you are given a file with data in it
ComptonAnalysis/compton.dat
A working solution supplied in:
ComptonAnalysis/datumfr.c