]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
These are broken because AliMUONData has been split into 3 different classes and...
authorszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:52:23 +0000 (04:52 +0000)
committerszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:52:23 +0000 (04:52 +0000)
HLT/MUON/src/AliRoot/TrackSink.cxx [deleted file]
HLT/MUON/src/AliRoot/TrackSink.hpp [deleted file]
HLT/MUON/src/AliRoot/TriggerRecord.cxx [deleted file]
HLT/MUON/src/AliRoot/TriggerRecord.hpp [deleted file]
HLT/MUON/src/AliRoot/TriggerSource.cxx [deleted file]
HLT/MUON/src/AliRoot/TriggerSource.hpp [deleted file]

diff --git a/HLT/MUON/src/AliRoot/TrackSink.cxx b/HLT/MUON/src/AliRoot/TrackSink.cxx
deleted file mode 100644 (file)
index 9aa1dba..0000000
+++ /dev/null
@@ -1,601 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/* AliHLTMUONTrackSink is used as the output target object by AliHLTMUONMicrodHLT.
-   It is just a fancy buffer to store tracks that are found by the dHLT
-   algorithm.
- */
-#include "AliRoot/TrackSink.hpp"
-#include "AliRoot/Base.hpp"
-
-ClassImp(AliHLTMUONTrackSink)
-ClassImp(AliHLTMUONTrackSink::AliEventData)
-
-
-AliHLTMUONTrackSink::AliHLTMUONTrackSink() :
-       TObject(),
-       fFilename(""), fFoldername(""), fEventIndex(-1),
-       fCurrentEvent(NULL), fBlockIndex(-1), fCurrentBlock(NULL),
-       fTrackIndex(-1), fCurrentTrack(NULL),
-       fEventList(AliHLTMUONTrackSink::AliEventData::Class())
-{
-// Default constructor
-
-       fFilename = "";
-       fFoldername = "";
-       ResetAllPointers();
-}
-
-
-AliHLTMUONTrackSink::~AliHLTMUONTrackSink()
-{
-// destructor.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::~AliHLTMUONTrackSink()");
-       fEventList.Clear("C");
-}
-
-
-void AliHLTMUONTrackSink::AddEvent(Int_t eventnumber)
-{
-// Adds a new AliEventData block to the fEventList and updates internal pointers.
-// Cannot have duplicate event numbers so this method will display an error
-// message if one attempts to add the same event number more than once.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::AddEvent(" << eventnumber << ")");
-       
-       if (eventnumber < 0)
-       {
-               Error("AddEvent", "The event number must be positive, got: %d", eventnumber);
-               return;
-       };
-       
-       // Make sure that the event number is not already added to the list of events.
-       TIter next(&fEventList);
-       AliEventData* current;
-       while ((current = (AliEventData*)next()))
-       {
-               if (current->EventNumber() == eventnumber)
-               {
-                       Error("AddEvent", "The event number %d is already stored.", eventnumber);
-                       return;
-               };
-       };
-       
-       fEventIndex = fEventList.GetEntriesFast();
-       new ( fEventList[fEventIndex] ) AliEventData(eventnumber); 
-       fCurrentEvent = (AliEventData*) fEventList[fEventIndex];
-       
-       // Remember to reset the other pointers because the new event is empty.
-       ResetBlockPointers();
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-void AliHLTMUONTrackSink::AddBlock()
-{
-// Adds a new block to the current event and updates fCurrentBlock and
-// fCurrentTrack.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::AddBlock()");
-       
-       if (fCurrentEvent == NULL)
-       {
-               Error("AddBlock", "No event selected.");
-               return;
-       };
-       
-       fBlockIndex = fCurrentEvent->Blocks().GetEntriesFast();
-       new ( fCurrentEvent->Blocks()[fBlockIndex] ) TClonesArray(AliHLTMUONTrack::Class());
-       fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[fBlockIndex];
-       
-       // Remember to reset the track pointer because the new block is empty.
-       ResetTrackPointers();
-
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-void AliHLTMUONTrackSink::AddTrack(const AliHLTMUONTrack& track)
-{
-// Adds the given track to the current block.
-// If no current block is selected then an error message is displayed.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::AddTrack()");
-
-       if (fCurrentBlock == NULL)
-       {
-               Error("AddTrack", "No block selected.");
-               return;
-       };
-       
-       fTrackIndex = fCurrentBlock->GetEntriesFast();
-       new ( (*fCurrentBlock)[fTrackIndex] ) AliHLTMUONTrack(track);
-       fCurrentTrack = (AliHLTMUONTrack*) (*fCurrentBlock)[fTrackIndex];
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-AliHLTMUONTrack* AliHLTMUONTrackSink::AddTrack()
-{
-// Adds a new track to the current event and block, and returns a pointer
-// to this track object to be filled by the caller.
-// The fCurrentTrack is updated appropriately.
-// If no current block is selected then NULL is returned.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::AddTrack()");
-
-       if (fCurrentBlock == NULL)
-       {
-               Error("AddTrack", "No block selected.");
-               return NULL;
-       };
-       
-       fTrackIndex = fCurrentBlock->GetEntriesFast();
-       fCurrentTrack = (AliHLTMUONTrack*) fCurrentBlock->New(fTrackIndex);
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-       return fCurrentTrack;
-};
-
-
-void AliHLTMUONTrackSink::AddTrack(
-               Int_t triggerid, Int_t sign, Float_t momentum,
-               Float_t pt, const AliHLTMUONPoint hits[10], const AliHLTMUONRegion regions[10]
-       )
-{
-// Adds the specified track parameters as a new track.
-// The fCurrentTrack is updated appropriately.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::AddTrack(" << triggerid << ", " << sign << ", "
-               << momentum << ", " << pt << ", " << (void*)(&hits[0]) << ", "
-               << (void*)(&regions[0]) << ")"
-       );
-
-       if (fCurrentBlock == NULL)
-       {
-               Error("AddTrack", "No block selected.");
-               return;
-       };
-       
-       fTrackIndex = fCurrentBlock->GetEntriesFast();
-       new ( (*fCurrentBlock)[fTrackIndex] ) AliHLTMUONTrack(triggerid, sign, momentum, pt, hits, regions);
-       fCurrentTrack = (AliHLTMUONTrack*) (*fCurrentBlock)[fTrackIndex];
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-void AliHLTMUONTrackSink::SetNames(const AliHLTMUONTriggerSource* triggersource)
-{
-// Sets the internal file and folder names from the trigger source.
-
-       fFilename = triggersource->FileName();
-       fFoldername = triggersource->FolderName();
-}
-
-
-void AliHLTMUONTrackSink::Clear(Option_t* /*option*/)
-{
-// Clears all the internal arrays.
-
-       fFilename = "";
-       fFoldername = "";
-       ResetAllPointers();
-       fEventList.Clear("C");
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetEvent(Int_t eventnumber) const
-{
-// Fetches the event data corresponding to the given event number.
-// Sets the current block and track to the first block and track for 
-// the newly selected event.
-// If there are no blocks or tracks then these pointers are set to NULL.
-// kTRUE is returned if the event was found. kFALSE is returned if the
-// event was not found and the internal pointers left untouched.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetEvent(" << eventnumber << ")" );
-       
-       // Try find the corresponding event in the list of events.
-       for (Int_t i = 0; i < fEventList.GetEntriesFast(); i++)
-       {
-               AliEventData* current = (AliEventData*) fEventList[i];
-               if (current->EventNumber() == eventnumber)
-               {
-                       fEventIndex = i;
-                       fCurrentEvent = current;
-                       GetFirstBlock();
-                       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                               << " , fTrackIndex = " << fTrackIndex
-                       );
-                       return kTRUE;
-               }
-       }
-       return kFALSE;
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetFirstEvent() const
-{
-// Fetches the first event stored in this AliHLTMUONTrackSink.
-// Sets the current block and track to the first block and track of the
-// first event.
-// If there are no blocks or tracks then these pointers are set to NULL.
-// kFALSE is returned if there are no events stored, kTRUE is returned
-// on success.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetFirstEvent()");
-       if (fEventList.GetEntriesFast() > 0)
-       {
-               fEventIndex = 0;
-               fCurrentEvent = (AliEventData*) fEventList[0];
-               GetFirstBlock();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kFALSE;
-       }
-}
-
-
-Bool_t AliHLTMUONTrackSink::MoreEvents() const
-{
-// Returns kTRUE if there are more events to iterate over, kFALSE otherwise.
-
-       return 0 <= fEventIndex && fEventIndex < fEventList.GetEntriesFast();
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetNextEvent() const
-{
-// Fetches the next event stored following the currently selected one.
-// Sets the current block and track pointers to the first block and track
-// in the newly selected event. These pointers are set to NULL if there
-// are no blocks or tracks for this event.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetNextEvent()");
-       if (fEventIndex < fEventList.GetEntriesFast() - 1)
-       {
-               fCurrentEvent = (AliEventData*) fEventList[ ++fEventIndex ];
-               GetFirstBlock();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               ResetAllPointers();
-               return kFALSE;
-       };
-};
-
-
-Int_t AliHLTMUONTrackSink::CurrentEvent() const
-{
-// Returns the corresponding AliRoot event number for the current event.
-// -1 is returned if no event is selected.
-
-       if (fCurrentEvent != NULL)
-               return fCurrentEvent->EventNumber();
-       else
-               return -1;
-}
-
-
-Int_t AliHLTMUONTrackSink::NumberOfBlocks() const
-{
-// Returns the number of track blocks in the current event.
-// -1 is returned if no event is selected.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::NumberOfBlocks()");
-       if (fCurrentEvent == NULL)
-       {
-               Error("NumberOfBlocks", "No event selected.");
-               return -1;
-       }
-       else
-               return fCurrentEvent->Blocks().GetEntriesFast();
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetBlock(Int_t index) const
-{
-// Fetches the index'th block in the current event.
-// Sets the current track to the first track in the block.
-// If there are no tracks then the track pointers are reset.
-// kTRUE is returned if the block was found, kFALSE otherwise.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetBlock(" << index << ")");
-       
-       // Note NumberOfBlocks() also checks if the event was selected.
-       Int_t numberofblocks = NumberOfBlocks();
-       if (numberofblocks < 0) return kFALSE;
-
-       if ( 0 <= index && index < numberofblocks )
-       {
-               fBlockIndex = index;
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[index];
-               GetFirstTrack();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               // The index is out of bounds so inform the user.
-               if (numberofblocks > 0)
-                       Error(  "GetBlock",
-                               "The block index (%d) is out of bounds. Valid range is [0, %d]",
-                               index, numberofblocks - 1
-                       );
-               else
-                       Error(  "GetBlock",
-                               "The block index (%d) is out of bounds. No blocks found.",
-                               index
-                       );
-               return kFALSE;
-       }
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetFirstBlock() const
-{
-// Fetches the first block in the current event.
-// Sets the current track to the first track in the block.
-// If there are no tracks then the fCurrentTracks pointer is set to NULL.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetFirstBlock()");
-       // Note: NumberOfBlocks() also checks if fCurrentEvent != NULL.
-       if (NumberOfBlocks() > 0)
-       {
-               fBlockIndex = 0;
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[fBlockIndex];
-               GetFirstTrack();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kTRUE;
-       }
-       else
-               return kFALSE;
-}
-
-
-Bool_t AliHLTMUONTrackSink::MoreBlocks() const
-{
-// Returns kTRUE if there are more blocks to iterate over.
-
-       return 0 <= fBlockIndex && fBlockIndex < NumberOfBlocks();
-}
-
-
-Bool_t AliHLTMUONTrackSink::GetNextBlock() const
-{
-// Fetches the next block in the current event.
-// kTRUE is returned if the block was found, kFALSE otherwise.
-// The current track pointers are reset if no more blocks are found.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetNextBlock()");
-
-       // Note: NumberOfBlocks() checks if fCurrentEvent != NULL. If it is then it returns -1
-       // and since fBlockIndex is always >= -1 the if statement must go to the else part.
-       if (fBlockIndex < NumberOfBlocks() - 1)
-       {
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[ ++fBlockIndex ];
-               GetFirstTrack();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               ResetBlockPointers();
-               return kFALSE;
-       }
-}
-
-
-Int_t AliHLTMUONTrackSink::NumberOfTracks() const
-{
-// Returns the number of tracks in the current block.
-// -1 is returned if no block is selected.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::NumberOfTracks()");
-       if (fCurrentBlock == NULL)
-       {
-               Error("NumberOfTracks", "No block selected.");
-               return -1;
-       }
-       else
-               return fCurrentBlock->GetEntriesFast();
-};
-
-
-const AliHLTMUONTrack* AliHLTMUONTrackSink::GetTrack(Int_t index) const
-{
-// Fetches the index'th track in the current block.
-// NULL is returned if the track was not found.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetTrack(" << index << ")");
-
-       // Note NumberOfTracks() also checks if the event and block was selected.
-       Int_t numberoftracks = NumberOfTracks();
-       if (numberoftracks < 0) return NULL;
-       
-       if ( 0 <= index && index < numberoftracks )
-       {
-               fTrackIndex = index;
-               fCurrentTrack = (AliHLTMUONTrack*) fCurrentBlock->At(index);
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return fCurrentTrack;
-       }
-       else
-       {
-               // The index is out of bounds so inform the user.
-               if (numberoftracks > 0)
-                       Error(  "GetTrack",
-                               "The track index (%d) is out of bounds. Valid range is [0, %d]",
-                               index, numberoftracks - 1
-                       );
-               else
-                       Error(  "GetTrack",
-                               "The track index (%d) is out of bounds. No tracks found.",
-                               index
-                       );
-               return NULL;
-       }
-}
-
-
-const AliHLTMUONTrack* AliHLTMUONTrackSink::GetFirstTrack() const
-{
-// Fetches the first track in the current block.
-// NULL is returned if the track was not found.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetFirstTrack()");
-       // Note: NumberOfTracks() also checks if fCurrentBlock != NULL.
-       if (NumberOfTracks() > 0)
-       {
-               fTrackIndex = 0;
-               fCurrentTrack = (AliHLTMUONTrack*) fCurrentBlock->At(0);
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return fCurrentTrack;
-       }
-       else
-               return NULL;
-}
-
-
-Bool_t AliHLTMUONTrackSink::MoreTracks() const
-{
-// Returns kTRUE if there are more tracks to iterate over in
-// the current block. kFALSE is returned otherwise.
-
-       return 0 <= fTrackIndex && fTrackIndex < NumberOfTracks();
-}
-
-
-const AliHLTMUONTrack* AliHLTMUONTrackSink::GetNextTrack() const
-{
-// Fetches the next track in the current block.
-// NULL is returned if the track was not found.
-
-       DebugMsg(1, "AliHLTMUONTrackSink::GetNextTrack()");
-       
-       // Note: NumberOfTracks() checks if fCurrentBlock != NULL. If it is then it returns -1
-       // and since fTrackIndex is always >= -1 the if statement must go to the else part.
-       if (fTrackIndex < NumberOfTracks() - 1)
-       {
-               fCurrentTrack = (AliHLTMUONTrack*) fCurrentBlock->At( ++fTrackIndex );
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTrackIndex = " << fTrackIndex
-               );
-               return fCurrentTrack;
-       }
-       else
-       {
-               ResetTrackPointers();
-               return NULL;
-       }
-}
-
-
-void AliHLTMUONTrackSink::ResetAllPointers() const
-{
-// Sets all the current pointers to NULL and indices to -1.
-
-       fEventIndex = -1;
-       fCurrentEvent = NULL;
-       fBlockIndex = -1;
-       fCurrentBlock = NULL;
-       fTrackIndex = -1;
-       fCurrentTrack = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-void AliHLTMUONTrackSink::ResetBlockPointers() const
-{
-// Sets the block and track pointers to NULL and indices to -1.
-
-       fBlockIndex = -1;
-       fCurrentBlock = NULL;
-       fTrackIndex = -1;
-       fCurrentTrack = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-void AliHLTMUONTrackSink::ResetTrackPointers() const
-{
-// Sets just the current track pointer to NULL and index to -1.
-
-       fTrackIndex = -1;
-       fCurrentTrack = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTrackIndex = " << fTrackIndex
-       );
-}
-
-
-AliHLTMUONTrackSink::AliEventData::AliEventData()
-       : fEventNumber(-1), fBlocks(TClonesArray::Class())
-{
-       fEventNumber = -1;
-}
-
-
-AliHLTMUONTrackSink::AliEventData::AliEventData(Int_t eventnumber)
-       : fEventNumber(eventnumber), fBlocks(TClonesArray::Class())
-{
-// Creates a new event data block with the specified event number.
-
-       fEventNumber = eventnumber;
-       
-       // If the following is not set then we do not write the fBlocks properly.
-       fBlocks.BypassStreamer(kFALSE);
-}
-
-
-AliHLTMUONTrackSink::AliEventData::~AliEventData()
-{
-       DebugMsg(1, "AliHLTMUONTrackSink::AliEventData::~AliEventData()");
-       fBlocks.Clear("C");
-}
-
diff --git a/HLT/MUON/src/AliRoot/TrackSink.hpp b/HLT/MUON/src/AliRoot/TrackSink.hpp
deleted file mode 100644 (file)
index 1609d05..0000000
+++ /dev/null
@@ -1,245 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/* AliHLTMUONTrackSink is used as the output target object by AliHLTMUONMicrodHLT.
-   It is just a fancy buffer to store tracks that are found by the dHLT
-   algorithm.
- */
-
-#ifndef ALIHLTMUONTRACKSINK_H
-#define ALIHLTMUONTRACKSINK_H
-
-#include "TROOT.h"
-#include "TObject.h"
-#include "TString.h"
-#include "TClonesArray.h"
-#include "AliRoot/Track.hpp"
-#include "AliRoot/TriggerSource.hpp"
-
-#include <vector>
-
-
-class AliHLTMUONTrackSink : public TObject
-{
-public:
-
-       AliHLTMUONTrackSink();
-       virtual ~AliHLTMUONTrackSink();
-       
-       /* Adds a new AliEventData block to the fEventList and updates internal pointers.
-          Cannot have duplicate event numbers so this method will display an error
-          message if one attempts to add the same event number more than once.
-        */ 
-       void AddEvent(Int_t eventnumber);
-       
-       /* Adds a new block to the current event and updates fCurrentBlock and
-          fCurrentTrack.
-        */
-       void AddBlock();
-       
-       /* Adds a new track to the current event and block, and returns a pointer
-          to this track object to be filled by the caller.
-          The fCurrentTrack is updated appropriately.
-          If no current block is selected then NULL is returned.
-        */
-       AliHLTMUONTrack* AddTrack();
-       
-       /* Adds the given track to the current block.
-          If no current block is selected then an error message is displayed.
-        */
-       void AddTrack(const AliHLTMUONTrack& track);
-       
-       /* Adds the specified track parameters as a new track.
-          The fCurrentTrack is updated appropriately.
-        */
-       void AddTrack(
-                       Int_t triggerid, Int_t sign, Float_t momentum,
-                       Float_t pt, const AliHLTMUONPoint hits[10], const AliHLTMUONRegion regions[10]
-               );
-       
-       /* Sets the internal file and folder names from the trigger source.
-        */
-       void SetNames(const AliHLTMUONTriggerSource* triggersource);
-       
-       /* Clears all the internal arrays.
-        */
-       virtual void Clear(Option_t* option = "");
-       
-       // Get methods for file and folder names.
-       TString FileName()   const { return fFilename; }
-       TString FolderName() const { return fFoldername; }
-       
-       /* Returns the number of events stored.
-        */
-       Int_t NumberOfEvents() const { return fEventList.GetEntriesFast(); };
-       
-       /* Fetches the event data corresponding to the given event number.
-          Sets the current block and track to the first block and track for 
-          the newly selected event.
-          If there are no blocks or tracks then these pointers are set to NULL.
-          kTRUE is returned if the event was found. kFALSE is returned if the
-          event was not found and the internal pointers left untouched.
-        */
-       Bool_t GetEvent(Int_t eventnumber) const;
-       
-       /* Fetches the first event stored in this AliHLTMUONTrackSink.
-          Sets the current block and track to the first block and track of the
-          first event.
-          If there are no blocks or tracks then these pointers are set to NULL.
-          kFALSE is returned if there are no events stored, kTRUE is returned
-          on success.
-        */
-       Bool_t GetFirstEvent() const;
-       
-       /* Returns kTRUE if there are more events to iterate over,
-          kFALSE otherwise.
-        */
-       Bool_t MoreEvents() const;
-       
-       /* Fetches the next event stored following the currently selected one.
-          Sets the current block and track pointers to the first block and track
-          in the newly selected event. These pointers are set to NULL if there
-          are no blocks or tracks for this event.
-        */
-       Bool_t GetNextEvent() const;
-       
-       /* Returns the corresponding AliRoot event number for the current event.
-          -1 is returned if no event is selected.
-        */
-       Int_t CurrentEvent() const;
-       
-       /* Returns the number of track blocks in the current event.
-          -1 is returned if no event is selected.
-        */
-       Int_t NumberOfBlocks() const;
-       
-       /* Fetches the index'th block in the current event.
-          Sets the current track to the first track in the block.
-          If there are no tracks then the track pointers are reset.
-          kTRUE is returned if the block was found, kFALSE otherwise.
-        */
-       Bool_t GetBlock(Int_t index) const;
-       
-       /* Fetches the first block in the current event.
-          Sets the current track to the first track in the block.
-          If there are no tracks then the fCurrentTracks pointer is set to NULL.
-        */
-       Bool_t GetFirstBlock() const;
-       
-       /* Returns kTRUE if there are more blocks to iterate over.
-        */
-       Bool_t MoreBlocks() const;
-       
-       /* Fetches the next block in the current event.
-          kTRUE is returned if the block was found, kFALSE otherwise.
-          The current track pointers are reset if no more blocks are found.
-        */
-       Bool_t GetNextBlock() const;
-       
-       /* Returns the current block index number.
-          -1 is returned if no block was selected.
-        */
-       Int_t CurrentBlock() const { return fBlockIndex; };
-       
-       /* Returns the number of tracks in the current block.
-          -1 is returned if no block is selected.
-        */
-       Int_t NumberOfTracks() const;
-       
-       /* Fetches the index'th track in the current block.
-          NULL is returned if the track was not found.
-        */
-       const AliHLTMUONTrack* GetTrack(Int_t index) const;
-       
-       /* Fetches the first track in the current block.
-          NULL is returned if the track was not found.
-        */
-       const AliHLTMUONTrack* GetFirstTrack() const;
-       
-       /* Returns kTRUE if there are more tracks to iterate over in
-          the current block. kFALSE is returned otherwise.
-        */
-       Bool_t MoreTracks() const;
-       
-       /* Fetches the next track in the current block.
-          NULL is returned if the track was not found.
-        */
-       const AliHLTMUONTrack* GetNextTrack() const;
-       
-       /* Returns the currently selected track.
-          NULL is returned if there is no track selected.
-        */
-       const AliHLTMUONTrack* GetTrack() const { return fCurrentTrack; };
-       
-       /* Returns the currently selected track index.
-          -1 is returned if no track was selected.
-        */
-       Int_t CurrentTrack() const { return fTrackIndex; };
-
-
-public:  // Unfortunately ROOT requires the following to be public.
-
-       class AliEventData : public TObject
-       {
-       public:
-               AliEventData();
-               AliEventData(Int_t eventnumber);
-               virtual ~AliEventData();
-
-               Int_t& EventNumber() { return fEventNumber; }
-               TClonesArray& Blocks() { return fBlocks; }
-
-       private:
-       
-               Int_t fEventNumber;  // Event number for this set of track blocks.
-               TClonesArray fBlocks;  // The list of track blocks for this event.
-               
-               ClassDef(AliEventData, 1);  // Data per event.
-       };
-
-private:
-
-       // Do not allow copying of this object.
-       AliHLTMUONTrackSink(const AliHLTMUONTrackSink& /*object*/)
-               : TObject(),
-                 fFilename(""), fFoldername(""), fEventIndex(-1),
-                 fCurrentEvent(NULL), fBlockIndex(-1), fCurrentBlock(NULL),
-                 fTrackIndex(-1), fCurrentTrack(NULL),
-                 fEventList(AliHLTMUONTrackSink::AliEventData::Class())
-       {}
-
-       AliHLTMUONTrackSink& operator = (const AliHLTMUONTrackSink& /*object*/) { return *this; }
-
-       /* Sets all the current pointers to NULL and indices to -1.
-        */
-       void ResetAllPointers() const;
-       
-       /* Sets the block and track pointers to NULL and indices to -1.
-        */
-       void ResetBlockPointers() const;
-       
-       /* Sets just the current track pointer to NULL and index to -1.
-        */
-       void ResetTrackPointers() const;
-
-       TString fFilename;    // The file from which the track data was taken.
-       TString fFoldername;  // The folder name from which track data was taken.
-       
-       mutable Int_t fEventIndex;            //! The current event index number.
-       mutable AliEventData* fCurrentEvent;     //! Pointer to the currently selected event.
-       mutable Int_t fBlockIndex;            //! The current block index number.
-       mutable TClonesArray* fCurrentBlock;  //! Pointer to the currently selected block.
-       mutable Int_t fTrackIndex;            //! The current track index number.
-       mutable AliHLTMUONTrack* fCurrentTrack;         //! Pointer to the currently selected track.
-
-       TClonesArray fEventList;  // List of tracks per event.
-
-       ClassDef(AliHLTMUONTrackSink, 1)  // The data sink for track blocks for dHLT.
-};
-
-
-#endif // ALIHLTMUONTRACKSINK_H
diff --git a/HLT/MUON/src/AliRoot/TriggerRecord.cxx b/HLT/MUON/src/AliRoot/TriggerRecord.cxx
deleted file mode 100644 (file)
index 6b86c0b..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "AliRoot/TriggerRecord.hpp"
-#include "TMath.h"
-
-ClassImp(AliHLTMUONTriggerRecord)
-
-
-AliHLTMUONTriggerRecord::AliHLTMUONTriggerRecord() :
-       TObject(), fTriggerNumber(-1), fParticleSign(0), fPt(0), fSt1Point(), fSt2Point()
-{
-// Default constructor initialises everything to zero and the trigger number to -1.
-
-       Init();
-}
-
-
-AliHLTMUONTriggerRecord::AliHLTMUONTriggerRecord(
-               Int_t triggernumber, Int_t sign, Float_t pt,
-               const AliHLTMUONPoint& station1point, const AliHLTMUONPoint& station2point
-       ) :
-       TObject(), fTriggerNumber(-1), fParticleSign(0), fPt(0), fSt1Point(), fSt2Point()
-{
-// Creates a trigger record from the specified parameters.
-// Note: the trigger number must be greater or equal to zero. The particle
-// sign must also be one of the following values: -1, 0 or +1
-// Pt must be a positive number.
-// If these conditions are not met then an error message is displayed and
-// the object is filled like it is in the default constructor. 
-
-       if (triggernumber < 0)
-       {
-               Init();
-               Error("AliHLTMUONTriggerRecord",
-                       "The trigger number must be a positive number. Got: %d",
-                       triggernumber
-               );
-       }
-       else if (sign < -1 || +1 < sign)
-       {
-               Init();
-               Error("AliHLTMUONTriggerRecord",
-                       "The particle sign must a value of -1, 0 or +1. Got: %d",
-                       sign
-               );
-       }
-       else if (pt < 0.0)
-       {
-               Init();
-               Error("AliHLTMUONTriggerRecord",
-                       "The transverse momentum must be a positive number. Got: %f",
-                       pt
-               );
-       }
-       else
-       {
-               fTriggerNumber = triggernumber;
-               fParticleSign = sign;
-               fPt = pt;
-               fSt1Point = station1point;
-               fSt2Point = station2point;
-       }
-}
-
-
-void AliHLTMUONTriggerRecord::Init()
-{
-// Performs internal initialisation for the constructors.
-
-       fTriggerNumber = -1;
-       fParticleSign = 0;
-       fPt = 0.0;
-}
-
-
-void AliHLTMUONTriggerRecord::TriggerNumber(Int_t value)
-{
-// Set method for the trigger number. 
-// The trigger number must be positive when assigning the trigger number.
-// If it is not then an error message is displayed and the internal value
-// remains untouched.
-
-       if (value >= 0)
-               fTriggerNumber = value;
-       else
-               Error("TriggerNumber",
-                       "The trigger number must be a positive number. Got: %d",
-                       value
-               );
-}
-
-
-void AliHLTMUONTriggerRecord::ParticleSign(Int_t value)
-{
-// Set method for the particle sign.
-// The particle sign must be one of the following values: -1, 0 or +1
-// If it is not then an error message is displayed and the internal value
-// remains untouched.
-
-       if (-1 <= value && value <= +1)
-               fParticleSign = value;
-       else
-               Error("ParticleSign",
-                       "The particle sign must a value of -1, 0 or +1. Got: %d",
-                       value
-               );
-}
-
-
-void AliHLTMUONTriggerRecord::Pt(Float_t value)
-{
-// Set method for the particle Pt, as measured by the L0 trigger.
-// The pt must be a positive number when assigning the pt.
-// If it is not then an error message is displayed and the internal value
-// remains untouched.
-
-       if (value >= 0)
-               fPt = value;
-       else
-               Error("Pt",
-                       "The transverse momentum must be a positive number. Got: %f",
-                       value
-               );
-}
-
-
-ostream& operator << (ostream& os, const AliHLTMUONTriggerRecord& r)
-{
-       os << "{trig#: " << r.fTriggerNumber << ", sign: " << r.fParticleSign
-          << ", pt: " << r.fPt << ", st1: " << r.fSt1Point << ", st2: "
-          << r.fSt2Point << "}";
-       return os;
-}
-
diff --git a/HLT/MUON/src/AliRoot/TriggerRecord.hpp b/HLT/MUON/src/AliRoot/TriggerRecord.hpp
deleted file mode 100644 (file)
index 36cd45b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONTRIGGERRECORD_H
-#define ALIHLTMUONTRIGGERRECORD_H
-
-#include <TObject.h>
-#include "AliRoot/Point.hpp"
-#include "AliHLTMUONUtils.h"
-
-
-class AliHLTMUONTriggerRecord : public TObject
-{
-       // ostream operator usefull for text output.
-       friend ostream& operator << (ostream& os, const AliHLTMUONTriggerRecord& r);
-       
-public:
-
-       /* Default constructor initialises everything to zero and the trigger
-          number to -1.
-        */
-       AliHLTMUONTriggerRecord();
-       
-       /* Creates a trigger record from the specified parameters.
-          Note: the trigger number must be greater or equal to zero. The particle
-          sign must also be one of the following values: -1, 0 or +1
-          Pt must be a positive number.
-          If these conditions are not met then an error message is displayed and
-          the object is filled like it is in the default constructor. 
-        */
-       AliHLTMUONTriggerRecord(
-                       Int_t triggernumber, Int_t sign, Float_t pt,
-                       const AliHLTMUONPoint& station1point, const AliHLTMUONPoint& station2point
-               );
-
-       virtual ~AliHLTMUONTriggerRecord() {};
-       
-       /* Get/Set method for the trigger number. 
-          The trigger number must be positive when assigning the trigger number.
-          If it is not then an error message is displayed and the internal value
-          remains untouched.
-        */
-       void TriggerNumber(Int_t value);
-       Int_t TriggerNumber() const { return fTriggerNumber; };
-       
-       /* Get/Set method for the particle sign.
-          The particle sign must be one of the following values: -1, 0 or +1
-          If it is not then an error message is displayed and the internal value
-          remains untouched.
-        */
-       void ParticleSign(Int_t value);
-       Int_t ParticleSign() const { return fParticleSign; };
-       
-       /* Get/Set method for the particle Pt, as measured by the L0 trigger.
-          The pt must be a positive number when assigning the pt.
-          If it is not then an error message is displayed and the internal value
-          remains untouched.
-        */
-       void Pt(Float_t value);
-       Float_t Pt() const { return fPt; };
-       
-       /* Get/Set methods for the two trigger stations.
-        */
-       void Station1Point(const AliHLTMUONPoint& value) { fSt1Point = value; };
-       AliHLTMUONPoint& Station1Point() { return fSt1Point; };
-       const AliHLTMUONPoint& Station1Point() const { return fSt1Point; };
-       void Station2Point(const AliHLTMUONPoint& value) { fSt2Point = value; };
-       AliHLTMUONPoint& Station2Point() { return fSt2Point; };
-       const AliHLTMUONPoint& Station2Point() const { return fSt2Point; };
-       
-
-private:
-
-       // Performs internal initialisation for the constructors.
-       void Init();
-
-       Int_t fTriggerNumber;  // The trigger number/index in AliMUONDataInterface.
-       Int_t fParticleSign;   // -1 = negative, 0 = unknown, +1 = positive.
-       Float_t fPt;           // Transverse momentum of the particle.
-       AliHLTMUONPoint fSt1Point;       // Coordinate on trigger station 1.
-       AliHLTMUONPoint fSt2Point;       // Coordinate on trigger station 2.
-
-       ClassDef(AliHLTMUONTriggerRecord, 1)  // Trigger information.
-};
-
-
-#endif // ALIHLTMUONTRIGGERRECORD_H
diff --git a/HLT/MUON/src/AliRoot/TriggerSource.cxx b/HLT/MUON/src/AliRoot/TriggerSource.cxx
deleted file mode 100644 (file)
index 505af68..0000000
+++ /dev/null
@@ -1,1078 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/* AliHLTMUONTriggerSource is used to extract L0 trigger information for
-   the muon spectrometer from a simulated event stored in .root files by AliRoot.
-   It is used by the AliHLTMUONMicrodHLT class as a input data set for the
-   dHLT algorithm.
- */
-#include "AliRoot/TriggerSource.hpp"
-#include "AliRoot/Base.hpp"
-#include "Tracking/Calculations.hpp"
-#include "AliRun.h"
-#include "AliRunLoader.h"
-#include "AliModule.h"
-#include "AliMUON.h"
-#include "AliMUONConstants.h"
-#include "AliMUONHit.h"
-//#include "AliMUONLocalTrigger.h"
-//#include "AliMUONTriggerCircuit.h"
-#include "AliMUONDataInterface.h"
-#include "TDatabasePDG.h"
-#ifndef __alpha
-#include <math.h>
-#else
-#include <float.h>
-#endif
-
-ClassImp(AliHLTMUONTriggerSource)
-ClassImp(AliHLTMUONTriggerSource::AliEventData)
-
-
-AliHLTMUONTriggerSource::AliHLTMUONTriggerSource()
-       : TObject(),
-         fAreaToUse(kFromWholePlane), fDataToUse(kFromLocalTriggers),
-         fMaxBlockSize(0xFFFFFFFF), fUseLookupTable(kTRUE),
-         fFilename(""), fFoldername(""),
-         fEventIndex(-1), fCurrentEvent(NULL),
-         fBlockIndex(-1), fCurrentBlock(NULL),
-         fTriggerIndex(-1), fCurrentTrigger(NULL),
-         fEventList(AliHLTMUONTriggerSource::AliEventData::Class()),
-         fHadToLoadgAlice(kFALSE)
-{
-// Default constructor.
-
-       fAreaToUse = kFromWholePlane;
-       fDataToUse = kFromLocalTriggers;
-       fMaxBlockSize = 0xFFFFFFFF;
-       fUseLookupTable = kTRUE;
-       fFilename = "";
-       fFoldername = "";
-       ResetAllPointers();
-       fHadToLoadgAlice = kFALSE;
-}
-
-
-AliHLTMUONTriggerSource::AliHLTMUONTriggerSource(AliMUONDataInterface* data)
-       : TObject(),
-         fAreaToUse(kFromWholePlane), fDataToUse(kFromLocalTriggers),
-         fMaxBlockSize(0xFFFFFFFF), fUseLookupTable(kTRUE),
-         fFilename(""), fFoldername(""),
-         fEventIndex(-1), fCurrentEvent(NULL),
-         fBlockIndex(-1), fCurrentBlock(NULL),
-         fTriggerIndex(-1), fCurrentTrigger(NULL),
-         fEventList(AliHLTMUONTriggerSource::AliEventData::Class()),
-         fHadToLoadgAlice(kFALSE)
-{
-// Creates a new trigger source object by filling data from the data interface.
-
-       fAreaToUse = kFromWholePlane;
-       fDataToUse = kFromLocalTriggers;
-       fMaxBlockSize = 0xFFFFFFFF;
-       fUseLookupTable = kTRUE;
-       fFilename = "";
-       fFoldername = "";
-       ResetAllPointers();
-       fHadToLoadgAlice = kFALSE;
-       FillFrom(data);
-}
-
-
-AliHLTMUONTriggerSource::~AliHLTMUONTriggerSource()
-{
-       fEventList.Delete();
-}
-
-
-void AliHLTMUONTriggerSource::FillFrom(AliMUONDataInterface* data)
-{
-// Fills the internal data structures from the specified data interface
-// for all the events found in AliMUONDataInterface.
-          
-       DebugMsg(1, "FillFrom(AliMUONDataInterface*)");
-       
-       if (FileAndFolderOk(data))
-       {
-               AliMUON* module = NULL;
-               if ( ! FetchAliMUON(module) ) return;
-               
-               for (Int_t i = 0; i < data->NumberOfEvents(); i++)
-               {
-                       AddEventFrom(data, module, i);
-               }
-               
-               FinishedWithAliMUON();
-       }
-}
-
-
-void AliHLTMUONTriggerSource::FillFrom(AliMUONDataInterface* data, Int_t event)
-{
-// Fills the internal data structures from the specified data interface
-// for the given event.
-
-       DebugMsg(1, "FillFrom(AliMUONDataInterface*, Int_t)");
-       
-       if (FileAndFolderOk(data))
-       {
-               AliMUON* module = NULL;
-               if ( ! FetchAliMUON(module) ) return;
-               AddEventFrom(data, module, event);
-               FinishedWithAliMUON();
-       }
-}
-
-
-void AliHLTMUONTriggerSource::FillFrom(
-               AliMUONDataInterface* data,
-               Int_t event, Int_t trigger, Bool_t newblock
-       )
-{
-// Fills the internal data structures from the specified data interface
-// for the given event and trigger number.
-// If 'newblock' is set to true then the new trigger record is added to 
-// a new block. Otherwise the point is added to the current block.
-// Note: This method ignores the fAreaToUse and fMaxBlockSize flags.
-// This is very usefull for custom trigger source filling.
-// For the case of adding data from AliMUONHit objects the 'trigger'
-// parameter becomes the track number in TreeH and not the index of the
-// AliMUONLocalTrigger object.
-
-       DebugMsg(1, "FillFrom(AliMUONDataInterface*, Int_t, Int_t, Bool_t)");
-       
-       if (FileAndFolderOk(data))
-       {
-               data->GetEvent(event);
-               AliMUON* module = NULL;
-               if ( ! FetchAliMUON(module) ) return;
-
-               // Check if the current event corresponds to the event number we are
-               // attempting to add to. If they do not or no event is selected then
-               // try find the event or create a new one.
-               if ( fCurrentEvent == NULL )
-               {
-                       Bool_t found = GetEvent(event);
-                       if ( ! found) AddEvent(event);
-               }
-               else
-               {
-                       if (fCurrentEvent->EventNumber() != event)
-                       {
-                               Bool_t found = GetEvent(event);
-                               if ( ! found) AddEvent(event);
-                       }
-               }
-               
-               if ( fCurrentBlock != NULL )
-               {
-                       Assert( fCurrentEvent != NULL );
-                       // If the newblock flag is set then force a new block.
-                       if (newblock) AddBlock();
-               }
-               else
-                       AddBlock();  // No block selected so we need to create a new block.
-
-               AddTriggerFrom(data, module, trigger);
-               FinishedWithAliMUON();
-       }
-}
-
-
-void AliHLTMUONTriggerSource::Clear(Option_t* /*option*/)
-{
-// Clears all the internal arrays.
-
-       fFilename = "";
-       fFoldername = "";
-       ResetAllPointers();
-       fEventList.Clear("C");
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetEvent(Int_t eventnumber) const
-{
-// Fetches the specified event number stored in this AliHLTMUONTriggerSource.
-// Sets the current block and trigger to the first block and trigger record in
-// the event. If there are no blocks or trigger records then these pointers are
-// set to NULL. kTRUE is returned if the event was found, kFALSE otherwise.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetEvent(" << eventnumber << ")" );
-       
-       // Try find the corresponding event in the list of events.
-       for (Int_t i = 0; i < fEventList.GetEntriesFast(); i++)
-       {
-               AliEventData* current = (AliEventData*) fEventList[i];
-               if (current->EventNumber() == eventnumber)
-               {
-                       fEventIndex = i;
-                       fCurrentEvent = current;
-                       GetFirstBlock();
-                       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                               << " , fTriggerIndex = " << fTriggerIndex
-                       );
-                       return kTRUE;
-               }
-       }
-       return kFALSE;
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetFirstEvent() const
-{
-// Fetches the first event stored in this AliHLTMUONTriggerSource.
-// Sets the current block and trigger record to the first block and trigger
-// in the event. If there are no blocks or trigger records then these pointers
-// are set to NULL. kTRUE is returned if the event was found, kFALSE otherwise.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetFirstEvent()");
-       if (fEventList.GetEntriesFast() > 0)
-       {
-               fEventIndex = 0;
-               fCurrentEvent = (AliEventData*) fEventList[0];
-               GetFirstBlock();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kFALSE;
-       }
-}
-
-
-Bool_t AliHLTMUONTriggerSource::MoreEvents() const
-{
-// Returns kTRUE if there are more events to iterate over.
-
-       return 0 <= fEventIndex && fEventIndex < fEventList.GetEntriesFast();
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetNextEvent() const
-{
-// Fetches the next event stored following the currently selected one.
-// kTRUE is returned if the event was found, kFALSE otherwise.
-// The internal pointers are reset if we reached the last event.
-          
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetNextEvent()");
-       if (fEventIndex < fEventList.GetEntriesFast() - 1)
-       {
-               fCurrentEvent = (AliEventData*) fEventList[ ++fEventIndex ];
-               GetFirstBlock();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               ResetAllPointers();
-               return kFALSE;
-       }
-}
-
-
-Int_t AliHLTMUONTriggerSource::CurrentEvent() const
-{
-// Returns the corresponding AliRoot event number for the current event.
-// -1 is returned if no event is selected.
-          
-       if (fCurrentEvent != NULL)
-               return fCurrentEvent->EventNumber();
-       else
-               return -1;
-}
-
-
-Int_t AliHLTMUONTriggerSource::NumberOfBlocks() const
-{
-// Returns the number of trigger record blocks in the current event.
-// -1 is returned if no event is selected.
-          
-       DebugMsg(1, "AliHLTMUONTriggerSource::NumberOfBlocks()");
-       if (fCurrentEvent == NULL)
-       {
-               Error("NumberOfBlocks", "No event selected.");
-               return -1;
-       }
-       else
-               return fCurrentEvent->Blocks().GetEntriesFast();
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetBlock(Int_t index) const
-{
-// Fetches the index'th block in the current event.
-// Sets the current trigger record to the first trigger in the block.
-// If there are no trigger records then this pointer is set to NULL.
-// kTRUE is returned if the block was found, kFALSE otherwise.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetBlock(" << index << ")");
-       
-       // Note NumberOfBlocks() also checks if the event was selected.
-       Int_t numberofblocks = NumberOfBlocks();
-       if (numberofblocks < 0) return kFALSE;
-
-       if ( 0 <= index && index < numberofblocks )
-       {
-               fBlockIndex = index;
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[index];
-               GetFirstTrigger();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               // The index is out of bounds so inform the user.
-               if (numberofblocks > 0)
-                       Error(  "GetBlock",
-                               "The block index (%d) is out of bounds. Valid range is [0, %d]",
-                               index, numberofblocks - 1
-                       );
-               else
-                       Error(  "GetBlock",
-                               "The block index (%d) is out of bounds. No blocks found.",
-                               index
-                       );
-               return kFALSE;
-       }
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetFirstBlock() const
-{
-// Fetches the first block in the current event.
-// Sets the current trigger record to the first trigger in the block.
-// If there are no trigger records then this pointer is set to NULL.
-// kTRUE is returned if the block was found, kFALSE otherwise.
-          
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetFirstBlock()");
-       // Note: NumberOfBlocks() also checks if fCurrentEvent != NULL.
-       if (NumberOfBlocks() > 0)
-       {
-               fBlockIndex = 0;
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[fBlockIndex];
-               GetFirstTrigger();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kTRUE;
-       }
-       else
-               return kFALSE;
-}
-
-
-Bool_t AliHLTMUONTriggerSource::MoreBlocks() const
-{
-// Returns kTRUE if there are more blocks to be traversed.
-
-       return 0 <= fBlockIndex && fBlockIndex < NumberOfBlocks();
-}
-
-
-Bool_t AliHLTMUONTriggerSource::GetNextBlock() const
-{
-// Fetches the next block in the current event.
-// kTRUE is returned if the block was found, kFALSE otherwise.
-          
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetNextBlock()");
-
-       // Note: NumberOfBlocks() checks if fCurrentEvent != NULL. If it is then it returns -1
-       // and since fBlockIndex is always >= -1 the if statement must go to the else part.
-       if (fBlockIndex < NumberOfBlocks() - 1)
-       {
-               fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[ ++fBlockIndex ];
-               GetFirstTrigger();
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return kTRUE;
-       }
-       else
-       {
-               ResetBlockPointers();
-               return kFALSE;
-       }
-}
-
-
-Int_t AliHLTMUONTriggerSource::NumberOfTriggers() const
-{
-// Returns the number of trigger records in the current block.
-// -1 is returned if no block is selected.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::NumberOfTriggers()");
-       if (fCurrentBlock == NULL)
-       {
-               Error("NumberOfTriggers", "No block selected.");
-               return -1;
-       }
-       else
-               return fCurrentBlock->GetEntriesFast();
-}
-
-
-const AliHLTMUONTriggerRecord* AliHLTMUONTriggerSource::GetTrigger(Int_t triggernumber) const
-{
-// Fetches the trigger record with the specified trigger number from
-// the current block.
-// NULL is returned if the record was not found.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetTrigger(" << triggernumber << ")");
-
-       if (fCurrentBlock == NULL)
-       {
-               Error("GetTrigger", "No block selected.");
-               return NULL;
-       }
-       
-       // Try find the corresponding trigger record in the list of events.
-       for (Int_t i = 0; i < fCurrentBlock->GetEntriesFast(); i++)
-       {
-               AliHLTMUONTriggerRecord* current = (AliHLTMUONTriggerRecord*) fCurrentBlock->At(i);
-               if (current->TriggerNumber() == triggernumber)
-               {
-                       fTriggerIndex = i;
-                       fCurrentTrigger = current;
-                       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                               << " , fTriggerIndex = " << fTriggerIndex
-                       );
-                       return current;
-               }
-       }
-       return NULL;
-}
-
-
-const AliHLTMUONTriggerRecord* AliHLTMUONTriggerSource::GetFirstTrigger() const
-{
-// Fetches the first trigger record in the current block.
-// NULL is returned if the record was not found.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetFirstTrigger()");
-       // Note: NumberOfTriggers() also checks if fCurrentBlock != NULL.
-       if (NumberOfTriggers() > 0)
-       {
-               fTriggerIndex = 0;
-               fCurrentTrigger = (AliHLTMUONTriggerRecord*) fCurrentBlock->At(0);
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return fCurrentTrigger;
-       }
-       else
-               return NULL;
-}
-
-
-Bool_t AliHLTMUONTriggerSource::MoreTriggers() const
-{
-// Returns kTRUE if there are more triggers to iterate over.
-
-       return 0 <= fTriggerIndex && fTriggerIndex < NumberOfTriggers();
-}
-
-
-const AliHLTMUONTriggerRecord* AliHLTMUONTriggerSource::GetNextTrigger() const
-{
-// Fetches the next trigger record in the current block.
-// NULL is returned if the record was not found.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::GetNextTrigger()");
-       
-       // Note: NumberOfTriggers() checks if fCurrentBlock != NULL. If it is then it returns -1
-       // and since fTriggerIndex is always >= -1 the if statement must go to the else part.
-       if (fTriggerIndex < NumberOfTriggers() - 1)
-       {
-               fCurrentTrigger = (AliHLTMUONTriggerRecord*) fCurrentBlock->At( ++fTriggerIndex );
-               DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-                       << " , fTriggerIndex = " << fTriggerIndex
-               );
-               return fCurrentTrigger;
-       }
-       else
-       {
-               ResetTriggerPointers();
-               return NULL;
-       }
-}
-
-
-Int_t AliHLTMUONTriggerSource::CurrentTrigger() const
-{
-// Returns the trigger record number for the currently selected trigger record.
-// This number corresponds to the index'th AliMUONLocalTrigger object for the
-// current event.
-// -1 is returned if no trigger record is selected.
-
-       if (fCurrentTrigger != NULL)
-       {
-               return fCurrentTrigger->TriggerNumber();
-       }
-       else
-       {
-               Error("CurrentTrigger", "No trigger record selected.");
-               return -1;
-       }
-}
-
-
-void AliHLTMUONTriggerSource::AddEvent(Int_t eventnumber)
-{
-// Adds a new AliEventData block to the fEventList and updates the fCurrentEvent,
-// fCurrentBlock and fCurrentTrigger pointers.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::AddEvent(" << eventnumber << ")");
-       Assert( eventnumber >= 0 );
-
-       // Assume the eventnumber does not already exist in the event list.
-       fEventIndex = fEventList.GetEntriesFast();
-       new ( fEventList[fEventIndex] ) AliEventData(eventnumber);
-       fCurrentEvent = (AliEventData*) fEventList[fEventIndex];
-       
-       // Remember to reset the other pointers because the new event is empty.
-       ResetBlockPointers();
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-void AliHLTMUONTriggerSource::AddBlock()
-{
-// Adds a new block to the current event and updates fCurrentBlock and fCurrentTrigger.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::AddBlock()");
-       
-       if (fCurrentEvent == NULL)
-       {
-               Error("AddBlock", "No event selected.");
-               return;
-       }
-       
-       fBlockIndex = fCurrentEvent->Blocks().GetEntriesFast();
-       new ( fCurrentEvent->Blocks()[fBlockIndex] ) TClonesArray(AliHLTMUONTriggerRecord::Class());
-       fCurrentBlock = (TClonesArray*) fCurrentEvent->Blocks()[fBlockIndex];
-       
-       // Remember to reset the trigger pointer because the new block is empty.
-       ResetTriggerPointers();
-
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-void AliHLTMUONTriggerSource::AddTrigger(const AliHLTMUONTriggerRecord& data)
-{
-// Adds a new trigger record to the current event and block.
-// The fCurrentTrigger is updated appropriately.
-
-       DebugMsg(1, "AliHLTMUONTriggerSource::AddTrigger(" << (void*)&data << ")");
-
-       if (fCurrentBlock == NULL)
-       {
-               Error("AddTrigger", "No block selected.");
-               return;
-       }
-       
-       fTriggerIndex = fCurrentBlock->GetEntriesFast();
-       new ( (*fCurrentBlock)[fTriggerIndex] ) AliHLTMUONTriggerRecord(data);
-       fCurrentTrigger = (AliHLTMUONTriggerRecord*) (*fCurrentBlock)[fTriggerIndex];
-       
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-Bool_t AliHLTMUONTriggerSource::FileAndFolderOk(AliMUONDataInterface* data)
-{
-// Checks if the file and folder names correspond to this AliHLTMUONTriggerSource's 
-// file and folder names. kTRUE is returned if they do.
-// If the file and folder names are empty then they are assigned the names
-// as found in the data interface and kTRUE is returned.
-
-       if (fFilename == "")
-       {
-               // Nothing filled yet so set the file and folder names.
-               fFilename = data->CurrentFile();
-               fFoldername = data->CurrentFolder();
-               return kTRUE;
-       }
-
-       if ( fFilename != data->CurrentFile() )
-       {
-               Error(  "FileAndFolderOk",
-                       "The Trigger source already contains data from file '%s', cannot add data from file '%s'",
-                       fFilename.Data(), data->CurrentFile().Data()
-               );
-               return kFALSE;
-       }
-       
-       if ( fFoldername != data->CurrentFolder() )
-       {
-               Error(  "FileAndFolderOk",
-                       "The Trigger source already contains data from folder '%s', cannot add data from folder '%s'",
-                       fFoldername.Data(), data->CurrentFolder().Data()
-               );
-               return kFALSE;
-       }
-       
-       return kTRUE;
-}
-
-
-void AliHLTMUONTriggerSource::AddEventFrom(AliMUONDataInterface* data, AliMUON* module, Int_t event)
-{
-// Adds the whole event from the data interface to the internal data structures.
-// It is assumed that FileAndFolderOk(data) returns true just before calling
-// this method.
-
-       if ( data->GetEvent(event) )
-       {
-               AddEvent(event);
-
-               AddBlock();
-               UInt_t currentblocksize = 0;
-               AliHLTMUONTriggerRecord trigdata;
-
-               switch (fDataToUse)
-               {
-               case kFromHits:
-                       for (Int_t track = 0; track < data->NumberOfTracks(); track++)
-                       {
-                               if ( ! FillTriggerFromHits(data, track, trigdata) )
-                                       continue;  // Continue if unable to find hits.
-
-                               if (InFillRegion(trigdata))
-                               {
-                                       AddTrigger(trigdata);
-
-                                       // Create a new block if we reached the maximum block size.
-                                       if ( ++currentblocksize == fMaxBlockSize )
-                                       {
-                                               AddBlock();
-                                               currentblocksize = 0;
-                                       }
-                               }
-                       }
-                       break;
-
-               case kFromLocalTriggers:
-                       Assert( module != NULL );
-                       DebugMsg(4, "THIS OPTION IS DEPRICATED!!!");
-/* THIS CODE IS DEPRICATED (to be removed)
-                       for (Int_t i = 0; i < data->NumberOfLocalTriggers(); i++)
-                       {
-                               DebugMsg(4, "for loop: i = " << i);
-                               AliMUONLocalTrigger* lt = data->LocalTrigger(i);
-                               FillTriggerFromLocalTrigger(lt, module, trigdata);
-                               trigdata.TriggerNumber(i);
-
-                               if (InFillRegion(trigdata))
-                               {
-                                       AddTrigger(trigdata);
-
-                                       // Create a new block if we reached the maximum block size.
-                                       if ( ++currentblocksize == fMaxBlockSize )
-                                       {
-                                               AddBlock();
-                                               currentblocksize = 0;
-                                       }
-                               }
-                       }
-*/
-                       break;
-
-               default:
-                       Error("AddChamberFrom", "fDataToUse is not set to a valid value.");
-               }
-       }  // Loop on events.
-}
-
-
-void AliHLTMUONTriggerSource::AddTriggerFrom(AliMUONDataInterface* data, AliMUON* module, Int_t trigger)
-{
-// Adds the specified trigger record from the given data interface.
-// The data interface should be initialised correctly, that is the event
-// should already be selected before calling this method.
-
-       DebugMsg(1, "Entering AddTriggerFrom");
-
-       AliHLTMUONTriggerRecord trigdata;
-
-       switch (fDataToUse)
-       {
-       case kFromHits:
-               {
-               // Note: in this case we treat the trigger parameter as a track number.
-               if ( ! FillTriggerFromHits(data, trigger, trigdata) )
-                       return;  // Continue if unable to find hits.
-               }
-               break;
-
-       case kFromLocalTriggers:
-               {
-/* THIS CODE IS DEPRICATED (to be removed)
-               Assert( module != NULL );
-               AliMUONLocalTrigger* lt = data->LocalTrigger(trigger);
-               FillTriggerFromLocalTrigger(lt, module, trigdata);
-               trigdata.TriggerNumber(trigger);
-*/
-               }
-               break;
-
-       default:
-               Error("AddTriggerFrom", "fDataToUse is not set to a valid value.");
-               return;
-       }
-       
-       AddTrigger(trigdata);
-       
-       DebugMsg(1, "Leaving AddTriggerFrom");
-}
-
-
-Bool_t AliHLTMUONTriggerSource::InFillRegion(const AliHLTMUONTriggerRecord& data) const
-{
-// Checks to see if the specified trigger record is in the chamber region
-// we want to fill from.
-// kTRUE is returned if (x, y) is in the region, and kFALSE otherwise.
-
-       switch (fAreaToUse)
-       {
-       case kFromWholePlane:     return kTRUE;
-       case kFromLeftHalfPlane:  return data.Station1Point().X() <= 0;
-       case kFromRightHalfPlane: return data.Station1Point().X() > 0;
-
-       default:
-               Error("InFillRegion", "fAreaToUse is not set to a valid value.");
-               return kFALSE;
-       }
-}
-
-
-/* THIS CODE IS DEPRICATED (to be removed)
-
-void AliHLTMUONTriggerSource::FillTriggerFromLocalTrigger(
-               AliMUONLocalTrigger* trigger, AliMUON* module, AliHLTMUONTriggerRecord& record
-       )
-{
-// Fills the trigger data from the AliMUONLocalTrigger object.
-// if the fUseLookupTable is set to true then we use the L0 lookup table to
-// fill the Pt value otherwise we use the PtCal method in AliMUONTriggerCircuit.
-// Note the fTriggerNumber parameter is not filled in to 'record'.
-
-       DebugMsg(2, "Creating TriggerRecord from AliMUONLocalTrigger object: " << (void*)trigger );
-       AliMUONTriggerCircuit& circuit = module->TriggerCircuit(trigger->LoCircuit());
-
-       // Get the sign of the particle the sign of the muon.
-       if (trigger->LoLpt() == 1 || trigger->LoHpt() == 1 || trigger->LoApt() == 1)
-       {
-               record.ParticleSign(-1);
-       }
-       else
-       if (trigger->LoLpt() == 2 || trigger->LoHpt() == 2 || trigger->LoApt() == 2)
-       {
-               record.ParticleSign(+1);
-       }
-       else
-       {
-               record.ParticleSign(0);
-       }
-       DebugMsg(2, "Particle sign = " << record.ParticleSign() );
-
-       // Compute the transverse momentum.
-       if (fUseLookupTable)
-       {
-               // TODO: implement use of the L0 lookup table.
-               Error("FillTriggerFromLocalTrigger", "Use of L0 lookup table is not yet implemented!");
-       }
-       else
-       {
-               Float_t pt = circuit.PtCal( trigger->LoStripX(), trigger->LoDev(), trigger->LoStripY() );
-               record.Pt(pt);
-       }
-       DebugMsg(2, "Pt = " << record.Pt() );
-
-       // Build the impact points.
-       record.Station1Point().X() = circuit.GetX11Pos(trigger->LoStripY());
-       record.Station1Point().Y() = circuit.GetY11Pos(trigger->LoStripX());
-       record.Station2Point().Y() = circuit.GetY21Pos(trigger->LoStripX() + trigger->LoDev() + 1);  // Why + 1?
-       record.Station2Point().X() = AliMUONConstants::DefaultChamberZ(12) * record.Station1Point().X() / AliMUONConstants::DefaultChamberZ(10);
-       DebugMsg(2, "fStation1x = " << record.Station1Point().X());
-       DebugMsg(2, "fStation1y = " << record.Station1Point().Y());
-       DebugMsg(2, "fStation2x = " << record.Station2Point().X());
-       DebugMsg(2, "fStation2y = " << record.Station2Point().Y());
-}
-*/
-
-
-Bool_t AliHLTMUONTriggerSource::FillTriggerFromHits(
-               AliMUONDataInterface* data, Int_t track, AliHLTMUONTriggerRecord& record
-       )
-{
-// Fills the TriggerRecord structure from AliMUONHit objects.
-// The hits on the last 4 chambers are used (i.e. chambers 11 to 14).
-// kTRUE is returned if the structure was filled successfully.
-
-       DebugMsg(2, "Creating TriggerRecord from hits on track: " << track );
-       
-       Float_t x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4;
-#ifndef __alpha
-#ifndef __sun
-       x1 = y1 = z1 = x2 = y2 = z2 = x3 = y3 = z3 = x4 = y4 = z4 = nanf("");
-#else
-       x1 = y1 = z1 = x2 = y2 = z2 = x3 = y3 = z3 = x4 = y4 = z4 = 0;
-#endif
-#else
-       x1 = y1 = z1 = x2 = y2 = z2 = x3 = y3 = z3 = x4 = y4 = z4 = FLT_QNAN;
-#endif
-       // Find the hit that corresponds to chambers. 11 to 14. We can ignore any
-       // hits above the first 14. If there are that many it means the particle
-       // is cycling in the detector.
-       for (Int_t i = 0; i < data->NumberOfHits(track) && i < 14; i++)
-       {
-               AliMUONHit* h = data->Hit(track, i);
-
-               // Note AliMUONHit::Chamber() returns a value in the range 1..14
-               // It is also important to have positive Z coordinates and under the
-               // new version of Aliroot we use GEANT coordinates which return 
-               // negatives. So we use the fabs routine.
-               switch ( h->Chamber() )
-               {
-               case 11: x1 = h->X(); y1 = h->Y(); z1 = (Float_t)fabs(h->Z()); break;
-               case 12: x2 = h->X(); y2 = h->Y(); z2 = (Float_t)fabs(h->Z()); break;
-               case 13: x3 = h->X(); y3 = h->Y(); z3 = (Float_t)fabs(h->Z()); break;
-               case 14: x4 = h->X(); y4 = h->Y(); z4 = (Float_t)fabs(h->Z()); break;
-               }
-       }
-       DebugMsg(4, "Found: x1 = " << x1 << ", y1 = " << y1 << ", z1 = " << z1);
-       DebugMsg(4, "Found: x2 = " << x2 << ", y2 = " << y2 << ", z2 = " << z2);
-       DebugMsg(4, "Found: x3 = " << x3 << ", y3 = " << y3 << ", z3 = " << z3);
-       DebugMsg(4, "Found: x4 = " << x4 << ", y4 = " << y4 << ", z4 = " << z4);
-
-       // Get a coordinate for station 1, perferably from chamber 11 otherwise
-       // use hits from chamber 12.
-       if ( ! TMath::IsNaN(x1))
-       {
-               record.Station1Point().X() = x1;
-               record.Station1Point().Y() = y1;
-               DebugMsg(3, "Using value from chamber 11: x1 = " << x1 << ", y1 = " << y1 << ", z1 = " << z1 );
-       }
-       else if ( ! TMath::IsNaN(x2))
-       {
-               record.Station1Point().X() = x2;
-               record.Station1Point().Y() = y2;
-               z1 = z2;
-               DebugMsg(3, "Using value from chamber 12: x2 = " << x2 << ", y2 = " << y2 << ", z2 = " << z2 );
-       }
-       else
-       {
-               // Return false if we could not find any hits on chambers 11 or 12.
-               Warning("FillTriggerFromHits", "Could not find any hits on chambers 11 and 12.");
-               return kFALSE;
-       }
-
-       // Get a coordinate for station 2, perferably from chamber 13 otherwise
-       // use hits from chamber 14.
-       if ( ! TMath::IsNaN(x3))
-       {
-               record.Station2Point().X() = x3;
-               record.Station2Point().Y() = y3;
-               z2 = z3;
-               DebugMsg(3, "Using value from chamber 13: x3 = " << x3 << ", y3 = " << y3 << ", z3 = " << z3 );
-       }
-       else if ( ! TMath::IsNaN(x4))
-       {
-               record.Station2Point().X() = x4;
-               record.Station2Point().Y() = y4;
-               z2 = z4;
-               DebugMsg(3, "Using value from chamber 14: x4 = " << x4 << ", y4 = " << y4 << ", z4 = " << z4 );
-       }
-       else
-       {
-               // Return false if we could not find any hits on chambers 13 or 14.
-               Warning("FillTriggerFromHits", "Could not find any hits on chambers 13 and 14.");
-               return kFALSE;
-       }
-       
-       record.TriggerNumber(track);
-       
-       // Get the sign of the particle.
-       Int_t particlecode = (Int_t) data->Hit(track, 0)->Particle();
-       DebugMsg(3, "particle code = " << particlecode);
-       TDatabasePDG* pdb = TDatabasePDG::Instance();
-       TParticlePDG* pdata = pdb->GetParticle(particlecode);
-       if (pdata->Charge() < 0)
-               record.ParticleSign(-1);
-       else if (pdata->Charge() > 0)
-               record.ParticleSign(+1);
-       else
-               record.ParticleSign(0);
-       DebugMsg(3, "Particle sign = " << record.ParticleSign());
-       
-       DebugMsg(3, "Calculating Pt: x1 = " << record.Station1Point().X()
-                       << ", y1 = " << record.Station1Point().Y()
-                       << ", y2 = " << record.Station2Point().Y()
-                       << ", z1 = " << z1
-                       << ", z2 = " << z2
-               );
-       // Calculate and assign the transverse momentum.
-       Float_t pt = AliHLTMUONCoreCalculatePt(
-                               record.Station1Point().X(),
-                               record.Station1Point().Y(), record.Station2Point().Y(),
-                               z1, z2
-                       );
-       record.Pt(pt);
-       
-       DebugMsg(3, "Pt = " << record.Pt());
-       
-       return kTRUE;
-}
-
-
-Bool_t AliHLTMUONTriggerSource::FetchAliMUON(AliMUON*& module)
-{
-// Fetches the AliMUON module from the AliRun global object. AliRun will be loaded
-// by the runloader if it has not yet been loaded. In such a case the AliRun object
-// will also we unloaded when we are done with it.
-// kTRUE is returned if no error occured and kFALSE otherwise.
-// Note that if fDataToUse is set to kFromHits then gAlice is not loaded and 'module'
-// will be left untouched. The method will still return kTRUE however since this is
-// not an error. We do not need the AliMUON module when filling from hits.
-
-       // Check if we even need the MUON module. Not having to load it will
-       // save a lot of loading time for AliRoot.
-       if (fDataToUse == kFromHits)
-       {
-               // Make sure we do not attempt to unload gAlice in FinishedWithAliMUON,
-               // by setting the fHadToLoadgAlice to false.
-               fHadToLoadgAlice = kFALSE;
-               return kTRUE;
-       }
-       
-       AliRunLoader* runloader = AliRunLoader::GetRunLoader();
-       if ( runloader == NULL )
-       {
-               Error("FetchAliMUON", "AliRunLoader not initialised!");
-               return kFALSE;
-       }
-
-       // Try fetch the AliRun object. If it is not found then try load it using
-       // the runloader.
-       AliRun* alirun = runloader->GetAliRun();
-       if (alirun == NULL)
-       {
-               if (runloader->LoadgAlice() != 0)
-               {
-                       // Error.
-                       DebugMsg(1, "Leaving FillFrom(AliMUONDataInterface*)");
-                       return kFALSE;
-               }
-               fHadToLoadgAlice = kTRUE;
-               alirun = runloader->GetAliRun();
-       }
-       else
-               fHadToLoadgAlice = kFALSE;
-
-       // Get the MUON module pointer and return it.
-       module = dynamic_cast<AliMUON*>( alirun->GetModule("MUON") );
-       return kTRUE;
-}
-
-
-void AliHLTMUONTriggerSource::FinishedWithAliMUON()
-{
-// After one is finished with the AliMUON object returned by GetAliMUON, one
-// should call this method.
-// If the gAlice object was loaded by GetAliMUON then it will be unloaded at
-// this point, otherwise nothing is done.
-
-       // Only unload the gAlice object if we had to load it ourselves.
-       if (fHadToLoadgAlice)
-               AliRunLoader::GetRunLoader()->UnloadgAlice();
-}
-
-
-void AliHLTMUONTriggerSource::ResetAllPointers() const
-{
-// Sets all the current pointers to NULL and indices to -1.
-
-       fEventIndex = -1;
-       fCurrentEvent = NULL;
-       fBlockIndex = -1;
-       fCurrentBlock = NULL;
-       fTriggerIndex = -1;
-       fCurrentTrigger = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-void AliHLTMUONTriggerSource::ResetBlockPointers() const
-{
-// Sets the block and trigger pointers to NULL and indices to -1.
-
-       fBlockIndex = -1;
-       fCurrentBlock = NULL;
-       fTriggerIndex = -1;
-       fCurrentTrigger = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-void AliHLTMUONTriggerSource::ResetTriggerPointers() const
-{
-// Sets just the current trigger record pointer to NULL and index to -1.
-
-       fTriggerIndex = -1;
-       fCurrentTrigger = NULL;
-       DebugMsg(2, "\tfEventIndex = " << fEventIndex << " , fBlockIndex = " << fBlockIndex
-               << " , fTriggerIndex = " << fTriggerIndex
-       );
-}
-
-
-AliHLTMUONTriggerSource::AliEventData::AliEventData() :
-       fEventNumber(-1), fBlocks(TClonesArray::Class())
-{
-       fEventNumber = -1;
-}
-
-
-AliHLTMUONTriggerSource::AliEventData::AliEventData(Int_t eventnumber)
-       : fEventNumber(eventnumber), fBlocks(TClonesArray::Class())
-{
-// Create a new event data block with specified event number.
-
-       fEventNumber = eventnumber;
-
-       // If the following is not set then we do not write the fBlocks properly.
-       fBlocks.BypassStreamer(kFALSE);
-}
-
-
-AliHLTMUONTriggerSource::AliEventData::~AliEventData()
-{
-       //fBlocks.Clear("C");  // Done in fBlocks destructor 
-}
-
diff --git a/HLT/MUON/src/AliRoot/TriggerSource.hpp b/HLT/MUON/src/AliRoot/TriggerSource.hpp
deleted file mode 100644 (file)
index 4cb85fe..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/* AliHLTMUONTriggerSource is used to extract L0 trigger information for
-   the muon spectrometer from a simulated event stored in .root files by AliRoot.
-   It is used by the AliHLTMUONMicrodHLT class as a input data set for the
-   dHLT algorithm.
- */
-
-#ifndef ALIHLTMUONTRIGGERSOURCE_H
-#define ALIHLTMUONTRIGGERSOURCE_H
-
-#include "TROOT.h"
-#include "TObject.h"
-#include "TString.h"
-#include "TClonesArray.h"
-#include "AliRoot/TriggerRecord.hpp"
-
-class AliMUON;
-//class AliMUONLocalTrigger;
-class AliMUONDataInterface;
-
-
-class AliHLTMUONTriggerSource : public TObject
-{
-public:  // Unfortunately ROOT requires the following to be public.
-
-       class AliEventData : public TObject
-       {
-       public:
-               AliEventData();
-               AliEventData(Int_t eventnumber);
-               virtual ~AliEventData();
-               
-               Int_t& EventNumber() { return fEventNumber; }
-               TClonesArray& Blocks() { return fBlocks; }
-
-       private:
-       
-               Int_t fEventNumber;  // Event number in AliMUONDataInterface from which the triggers were taken.
-               TClonesArray fBlocks; // The list of blocks of trigger records.
-               
-               ClassDef(AliEventData, 1)  // Data per event.
-       };
-
-
-public:
-
-       enum AreaType
-       {
-               kFromWholePlane,
-               kFromLeftHalfPlane,
-               kFromRightHalfPlane
-       };
-       
-       enum SourceType
-       {
-               kFromHits,
-               kFromLocalTriggers
-       };
-
-
-       AliHLTMUONTriggerSource();
-       
-       /* Creates a new trigger source object by filling data from the data interface.
-        */
-       AliHLTMUONTriggerSource(AliMUONDataInterface* data);
-       
-       virtual ~AliHLTMUONTriggerSource();
-       
-       /* Get and set methods to specify how the FillFrom methods should fill the
-          internal data structures.
-        */
-       void AreaToUse(AreaType value) { fAreaToUse = value; };
-       AreaType AreaToUse() const { return fAreaToUse; };
-       void DataToUse(SourceType value) { fDataToUse = value; };
-       SourceType DataToUse() const { return fDataToUse; };
-       void MaxBlockSize(UInt_t value) { fMaxBlockSize = value; };
-       UInt_t MaxBlockSize() const { return fMaxBlockSize; };
-       void UseLookupTable(Bool_t value) { fUseLookupTable = value; };
-       Bool_t UseLookupTable() const { return fUseLookupTable; };
-       
-       /* Fills the internal data structures from the specified data interface
-          for all the events found in AliMUONDataInterface.
-        */
-       void FillFrom(AliMUONDataInterface* data);
-       
-       /* Fills the internal data structures from the specified data interface
-          for the given event.
-        */
-       void FillFrom(AliMUONDataInterface* data, Int_t event);
-       
-       /* Fills the internal data structures from the specified data interface
-          for the given event and trigger number.
-          If 'newblock' is set to true then the new trigger record is added to 
-          a new block. Otherwise the point is added to the current block.
-          Note: This method ignores the fAreaToUse and fMaxBlockSize flags.
-          This is very usefull for custom trigger source filling.
-          For the case of adding data from AliMUONHit objects the 'trigger'
-          parameter becomes the track number in TreeH and not the index of the
-          AliMUONLocalTrigger object.
-        */
-       void FillFrom(
-                       AliMUONDataInterface* data, 
-                       Int_t event, Int_t trigger, Bool_t newblock = kFALSE
-               );
-
-       /* Clears all the internal arrays.
-        */
-       virtual void Clear(Option_t* option = "");
-       
-       // Get methods.
-       TString FileName()   const { return fFilename; };
-       TString FolderName() const { return fFoldername; };
-       
-       /* Returns the number of events stored.
-        */
-       Int_t NumberOfEvents() const { return fEventList.GetEntriesFast(); };
-       
-       /* Fetches the specified event number stored in this AliHLTMUONTriggerSource.
-          Sets the current block and trigger to the first block and trigger record in
-          the event. If there are no blocks or trigger records then these pointers are
-          set to NULL. kTRUE is returned if the event was found, kFALSE otherwise.
-        */
-       Bool_t GetEvent(Int_t eventnumber) const;
-       
-       /* Fetches the first event stored in this AliHLTMUONTriggerSource.
-          Sets the current block and trigger record to the first block and trigger
-          in the event. If there are no blocks or trigger records then these pointers
-          are set to NULL. kTRUE is returned if the event was found, kFALSE otherwise.
-        */
-       Bool_t GetFirstEvent() const;
-       
-       /* Returns kTRUE if there are more events to iterate over.
-        */
-       Bool_t MoreEvents() const;
-       
-       /* Fetches the next event stored following the currently selected one.
-          kTRUE is returned if the event was found, kFALSE otherwise.
-          The internal pointers are reset if we reached the last event.
-        */
-       Bool_t GetNextEvent() const;
-       
-       /* Returns the corresponding AliRoot event number for the current event.
-          -1 is returned if no event is selected.
-        */
-       Int_t CurrentEvent() const;
-       
-       /* Returns the number of trigger record blocks in the current event.
-          -1 is returned if no event is selected.
-        */
-       Int_t NumberOfBlocks() const;
-       
-       /* Fetches the index'th block in the current event.
-          Sets the current trigger record to the first trigger in the block.
-          If there are no trigger records then this pointer is set to NULL.
-          kTRUE is returned if the block was found, kFALSE otherwise.
-        */
-       Bool_t GetBlock(Int_t index) const;
-       
-       /* Fetches the first block in the current event.
-          Sets the current trigger record to the first trigger in the block.
-          If there are no trigger records then this pointer is set to NULL.
-          kTRUE is returned if the block was found, kFALSE otherwise.
-        */
-       Bool_t GetFirstBlock() const;
-
-       /* Returns kTRUE if there are more blocks to be traversed.
-        */
-       Bool_t MoreBlocks() const;
-       
-       /* Fetches the next block in the current event.
-          kTRUE is returned if the block was found, kFALSE otherwise.
-        */
-       Bool_t GetNextBlock() const;
-       
-       /* Returns the currently selected block number.
-          -1 is returned if no blocks are selected.
-        */
-       Int_t CurrentBlock() const { return fBlockIndex; };
-       
-       /* Returns the number of trigger records in the current block.
-          -1 is returned if no block is selected.
-        */
-       Int_t NumberOfTriggers() const;
-       
-       /* Fetches the trigger record with the specified trigger number from
-          the current block.
-          NULL is returned if the record was not found.
-        */
-       const AliHLTMUONTriggerRecord* GetTrigger(Int_t triggernumber) const;
-       
-       /* Fetches the first trigger record in the current block.
-          NULL is returned if the record was not found.
-        */
-       const AliHLTMUONTriggerRecord* GetFirstTrigger() const;
-       
-       /* Returns kTRUE if there are more triggers to iterate over.
-        */
-       Bool_t MoreTriggers() const;
-       
-       /* Fetches the next trigger record in the current block.
-          NULL is returned if the record was not found.
-        */
-       const AliHLTMUONTriggerRecord* GetNextTrigger() const;
-       
-       /* Returns the current trigger record.
-          NULL is returned if the record was not found.
-        */
-       const AliHLTMUONTriggerRecord* GetTrigger() const { return fCurrentTrigger; };
-       
-       /* Returns the trigger record number for the currently selected trigger record.
-          This number corresponds to the index'th AliMUONLocalTrigger object for the
-          current event.
-          -1 is returned if no trigger record is selected.
-        */
-       Int_t CurrentTrigger() const;
-
-
-private:
-
-       /* Adds a new AliEventData block to the fEventList and updates the fCurrentEvent,
-          fCurrentBlock and fCurrentTrigger pointers.
-        */ 
-       void AddEvent(Int_t eventnumber);
-       
-       /* Adds a new block to the current event and updates fCurrentBlock and fCurrentTrigger.
-        */
-       void AddBlock();
-       
-       /* Adds a new trigger record to the current event and block.
-          The fCurrentTrigger is updated appropriately.
-        */
-       void AddTrigger(const AliHLTMUONTriggerRecord& data);
-       
-       /* Checks if the file and folder names correspond to this AliHLTMUONTriggerSource's 
-          file and folder names. kTRUE is returned if they do.
-          If the file and folder names are empty then they are assigned the names
-          as found in the data interface and kTRUE is returned.
-        */
-       Bool_t FileAndFolderOk(AliMUONDataInterface* data);
-       
-       /* Adds the whole event from the data interface to the internal data structures.
-          It is assumed that FileAndFolderOk(data) returns true just before calling
-          this method.
-        */
-       void AddEventFrom(AliMUONDataInterface* data, AliMUON* module, Int_t event);
-       
-       /* Adds the specified trigger record from the given data interface.
-          The data interface should be initialised correctly, that is the event
-          should already be selected before calling this method.
-        */
-       void AddTriggerFrom(AliMUONDataInterface* data, AliMUON* module, Int_t trigger);
-       
-       /* Checks to see if the specified trigger record is in the chamber region
-          we want to fill from.
-          kTRUE is returned if (x, y) is in the region, and kFALSE otherwise.
-        */
-       Bool_t InFillRegion(const AliHLTMUONTriggerRecord& data) const;
-       
-       /* Fills the trigger data from the AliMUONLocalTrigger object.
-          if the fUseLookupTable is set to true then we use the L0 lookup table to
-          fill the Pt value otherwise we use the PtCal method in AliMUONTriggerCircuit.
-          Note the fTriggerNumber parameter is not filled in to 'record'.
-          THIS METHOD IS DEPRICATED
-        */
-/*
-       void FillTriggerFromLocalTrigger(
-                       AliMUONLocalTrigger* trigger, AliMUON* module, AliHLTMUONTriggerRecord& record
-               );
-*/
-       
-       /* Fills the TriggerRecord structure from AliMUONHit objects.
-          The hits on the last 4 chambers are used (i.e. chambers 11 to 14).
-          kTRUE is returned if the structure was filled successfully.
-        */
-       Bool_t FillTriggerFromHits(AliMUONDataInterface* data, Int_t track, AliHLTMUONTriggerRecord& record);
-       
-       /* Fetches the AliMUON module from the AliRun global object. AliRun will be loaded
-          by the runloader if it has not yet been loaded. In such a case the AliRun object
-          will also we unloaded when we are done with it.
-          kTRUE is returned if no error occured and kFALSE otherwise.
-          Note that if fDataToUse is set to kFromHits then gAlice is not loaded and 'module'
-          will be left untouched. The method will still return kTRUE however since this is
-          not an error. We do not need the AliMUON module when filling from hits.
-        */
-       Bool_t FetchAliMUON(AliMUON*& module);
-       
-       /* After one is finished with the AliMUON object returned by GetAliMUON, one
-          should call this method.
-          If the gAlice object was loaded by GetAliMUON then it will be unloaded at
-          this point, otherwise nothing is done.
-        */
-       void FinishedWithAliMUON();
-
-       /* Sets all the current pointers to NULL and indices to -1.
-        */
-       void ResetAllPointers() const;
-       
-       /* Sets the block and trigger pointers to NULL and indices to -1.
-        */
-       void ResetBlockPointers() const;
-       
-       /* Sets just the current trigger record pointer to NULL and index to -1.
-        */
-       void ResetTriggerPointers() const;
-
-
-       // Do not allow copying of this object.
-       AliHLTMUONTriggerSource(const AliHLTMUONTriggerSource& /*object*/)
-               : TObject(),
-                 fAreaToUse(kFromWholePlane), fDataToUse(kFromLocalTriggers),
-                 fMaxBlockSize(0xFFFFFFFF), fUseLookupTable(kTRUE),
-                 fFilename(""), fFoldername(""),
-                 fEventIndex(-1), fCurrentEvent(NULL),
-                 fBlockIndex(-1), fCurrentBlock(NULL),
-                 fTriggerIndex(-1), fCurrentTrigger(NULL),
-                 fEventList(AliHLTMUONTriggerSource::AliEventData::Class()),
-                 fHadToLoadgAlice(kFALSE)
-       {}
-
-       AliHLTMUONTriggerSource& operator = (const AliHLTMUONTriggerSource& /*object*/) { return *this; }
-
-
-       AreaType fAreaToUse;    //! The part of the chamber to fill from.
-       SourceType fDataToUse;  //! The type of raw AliRoot data to fill from.
-       UInt_t fMaxBlockSize;   //! The maximum block size to create in the fill methods.
-       Bool_t fUseLookupTable; //! Set to true if the L0 lookup table should be used for finding Pt.
-
-       TString fFilename;    // The file from which the trigger data was taken.
-       TString fFoldername;  // The folder name from which trigger data was taken.
-       
-       mutable Int_t fEventIndex;               //! The index number of the currently selected event.
-       mutable AliEventData* fCurrentEvent;     //! Pointer to the currently selected event.
-       mutable Int_t fBlockIndex;               //! The index number of the currently selected block.
-       mutable TClonesArray* fCurrentBlock;     //! Pointer to the currently selected block.
-       mutable Int_t fTriggerIndex;             //! The index number of the currently selected trigger record.
-       mutable AliHLTMUONTriggerRecord* fCurrentTrigger;  //! Pointer to the currently selected trigger record.
-
-       TClonesArray fEventList;   // List of trigger records per event.
-       
-       Bool_t fHadToLoadgAlice;  //! Flag indicating if this object had to load the AliRun object.
-
-       ClassDef(AliHLTMUONTriggerSource, 1)  // The source of trigger records for dHLT.
-};
-
-
-#endif // ALIHLTMUONTRIGGERSOURCE_H