Programmering i C++

On this page, you'll find material relevant to our internal course in C++ programming.

If you want the class that made boxslides, get it here (boxslides.cls).

You can also obtain the code via HEHIs CVS repository. The commad is:

  cvs -d /hehi13/hehi/hehi_cvs checkout oocourse/session<num>

where <num> is the session your intrested in.

1. Session

Overview

This session wil try to give some motivation for classes and objects. Also, we'll see how to declare and define classes, and how to make objects of classes. We'll briefly encounter pointers. Finally we'll use the privous in a short ROOT session.

Topics

Materials

Transperancies in English (PostScript)
Paper in English (PostScript 2 per page)
Transperancies in Danish (PostScript)
Paper in Danish (PostScript 2 per page)
C++ code (tar archive)

Top of page

2. Session

Overview

We'll start by simplifing our Particle from the last session, by using constructors, inline methods, and more classes. We'll make a new class representing a magnet, and send particles through such a Magnet object.
In the course of this session, we'll see howt to split our code into smaller parts, and how to combine them into a program.

Topics

Materials

Transperantcies in Danish (PostScript)
Papier in Danish (PostScript 2 per page)
C++ kode (tar arkiv)

Top of page

3. Session

Overview

Due to poor participation last session, and some techincal deficulties, the contents of this session will be the same as session 2.

Topics

Materials

The material of this sessio is the same as for session 2 (see above).

Top of page

4. Session

Overview

We'll continue with our Particle and Magnet classes, and add a Hodoscope class. This leads to inheritance, which is a crucial point in Object Orienteret Programming.

We'll get to a sort of Mini Geant, where we are free to add any kind of detector, order hieracily to arbiteary depths.

The code for Mini Geant, and the HTML docuumentation, made by ROOT, is avaliable here.

Topics

Materials

Transperantcies in English (PostScript)
Paper in English (PostScript 2 per page)
Transperantcies in Danish (PostScript)
Paper in Danish (PostScript 2 per page)
C++ kode (tar arkiv)
MiniGeant (tar arkiv)

Top of page

Links

There are a lot of stuff on C++ on the web, so I've only listed those I find reasonabley good myself.

Top of page

Other stuff

This course was given by Anders Holm (e-mail: aholm@nbi.dk) and Christian Holm (e-mail: cholm@nbi.dk).

Top of page