Prototyping general MPI support for IO::FileManager.
Currently supports a single read process, and N number of worker nodes, that receive data only via message-passing from the master process.

As prototype I've made produce_alignment_histograms MPI-aware, by adding a single line of code.
This makes it possible to execute this via mpiexec -np NUMBER_OF_PROCESSES produce_alignment_histograms, which will spawn N processes, distributed over the nodes, as you setup in the job script.

Only supports ACQt Files for now, ACROOT files are TODO, as well as generalizing this to N reader processes and M worker processes.
Make MPI support a qmake option: CONFIG += ENABLE_MPI. Disable MPI by default, for non-MPI aware platforms.
Merge branch 'dev' into mpi_prototype
Import progress-bar from systemx_plots.
Actually set -DENABLE_MPI when invoking qmake with CONFIG += ENABLE_MPI, this got lost.
MPI support: Use two seperated buffers when reading in a file. Once a chunk is read, start sending async via MPI, switch to a different buffer, and start reading again from disk, to avoid most i/o lags. Then wait until the job completed, switch buffers, send async again, and start reading, and so on..
Make the number of reader processes configurable, as well as the number of consumers per reader task, eg.: put this in your config file:
[MPI]
NumberOfReaders=50
NumberOfConsumersPerReader=4

and run following (eg. interactively right from your shell at HPC cluster):
mpirun -n 250 -x ACROOTDATADIR -x ACROOTLOOKUPS produce_alignment_histograms --inputlist B620_pass4_5.4.0_PWT_1000_files.list

This will finish in under 8 minutes. This example creates 50 reader tasks, and 4 consumer tasks per reader = 250 total tasks.
Reader 1 will distribute 1000/50 files from file [0,1000/5), and sends the first chunk of the file to consumer 50, the next to 51, 52, 53, and again to 50.
Reader 2 will distribute 1000/50 files from file [1000/5,1000/5*2), sending the first chunk to consumer 54, then to 55, 56, 57, and again to 54.
And so-on.

While Reader X is sending a new ACQt chunk to a consumer, it already pre-fetches the next chunk from disk. Once the first chunk is send, the next chunk can immediately be send, and the pre-fetching starts again. This is inspired by Jens buffer switching in speedycalib, and implemented in a similar way.

This is still all preliminary and needs testing, but it works fine w/o crashes, and the performance improvements are large.
produce_alignment_histograms was used for testing, in order to get realistic results, instead of just pure I/O testing.

We also need to test this with CONDOR on our cluster, if openmpi support is available.
Merge branch 'dev' into mpi_prototype

Conflicts:
	detector/TrdDetector.C
	io/FileManager.C
	io/FileManager.hh
	io/FileManagerACQt.C
	programs/trd_calibration/produce_alignment_histograms/produce_alignment_histograms.C
Merge branch 'dev' into mpi_prototype
Adapted FileManagerACQt::TransmitACQtFile's OpenACQtFileIfNeeded to changed dev.

TODO: Check if we also have to load the database here.
Commented a function to make code compile with -Werror.
Merge branch 'dev' into mpi_prototype
Merge branch 'dev' into mpi_prototype
Make MPI work again after the dev merge last week.
Now only some smaller issues remain to be fixed before this is actually usable.
Stop opening all files once from every MPI task just to get access to all run headers in the run list, and the time of the first & last event.
Instead only let the master reader proces (0) open the file list, and then stream the current run header via MPI and also the first & last event time stamp + the ACQt version.
This is sufficient to have correct time binning on all tasks.
Make MPI support fully work. The resulting selectors & histos are fine now (all events are distributed & processed).
Next step: bind tasks to specific nodes (eg. max 2 readers per batch node, with N consumers, so that N + 2 = max number of processes that can be run in parallel on the node).
Otherwhise it's unpredictable where the readers are allocated. It doesn't make sense to have several batch nodes that only start eg. 24 readers, this has to be distributed to get good I/O performance.
Make it easy to see from which task the debug output is coming from:

