Physics and Engineering of Radiation Detection

(Martin Jones) #1

600 Chapter 10. Software for Data Analysis


of a flow diagram is a standard and very useful procedure but it is not universally
practiced specially for smaller programs.


10.2.CCodeGeneration


After the algorithm has been developed, the next step is to implement it in a pro-
gramming language. At this point the developer has to decide on a particular
language for coding the algorithm. Practically speaking, most of the times this deci-
sion is based on the personal liking and experience of the developer for a particular
language. However, one should take into account at least the following factors while
deciding on a language.


Amount of computations

Available computing power

Display requirements

Code re-usability requirement

Code expandability requirement

The first two of these requirements are not of much significance due to the avail-
ability of today’s computing power. It is arguable whether the languages specially
designed for scientific computing, such as Fortran, are actually more efficient than
other languages, such as C or C++, or not. Therefore the earlier trend of writing sci-
entific codes in Fortran has now shifted to C++, which provides the user with more
flexibility and better designing power as compared to Fortran. The codes written in
C++ comprise of small segments calledClasses, which can actually be reused. This
strong feature ofobject orientedlanguages has revolutionized the program design
and development.


10.2.DResultDisplay


Displaying the results is perhaps the most difficult of the tasks as it requires special
programming skills. The difficulty also comes from the fact that the display methods
depend on the platform. One method that works well on an machine running under
Microsoft Windows may not work at all on a Unix based system. This difficulty can
be overcome by using a language that is platform independent, such as Java.

Free download pdf