nz257662@cluster:~/BatchJobs/mpitest[528]$ time mpirun -c bulldc -x ACSOFT_COLOUR_OUTPUT -x ACROOTSOFTWARE -x ACROOTLOOKUPS -n 2 produce_alignment_histograms --include mpisettings.cfg --inputlist test.list
1   | MPIEnvironment> Initialize MPI environment, process 1 on linuxbmc0002.rz.RWTH-Aachen.DE out of 2
0   | MPIEnvironment> Initialize MPI environment, process 0 on linuxbmc0002.rz.RWTH-Aachen.DE out of 2
0   | MPIEnvironment> Number of reader tasks: 1 Number of consumer tasks per reader task: 1. Expecting 2 MPI processes.
0   | BadRunManager> Adding default run lists...
..
Fix MPI process layout: fill up one node completly first, before going to the other, to assure that not all readers are executed on the same machine.

eg. for 1 node with 24 cores, and 4 readers per _node_:
0, 1, 2, 3 = readers
4..8   = consumers, fed by reader 0
9..13  = consumers, fed by reader 1
14..18 = consumers, fed by reader 2
19..23 = consumers, fed by reader 3

The same layout is used for all other other nodes.
This is a huge performance improvement.
Cosmetics, make the output nicer.
Insert MPI barriers in performance uncritical places in order to synchronize stdout when initializing, to make the node layout easy to understand:

nz257662@cluster:~/BatchJobs/mpitest[516]$ time mpirun -c bulldc -x ACSOFT_COLOUR_OUTPUT -x ACROOTSOFTWARE -x ACROOTLOOKUPS -n 24 produce_alignment_histograms --include mpisettings.cfg --inputlist test.list
0   | MPIEnvironment> Number of nodes: 1 Number of cores per node: 24 Number of readers per node: 4. Expecting 24 MPI processes.
0   | MPIEnvironment> Initialize MPI Reader  : process 0    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, first consumer task: 4    last consumer task: 8   )
1   | MPIEnvironment> Initialize MPI Reader  : process 1    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, first consumer task: 9    last consumer task: 13  )
2   | MPIEnvironment> Initialize MPI Reader  : process 2    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, first consumer task: 14   last consumer task: 18  )
3   | MPIEnvironment> Initialize MPI Reader  : process 3    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, first consumer task: 19   last consumer task: 23  )
4   | MPIEnvironment> Initialize MPI Consumer: process 4    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 0   )
5   | MPIEnvironment> Initialize MPI Consumer: process 5    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 0   )
6   | MPIEnvironment> Initialize MPI Consumer: process 6    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 0   )
7   | MPIEnvironment> Initialize MPI Consumer: process 7    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 0   )
8   | MPIEnvironment> Initialize MPI Consumer: process 8    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 0   )
9   | MPIEnvironment> Initialize MPI Consumer: process 9    on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 1   )
10  | MPIEnvironment> Initialize MPI Consumer: process 10   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 1   )
11  | MPIEnvironment> Initialize MPI Consumer: process 11   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 1   )
12  | MPIEnvironment> Initialize MPI Consumer: process 12   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 1   )
13  | MPIEnvironment> Initialize MPI Consumer: process 13   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 1   )
14  | MPIEnvironment> Initialize MPI Consumer: process 14   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 2   )
15  | MPIEnvironment> Initialize MPI Consumer: process 15   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 2   )
16  | MPIEnvironment> Initialize MPI Consumer: process 16   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 2   )
17  | MPIEnvironment> Initialize MPI Consumer: process 17   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 2   )
18  | MPIEnvironment> Initialize MPI Consumer: process 18   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 2   )
19  | MPIEnvironment> Initialize MPI Consumer: process 19   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 3   )
20  | MPIEnvironment> Initialize MPI Consumer: process 20   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 3   )
21  | MPIEnvironment> Initialize MPI Consumer: process 21   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 3   )
22  | MPIEnvironment> Initialize MPI Consumer: process 22   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 3   )
23  | MPIEnvironment> Initialize MPI Consumer: process 23   on linuxbmc0002.rz.RWTH-Aachen.DE           out of 24 (on node: 0, associated sender task: 3   )
...