+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONCOREADCSTREAM_H
-#define ALIHLTMUONCOREADCSTREAM_H
-
-#include "BasicTypes.hpp"
-
-
-class AliHLTMUONCoreADCStream
-{
-};
-
-
-#endif // ALIHLTMUONCOREADCSTREAM_H
--- /dev/null
+#ifndef ALIHLTMUONBASICTYPES_H
+#define ALIHLTMUONBASICTYPES_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+#ifndef NULL
+# define NULL 0x0
+#endif
+
+
+typedef char Char;
+typedef short Short;
+typedef int Int;
+typedef long Long;
+typedef unsigned char UChar;
+typedef unsigned short UShort;
+typedef unsigned int UInt;
+typedef unsigned long ULong;
+typedef float Float;
+typedef double Double;
+
+typedef char* NullString;
+
+
+#endif // ALIHLTMUONBASICTYPES_H
--- /dev/null
+#ifndef ALIHLTMUONCOREADCSTREAM_H
+#define ALIHLTMUONCOREADCSTREAM_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONBasicTypes.h"
+
+
+class AliHLTMUONCoreADCStream
+{
+};
+
+
+#endif // ALIHLTMUONCOREADCSTREAM_H
--- /dev/null
+#ifndef ALIHLTMUONCORECLUSTER_H
+#define ALIHLTMUONCORECLUSTER_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONCorePoint.h"
+
+
+typedef AliHLTMUONCorePoint AliHLTMUONCoreClusterPoint;
+
+
+#endif // ALIHLTMUONCORECLUSTER_H
--- /dev/null
+#ifndef ALIHLTMUONCOREEVENTID_H
+#define ALIHLTMUONCOREEVENTID_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+
+
+// Must correct this definition!!!!
+struct AliHLTMUONCoreEventID
+{
+ UInt fBunch;
+ UInt fTimeStamp;
+
+
+ AliHLTMUONCoreEventID(UInt bunch = 0, UInt timestamp = 0)
+ {
+ fBunch = bunch;
+ fTimeStamp = timestamp;
+ };
+
+
+ bool operator == (const AliHLTMUONCoreEventID& rhs)
+ {
+ return fBunch == rhs.fBunch and fTimeStamp == rhs.fTimeStamp;
+ };
+
+ bool operator != (const AliHLTMUONCoreEventID& rhs)
+ {
+ return not (*this == rhs);
+ };
+};
+
+
+#endif // ALIHLTMUONCOREEVENTID_H
+#ifndef ALIHLTMUONCOREPOINT_H
+#define ALIHLTMUONCOREPOINT_H
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
-// AliHLTMUONCoreError is the base excpetion class used by the dHLT subsystem.
-// All child classes used to throw exception should be derived from this
-// class to allow easy catching of classes of errors.
+// A 2D point structure using floats.
+// These are used to store impact points on the trigger chambers and
+// cluster centroids.
//
-// AliHLTMUONCoreOutOfMemory is also defined to be used when the system runs
-// out of memory. Do not throw this object directly but rather use
-// AliHLTMUONCoreThrowOutOfMemory which throws a pree allocated static object.
-//
////////////////////////////////////////////////////////////////////////////////
-
-#include "AliHLTMUONError.h"
-namespace
+#include "AliHLTMUONBasicTypes.h"
+
+class AliHLTMUONCorePoint
{
- // The one and only pree allocated out of memory error object.
- static AliHLTMUONCoreOutOfMemory gAliOutOfMemObject;
+public:
-} // end of namespace
+ AliHLTMUONCorePoint()
+ {
+ fX = 0.0;
+ fY = 0.0;
+ }
+ AliHLTMUONCorePoint(Float x, Float y)
+ {
+ fX = x;
+ fY = y;
+ }
-const char* AliHLTMUONCoreOutOfMemory::Message() const throw()
-{
- return "Out of memory.";
-}
+ Float X() const { return fX; }
+ Float& X() { return fX; }
+ void X(Float x) { fX = x; }
+ Float Y() const { return fY; }
+ Float& Y() { return fY; }
+ void Y(Float y) { fY = y; }
-Int AliHLTMUONCoreOutOfMemory::ErrorCode() const throw()
-{
- return kOutOfMemory;
-}
+private:
-void AliHLTMUONCoreThrowOutOfMemory() throw (AliHLTMUONCoreOutOfMemory)
-{
- throw gAliOutOfMemObject;
-}
+ Float fX, fY; // X and Y coordinate.
+};
+#endif // ALIHLTMUONCOREPOINT_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
+// The region of interest object is used to encode/decode and work with boundary
+// box type regions of interest. The 32 bit ROI codes are used to communicate
+// regions of interest between different parts of the dHLT system. This is more
+// efficient than sending 20 byte long region of interest objects.
+//
////////////////////////////////////////////////////////////////////////////////
-/* The region of interest object is used to encode/decode and work with boundary
- box type regions of interest. The 32 bit ROI codes are used to communicate
- regions of interest between different parts of the dHLT system. This is more
- efficient than sending 20 byte long region of interest objects.
- */
-
-#include "RegionOfInterest.hpp"
+#include "AliHLTMUONCoreRegionOfInterest.h"
#include <math.h>
Assert( 0 <= chamber && chamber < (AliHLTMUONCoreChamberID)kNumberOfTrackingChambers );
fChamber = chamber;
- fLeft = fRight = point.fX;
- fBottom = fTop = point.fY;
+ fLeft = fRight = point.X();
+ fBottom = fTop = point.Y();
}
{
// Extends the region of interest to contain the specified point.
- if (point.fX < fLeft)
- fLeft = point.fX;
+ if (point.X() < fLeft)
+ fLeft = point.X();
else
- if (point.fX > fRight) fRight = point.fX;
- if (point.fY < fBottom)
- fBottom = point.fY;
+ if (point.X() > fRight) fRight = point.X();
+ if (point.Y() < fBottom)
+ fBottom = point.Y();
else
- if (point.fY > fTop) fTop = point.fY;
+ if (point.Y() > fTop) fTop = point.Y();
}
+#ifndef ALIHLTMUONCOREREGIONOFINTEREST_H
+#define ALIHLTMUONCOREREGIONOFINTEREST_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
+// The region of interest object is used to encode/decode and work with boundary
+// box type regions of interest. The 32 bit ROI codes are used to communicate
+// regions of interest between different parts of the dHLT system. This is more
+// efficient than sending 20 byte long region of interest objects.
+//
////////////////////////////////////////////////////////////////////////////////
-/* The region of interest object is used to encode/decode and work with boundary
- box type regions of interest. The 32 bit ROI codes are used to communicate
- regions of interest between different parts of the dHLT system. This is more
- efficient than sending 20 byte long region of interest objects.
- */
-
-#ifndef ALIHLTMUONCOREREGIONOFINTEREST_H
-#define ALIHLTMUONCOREREGIONOFINTEREST_H
-
-#include "BasicTypes.hpp"
-#include "Utils.hpp"
-#include "Cluster.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONCoreCluster.h"
typedef UInt AliHLTMUONCoreROI;
{
// Checks if the point is contained in this region of interest.
- return fLeft <= point.fX
- && point.fX <= fRight
- && fBottom <= point.fY
- && point.fY <= fTop;
+ return fLeft <= point.X()
+ && point.X() <= fRight
+ && fBottom <= point.Y()
+ && point.Y() <= fTop;
}
// Checks if the point is contained in this region of interest and the
// chamber number corresponds to this region object.
- return fLeft <= point.fX
- && point.fX <= fRight
- && fBottom <= point.fY
- && point.fY <= fTop
+ return fLeft <= point.X()
+ && point.X() <= fRight
+ && fBottom <= point.Y()
+ && point.Y() <= fTop
&& fChamber == chamber;
}
--- /dev/null
+#ifndef ALIHLTMUONCORETRACK_H
+#define ALIHLTMUONCORETRACK_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONCorePoint.h"
+#include "AliHLTMUONCoreRegionOfInterest.h"
+#include "AliHLTMUONCoreTriggerRecord.h"
+
+
+typedef UInt AliHLTMUONCoreTrackID;
+
+
+struct AliHLTMUONCoreTrack
+{
+
+ AliHLTMUONCoreTriggerRecordID fTriggerid;
+ AliHLTMUONCoreParticleSign fSign;
+ Float fP; // momentum.
+ Float fPt; // transverse momentum.
+ AliHLTMUONCorePoint fPoint[10]; // Computed track coordinates on the 10 tracking chambers.
+ AliHLTMUONCoreROI fRegion[10]; // Regions of interest from which clusters were used to compute this track.
+
+};
+
+
+#endif // ALIHLTMUONCORETRACK_H
+#ifndef ALIHLTMUONCORETRIGGERRECORD_H
+#define ALIHLTMUONCORETRIGGERRECORD_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
//
////////////////////////////////////////////////////////////////////////////////
-#ifndef ALIHLTMUONCORETRIGGERRECORD_H
-#define ALIHLTMUONCORETRIGGERRECORD_H
-#include "BasicTypes.hpp"
-#include "Point.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONCorePoint.h"
/* The sign of the particle as given by L0.
-#ifndef ALIHLTMUONCOREERROR_H
-#define ALIHLTMUONCOREERROR_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
+#ifndef ALIHLTMUONERROR_H
+#define ALIHLTMUONERROR_H
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
/* $Id$ */
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
-// AliHLTMUONCoreError is the base excpetion class used by the dHLT subsystem.
-// All child classes used to throw exception should be derived from this
+// AliHLTMUONError is the base excpetion class used by the dHLT subsystem.
+// All child classes used to throw exceptions should be derived from this
// class to allow easy catching of classes of errors.
//
-// AliHLTMUONCoreOutOfMemory is also defined to be used when the system runs
-// out of memory. Do not throw this object directly but rather use
-// AliHLTMUONCoreThrowOutOfMemory which throws a pree allocated static object.
-//
////////////////////////////////////////////////////////////////////////////////
-#include "BasicTypes.hpp"
+#include "AliHLTMUONBasicTypes.h"
#include <exception>
-//#include <Riostream.h>
#include <ostream>
-class AliHLTMUONCoreError : public std::exception
+class AliHLTMUONError : public std::exception
{
/* Define the << operator for streams to be able to do something like:
- Error myerror;
+ AliHLTMUONError myerror;
cout << myerror << endl;
*/
- friend std::ostream& operator << (std::ostream& os, const AliHLTMUONCoreError& error)
+ friend std::ostream& operator << (std::ostream& os, const AliHLTMUONError& error)
{
os << error.Message();
return os;
public:
- AliHLTMUONCoreError() throw() {};
- virtual ~AliHLTMUONCoreError() throw() {};
+ AliHLTMUONError() throw() {};
+ virtual ~AliHLTMUONError() throw() {};
/* Should return a human readable string containing a description of the
error.
};
-class AliHLTMUONCoreOutOfMemory : public AliHLTMUONCoreError
-{
-public:
- virtual const char* Message() const throw();
- virtual Int ErrorCode() const throw();
-};
-
-
-/* When one needs to indicate that no more memory is available one should use the
- AliHLTMUONCoreThrowOutOfMemory method rather than explicitly using the code
- throw OutOfMemory();
- This is because the ThrowOutOfMemory routine throws a preallocated object so
- we are safe from having to allocate more (nonexistant) memory.
- */
-void AliHLTMUONCoreThrowOutOfMemory() throw (AliHLTMUONCoreOutOfMemory);
-
-
-// Error code declarations.
-enum
-{
- kOutOfMemory = 0x10000001
-};
-
-
-#endif // ALIHLTMUONCOREERROR_H
+#endif // ALIHLTMUONERROR_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+// AliHLTMUONOutOfMemory is defined to be used when the system runs
+// out of memory. Do not throw this object directly but rather use the routine
+// ThrowAliHLTMUONOutOfMemory which throws a pree allocated static object.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONOutOfMemory.h"
+#include "AliHLTMUONUtils.h"
+#include <stdlib.h>
+
+
+const char* AliHLTMUONOutOfMemory::Message() const throw()
+{
+ return "Out of memory.";
+}
+
+Int AliHLTMUONOutOfMemory::ErrorCode() const throw()
+{
+ return kAliHLTMUONOutOfMemory;
+}
+
+void ThrowAliHLTMUONOutOfMemory() throw (AliHLTMUONOutOfMemory)
+{
+ static AliHLTMUONOutOfMemory outofmemobject;
+ throw outofmemobject;
+}
+
+
+namespace
+{
+
+#ifdef DEBUG
+
+ /* Perform a check that on program termination all memory was released properly.
+ The internal list structures are implemented as linked lists using malloc and
+ free to allocate and release memory.
+ Can not use new or delete operators because thats what we are checking, if new
+ and delete were called properly.
+ */
+ class CheckMemoryAlloc
+ {
+ public:
+
+ CheckMemoryAlloc()
+ {
+ fAllocList = NULL;
+ fArrayAllocList = NULL;
+ };
+
+#ifdef CHECK_MEMORY_ALLOC_ON_EXIT
+ ~CheckMemoryAlloc()
+ {
+ Assert( fAllocList == NULL );
+ Assert( fArrayAllocList == NULL );
+ };
+#endif // CHECK_MEMORY_ALLOC_ON_EXIT
+
+ void AddAlloc(void* ptr)
+ {
+ Node* newnode = (Node*) malloc( sizeof(Node) );
+ newnode->memory = ptr;
+ newnode->next = fAllocList;
+ fAllocList = newnode;
+ };
+
+ bool RemoveAlloc(void* ptr)
+ {
+ Node* previous = NULL;
+ Node* current = fAllocList;
+ while (current != NULL)
+ {
+ if (current->memory == ptr) break;
+ previous = current;
+ current = current->next;
+ };
+ if (current == NULL) return false;
+ if (previous != NULL)
+ previous->next = current->next;
+ else
+ fAllocList = current->next;
+ free(( void*)current );
+ return true;
+ };
+
+ void AddArrayAlloc(void* ptr)
+ {
+ Node* newnode = (Node*) malloc( sizeof(Node) );
+ newnode->memory = ptr;
+ newnode->next = fArrayAllocList;
+ fArrayAllocList = newnode;
+ };
+
+ bool RemoveArrayAlloc(void* ptr)
+ {
+ Node* previous = NULL;
+ Node* current = fArrayAllocList;
+ while (current != NULL)
+ {
+ if (current->memory == ptr) break;
+ previous = current;
+ current = current->next;
+ };
+ if (current == NULL) return false;
+ if (previous != NULL)
+ previous->next = current->next;
+ else
+ fArrayAllocList = current->next;
+ free( (void*)current );
+ return true;
+ };
+
+ private:
+
+ struct Node
+ {
+ void* memory;
+ Node* next;
+ };
+
+ Node* fAllocList;
+ Node* fArrayAllocList;
+
+ } checkmem;
+
+#endif // DEBUG
+
+}; // end of namespace
+
+
+void* operator new (size_t size) throw (AliHLTMUONOutOfMemory)
+{
+ void* memory = malloc(size);
+ if (memory == NULL) ThrowAliHLTMUONOutOfMemory();
+ DebugMsg(99, "new(" << size << ") allocated: " << memory);
+ DebugCode( checkmem.AddAlloc(memory) );
+ return memory;
+};
+
+
+void* operator new [] (size_t size) throw (AliHLTMUONOutOfMemory)
+{
+ void* memory = malloc(size);
+ if (memory == NULL) ThrowAliHLTMUONOutOfMemory();
+ DebugMsg(99, "new [] (" << size << ") allocated: " << memory);
+ DebugCode( checkmem.AddArrayAlloc(memory) );
+ return memory;
+};
+
+
+void operator delete (void* memory) throw ()
+{
+ DebugMsg(99, "delete(" << memory << ")");
+ DebugCode(Assert( checkmem.RemoveAlloc(memory) ));
+ free(memory);
+};
+
+
+void operator delete [] (void* memory) throw ()
+{
+ DebugMsg(99, "delete [] (" << memory << ")");
+ DebugCode(Assert( checkmem.RemoveArrayAlloc(memory) ));
+ free(memory);
+};
+
--- /dev/null
+#ifndef ALIHLTMUONOUTOFMEMORY_H
+#define ALIHLTMUONOUTOFMEMORY_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+// AliHLTMUONOutOfMemory is defined to be used when the system runs
+// out of memory. Do not throw this object directly but rather use the routine
+// ThrowAliHLTMUONOutOfMemory which throws a pree allocated static object.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "AliHLTMUONError.h"
+
+
+// Error code declaration.
+enum
+{
+ kAliHLTMUONOutOfMemory = 0x10000001
+};
+
+class AliHLTMUONOutOfMemory;
+
+class AliHLTMUONOutOfMemory : public AliHLTMUONError
+{
+public:
+ virtual const char* Message() const throw ();
+ virtual Int ErrorCode() const throw ();
+};
+
+/* When one needs to indicate that no more memory is available one should use
+ the ThrowAliHLTMUONOutOfMemory routine rather than explicitly using the code
+ throw AliHLTMUONOutOfMemory();
+ This is because the Throw methods throws a preallocated object so we are
+ safe from trying to allocate any more unavailable memory.
+ */
+void ThrowAliHLTMUONOutOfMemory() throw (AliHLTMUONOutOfMemory);
+
+
+/* Overload the global new and delete operators to perform better error checking.
+ These new operators throw AliHLTMUONOutOfMemory exceptions if the system runs
+ out of memory.
+ */
+void* operator new (size_t size) throw (AliHLTMUONOutOfMemory);
+void* operator new [] (size_t size) throw (AliHLTMUONOutOfMemory);
+void operator delete (void* memory) throw ();
+void operator delete [] (void* memory) throw ();
+
+#endif // ALIHLTMUONOUTOFMEMORY_H
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// Author: Artur Szostak
+// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
+//
+// Implement the gAliHLTMUONDebugLevel global variable.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifdef DEBUG
+
+// The global debug level, specifying how much debug information should
+// be written to screen.
+int gAliHLTMUONDebugLevel = 0x7FFFFFFF;
+
+#endif // DEBUG
+#ifndef ALIHLTHLTMUONUTILITIES_H
+#define ALIHLTHLTMUONUTILITIES_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
+// We define some useful macros used in the code.
+//
////////////////////////////////////////////////////////////////////////////////
-#ifndef ALIHLTHLTMUONUTILITIES_H
-#define ALIHLTHLTMUONUTILITIES_H
/* Since c++ is missing a finally "keyword" we define one. Its usage is identical
to a try..finally statement in Java etc.. however, since it is officialy a macro
#include "AliRoot/ADCStream.hpp"
#include <TMath.h>
-#include "Utils.hpp"
+#include "AliHLTMUONUtils.h"
ClassImp(AliHLTMUONADCStream)
str += "\t";
str += trig->Pt();
str += "\t";
- str += trig->Station1Point().fX;
+ str += trig->Station1Point().X();
str += "\t";
- str += trig->Station1Point().fY;
+ str += trig->Station1Point().Y();
str += "\t";
- str += trig->Station2Point().fX;
+ str += trig->Station2Point().X();
str += "\t";
- str += trig->Station2Point().fY;
+ str += trig->Station2Point().Y();
str += "\n";
}
AliDebug(5, str);
// Initialise X, Y and Z coordinate arrays.
Double_t st4x, st4y, st4z, st5x, st5y, st5z;
- if (track->Hit(6).fX == 0. && track->Hit(6).fY == 0.)
+ if (track->Hit(6).X() == 0. && track->Hit(6).Y() == 0.)
{
- st4x = track->Hit(7).fX;
- st4y = track->Hit(7).fY;
+ st4x = track->Hit(7).X();
+ st4y = track->Hit(7).Y();
st4z = AliHLTMUONCoreMansoTracker::GetZ8();
}
else
{
- st4x = track->Hit(6).fX;
- st4y = track->Hit(6).fY;
+ st4x = track->Hit(6).X();
+ st4y = track->Hit(6).Y();
st4z = AliHLTMUONCoreMansoTracker::GetZ7();
}
- if (track->Hit(8).fX == 0. && track->Hit(8).fY == 0.)
+ if (track->Hit(8).X() == 0. && track->Hit(8).Y() == 0.)
{
- st5x = track->Hit(9).fX;
- st5y = track->Hit(9).fY;
+ st5x = track->Hit(9).X();
+ st5y = track->Hit(9).Y();
st5z = AliHLTMUONCoreMansoTracker::GetZ10();
}
else
{
- st5x = track->Hit(8).fX;
- st5y = track->Hit(8).fY;
+ st5x = track->Hit(8).X();
+ st5y = track->Hit(8).Y();
st5z = AliHLTMUONCoreMansoTracker::GetZ9();
}
Double_t x[4] = {st4x, st5x,
- trigrec->Station1Point().fX, trigrec->Station2Point().fX
+ trigrec->Station1Point().X(), trigrec->Station2Point().X()
};
Double_t y[4] = {st4y, st5y,
- trigrec->Station1Point().fY, trigrec->Station2Point().fY
+ trigrec->Station1Point().Y(), trigrec->Station2Point().Y()
};
Double_t z[4] = {st4z, st5z,
AliHLTMUONCoreMansoTracker::GetZ11(),
str += "\t";
str += track->Pt();
str += "\t7\t";
- str += track->Hit(6).fX;
+ str += track->Hit(6).X();
str += "\t";
- str += track->Hit(6).fY;
+ str += track->Hit(6).Y();
str += "\n\t\t\t\t\t\t8\t";
- str += track->Hit(7).fX;
+ str += track->Hit(7).X();
str += "\t";
- str += track->Hit(7).fY;
+ str += track->Hit(7).Y();
str += "\n\t\t\t\t\t\t9\t";
- str += track->Hit(8).fX;
+ str += track->Hit(8).X();
str += "\t";
- str += track->Hit(8).fY;
+ str += track->Hit(8).Y();
str += "\n\t\t\t\t\t\t10\t";
- str += track->Hit(9).fX;
+ str += track->Hit(9).X();
str += "\t";
- str += track->Hit(9).fY;
+ str += track->Hit(9).Y();
str += "\n";
#endif // LOG_NO_DEBUG
Double_t z = AliHLTMUONCoreMansoTracker::GetZ7();
- Double_t x = track->Hit(6).fX;
- if (track->Hit(6).fX == 0. && track->Hit(6).fY == 0.)
+ Double_t x = track->Hit(6).X();
+ if (track->Hit(6).X() == 0. && track->Hit(6).Y() == 0.)
{
z = AliHLTMUONCoreMansoTracker::GetZ8();
- x = track->Hit(7).fX;
+ x = track->Hit(7).X();
};
Double_t p = track->P();
#include "TError.h"
#include "TMath.h"
-#include "Utils.hpp"
+#include "AliHLTMUONUtils.h"
// I prefer to have the option of compiling in the ROOT Assert statements.
#include "AliRoot/ClusterFinderProxy.hpp"
#include "AliRoot/ADCStream.hpp"
#include "AliRoot/convert.hpp"
-#include "Utils.hpp"
-#include "new.hpp"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONOutOfMemory.h"
AliHLTMUONClusterFinderProxy::AliHLTMUONClusterFinderProxy(AliHLTMUONClusterFinderInterface* client)
if (fCurrentCluster != NULL)
{
- x = fCurrentCluster->fX;
- y = fCurrentCluster->fY;
+ x = fCurrentCluster->X();
+ y = fCurrentCluster->Y();
return kTRUE;
}
else
#include "AliRoot/ClusterFinderProxy.hpp"
#include "AliRoot/TrackerProxy.hpp"
-#include "Utils.hpp"
-#include "new.hpp"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONOutOfMemory.h"
namespace // AliMicroFramework should be hidden.
while (cs->MoreClusters())
{
AliHLTMUONCoreClusterPoint newpoint;
- cs->FetchCluster(newpoint.fX, newpoint.fY);
+ cs->FetchCluster(newpoint.X(), newpoint.Y());
fClusters[chamber][currentcount[chamber]++] = newpoint;
cs->GetNextCluster();
}
*/
AliHLTMUONPoint(Float_t x, Float_t y);
- virtual ~AliHLTMUONPoint() {};
+ virtual ~AliHLTMUONPoint() {}
+ Float_t X() const { return fX; }
+ Float_t& X() { return fX; }
+ void X(Float_t x) { fX = x; }
+ Float_t Y() const { return fY; }
+ Float_t& Y() { return fY; }
+ void Y(Float_t y) { fY = y; }
+
+private:
Float_t fX; // X coordinate of the 2D point.
Float_t fY; // Y coordinate of the 2D point.
#include "AliRoot/Region.hpp"
#include "AliRoot/Point.hpp"
#include <TMath.h>
-#include "Utils.hpp"
+#include "AliHLTMUONUtils.h"
ClassImp(AliHLTMUONRegion)
// otherwise kFALSE is returned.
return
- fLeft <= p.fX
- && p.fX <= fRight
- && fBottom <= p.fY
- && p.fY <= fTop;
+ fLeft <= p.X()
+ && p.X() <= fRight
+ && fBottom <= p.Y()
+ && p.Y() <= fTop;
}
#include "AliRoot/Track.hpp"
#include <TMath.h>
-#include "Utils.hpp"
+#include "AliHLTMUONUtils.h"
ClassImp(AliHLTMUONTrack)
#include "AliRoot/TrackerProxy.hpp"
#include "AliRoot/convert.hpp"
-#include "Utils.hpp"
-#include "new.hpp"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONOutOfMemory.h"
AliHLTMUONTrackerProxy::AliHLTMUONTrackerProxy(AliHLTMUONTrackerInterface* client)
#include <TObject.h>
#include "AliRoot/Point.hpp"
-#include "Utils.hpp"
+#include "AliHLTMUONUtils.h"
class AliHLTMUONTriggerRecord : public TObject
switch (fAreaToUse)
{
case kFromWholePlane: return kTRUE;
- case kFromLeftHalfPlane: return data.Station1Point().fX <= 0;
- case kFromRightHalfPlane: return data.Station1Point().fX > 0;
+ 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.");
DebugMsg(2, "Pt = " << record.Pt() );
// Build the impact points.
- record.Station1Point().fX = circuit.GetX11Pos(trigger->LoStripY());
- record.Station1Point().fY = circuit.GetY11Pos(trigger->LoStripX());
- record.Station2Point().fY = circuit.GetY21Pos(trigger->LoStripX() + trigger->LoDev() + 1); // Why + 1?
- record.Station2Point().fX = AliMUONConstants::DefaultChamberZ(12) * record.Station1Point().fX / AliMUONConstants::DefaultChamberZ(10);
- DebugMsg(2, "fStation1x = " << record.Station1Point().fX);
- DebugMsg(2, "fStation1y = " << record.Station1Point().fY);
- DebugMsg(2, "fStation2x = " << record.Station2Point().fX);
- DebugMsg(2, "fStation2y = " << record.Station2Point().fY);
+ 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());
}
// use hits from chamber 12.
if ( ! TMath::IsNaN(x1))
{
- record.Station1Point().fX = x1;
- record.Station1Point().fY = y1;
+ 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().fX = x2;
- record.Station1Point().fY = y2;
+ record.Station1Point().X() = x2;
+ record.Station1Point().Y() = y2;
z1 = z2;
DebugMsg(3, "Using value from chamber 12: x2 = " << x2 << ", y2 = " << y2 << ", z2 = " << z2 );
}
// use hits from chamber 14.
if ( ! TMath::IsNaN(x3))
{
- record.Station2Point().fX = x3;
- record.Station2Point().fY = y3;
+ 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().fX = x4;
- record.Station2Point().fY = y4;
+ record.Station2Point().X() = x4;
+ record.Station2Point().Y() = y4;
z2 = z4;
DebugMsg(3, "Using value from chamber 14: x4 = " << x4 << ", y4 = " << y4 << ", z4 = " << z4 );
}
record.ParticleSign(0);
DebugMsg(3, "Particle sign = " << record.ParticleSign());
- DebugMsg(3, "Calculating Pt: x1 = " << record.Station1Point().fX
- << ", y1 = " << record.Station1Point().fY
- << ", y2 = " << record.Station2Point().fY
+ 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().fX,
- record.Station1Point().fY, record.Station2Point().fY,
+ record.Station1Point().X(),
+ record.Station1Point().Y(), record.Station2Point().Y(),
z1, z2
);
record.Pt(pt);
////////////////////////////////////////////////////////////////////////////////
#include "AliRoot/convert.hpp"
-#include "Utils.hpp"
-#include "Error.hpp"
+#include "AliHLTMUONUtils.h"
AliHLTMUONPoint AliHLTMUONConvert(const AliHLTMUONCorePoint& point)
{
DebugMsg(5, "Convert from AliHLTMUONCorePoint");
- return AliHLTMUONPoint(point.fX, point.fY);
+ return AliHLTMUONPoint(point.X(), point.Y());
}
AliHLTMUONCorePoint AliHLTMUONConvert(const AliHLTMUONPoint& point)
{
DebugMsg(5, "Convert from AliHLTMUONPoint");
- return AliHLTMUONCorePoint(point.fX, point.fY);
+ return AliHLTMUONCorePoint(point.X(), point.Y());
}
#ifndef ALIHLTMUONCONVERT_H
#define ALIHLTMUONCONVERT_H
-#include "../Point.hpp"
+#include "../AliHLTMUONCorePoint.h"
#include "AliRoot/Point.hpp"
-#include "../TriggerRecord.hpp"
+#include "../AliHLTMUONCoreTriggerRecord.h"
#include "AliRoot/TriggerRecord.hpp"
-#include "../Track.hpp"
+#include "../AliHLTMUONCoreTrack.h"
#include "AliRoot/Track.hpp"
-#include "../RegionOfInterest.hpp"
+#include "../AliHLTMUONCoreRegionOfInterest.h"
#include "AliRoot/Region.hpp"
/* Conversion routines to convert from dHLT structures to AliRoot structures
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONBASICTYPES_H
-#define ALIHLTMUONBASICTYPES_H
-
-
-#ifndef NULL
-# define NULL 0x0
-#endif
-
-
-typedef char Char;
-typedef short Short;
-typedef int Int;
-typedef long Long;
-typedef unsigned char UChar;
-typedef unsigned short UShort;
-typedef unsigned int UInt;
-typedef unsigned long ULong;
-typedef float Float;
-typedef double Double;
-
-typedef char* NullString;
-
-
-#endif // ALIHLTMUONBASICTYPES_H
#ifndef ALIHLTMUONCORECOUNTEDLIST_H
#define ALIHLTMUONCORECOUNTEDLIST_H
-#include "BasicTypes.hpp"
-#include "Utils.hpp"
-#include "new.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONOutOfMemory.h"
#include "Buffers/List.hpp"
#ifdef DEBUG
#ifndef ALIHLTMUONCOREBUFFERSLIST_H
#define ALIHLTMUONCOREBUFFERSLIST_H
-#include "BasicTypes.hpp"
-#include "Utils.hpp"
-#include "new.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONOutOfMemory.h"
#ifdef DEBUG
#include <iostream>
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONCORECLUSTER_H
-#define ALIHLTMUONCORECLUSTER_H
-
-#include "Point.hpp"
-
-
-typedef AliHLTMUONCorePoint AliHLTMUONCoreClusterPoint;
-
-
-#endif // ALIHLTMUONCORECLUSTER_H
////////////////////////////////////////////////////////////////////////////////
#include "Clustering/CenterOfGravityFinder.hpp"
-#include "Error.hpp"
+#include "AliHLTMUONError.h"
AliHLTMUONCoreCenterOfGravityFinder::AliHLTMUONCoreCenterOfGravityFinder()
#ifndef ALIHLTMUONCORECLUSTERFINDER_H
#define ALIHLTMUONCORECLUSTERFINDER_H
-#include "BasicTypes.hpp"
-#include "Cluster.hpp"
-#include "ADCStream.hpp"
-#include "Utils.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONCoreCluster.h"
+#include "AliHLTMUONCoreADCStream.h"
class AliHLTMUONCoreClusterFinder;
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
+// Print routines to display internal dHLT data on the console.
+// The << operators are overloaded to write to ostreams.
+//
////////////////////////////////////////////////////////////////////////////////
-#include "Debug/print.hpp"
+#include "Debug/AliHLTMUONPrint.h"
+#include "AliHLTMUONCoreEventID.h"
+#include "AliHLTMUONCorePoint.h"
+#include "AliHLTMUONCoreTriggerRecord.h"
+#include "AliHLTMUONCoreRegionOfInterest.h"
#include <iostream>
using std::endl;
ostream& operator << (ostream& os, const AliHLTMUONCorePoint& p)
{
- os << "[" << p.fX << ", " << p.fY << "]";
+ os << "[" << p.X() << ", " << p.Y() << "]";
return os;
}
+#ifndef AliHLTMUONPRINT_H
+#define AliHLTMUONPRINT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
////////////////////////////////////////////////////////////////////////////////
//
// Author: Artur Szostak
// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
//
+// Print routines to display internal dHLT data on the console.
+//
////////////////////////////////////////////////////////////////////////////////
-#ifndef dHLT_DEBUG_PRINT_ROUTINES_HPP
-#define dHLT_DEBUG_PRINT_ROUTINES_HPP
-
#include <ostream>
-#include "EventID.hpp"
-#include "Point.hpp"
-#include "TriggerRecord.hpp"
-#include "RegionOfInterest.hpp"
+#include "AliHLTMUONCoreEventID.h"
+#include "AliHLTMUONCorePoint.h"
+#include "AliHLTMUONCoreTriggerRecord.h"
+#include "AliHLTMUONCoreRegionOfInterest.h"
std::ostream& operator << (std::ostream& os, const AliHLTMUONCoreEventID& id);
std::ostream& operator << (std::ostream& os, const AliHLTMUONCorePoint& p);
std::ostream& operator << (std::ostream& os, const AliHLTMUONCoreTriggerRecord& rec);
std::ostream& operator << (std::ostream& os, const AliHLTMUONCoreChamberID chamber);
-#endif // dHLT_DEBUG_PRINT_ROUTINES_HPP
+#endif // AliHLTMUONPRINT_H
#ifndef dHLT_DECISION_DECISION_MAKER_HPP
#define dHLT_DECISION_DECISION_MAKER_HPP
-#include "BasicTypes.hpp"
-#include "Track.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONCoreTrack.h"
#include "DecisionRecord.hpp"
-#include "Utils.hpp"
namespace dHLT
#ifndef dHLT_DECISION_RECORD_HPP
#define dHLT_DECISION_RECORD_HPP
-#include "BasicTypes.hpp"
-#include "Track.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONCoreTrack.h"
namespace dHLT
{
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONCOREEVENTID_H
-#define ALIHLTMUONCOREEVENTID_H
-
-#include "BasicTypes.hpp"
-#include "Utils.hpp"
-
-
-// Must correct this definition!!!!
-struct AliHLTMUONCoreEventID
-{
- UInt fBunch;
- UInt fTimeStamp;
-
-
- AliHLTMUONCoreEventID(UInt bunch = 0, UInt timestamp = 0)
- {
- fBunch = bunch;
- fTimeStamp = timestamp;
- };
-
-
- bool operator == (const AliHLTMUONCoreEventID& rhs)
- {
- return fBunch == rhs.fBunch and fTimeStamp == rhs.fTimeStamp;
- };
-
- bool operator != (const AliHLTMUONCoreEventID& rhs)
- {
- return not (*this == rhs);
- };
-};
-
-
-#endif // ALIHLTMUONCOREEVENTID_H
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONCOREPOINT_H
-#define ALIHLTMUONCOREPOINT_H
-
-#include "BasicTypes.hpp"
-
-
-/* A 2D point structure using floats.
- These are used to store impact points on the trigger chambers and
- cluster centroids.
- */
-class AliHLTMUONCorePoint
-{
-public:
-
- Float fX, fY;
-
- AliHLTMUONCorePoint()
- {
- fX = 0.0;
- fY = 0.0;
- }
-
- AliHLTMUONCorePoint(Float x, Float y)
- {
- fX = x;
- fY = y;
- }
-};
-
-
-#endif // ALIHLTMUONCOREPOINT_H
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef ALIHLTMUONCORETRACK_H
-#define ALIHLTMUONCORETRACK_H
-
-#include "Point.hpp"
-#include "RegionOfInterest.hpp"
-#include "TriggerRecord.hpp"
-
-
-typedef UInt AliHLTMUONCoreTrackID;
-
-
-struct AliHLTMUONCoreTrack
-{
-
- AliHLTMUONCoreTriggerRecordID fTriggerid;
- AliHLTMUONCoreParticleSign fSign;
- Float fP; // momentum.
- Float fPt; // transverse momentum.
- AliHLTMUONCorePoint fPoint[10]; // Computed track coordinates on the 10 tracking chambers.
- AliHLTMUONCoreROI fRegion[10]; // Regions of interest from which clusters were used to compute this track.
-
-};
-
-
-#endif // ALIHLTMUONCORETRACK_H
//
////////////////////////////////////////////////////////////////////////////////
-#include "BasicTypes.hpp"
+#include "AliHLTMUONBasicTypes.h"
/* Computes the Pt (transverse mementum) based on the equations given in the
#include "Tracking/MansoTracker.hpp"
#include <math.h>
#include "Tracking/Calculations.hpp"
-#include "Utils.hpp"
-#include "Error.hpp"
-#include "RegionOfInterest.hpp"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONError.h"
+#include "AliHLTMUONCoreRegionOfInterest.h"
#if defined(DEBUG) || (defined(USE_ALILOG) && ! defined(LOG_NO_DEBUG))
#include <ostream>
-#include "Debug/print.hpp"
+#include "Debug/AliHLTMUONPrint.h"
namespace
{
fCentre = p;
// Compute the radius Rp
- Float rp = (Float) sqrt( p.fX * p.fX + p.fY * p.fY );
+ Float rp = (Float) sqrt( p.X() * p.X() + p.Y() * p.Y() );
// The radius Rs for the region of interest is computed from the
// specification given in the document:
// Compute the distance between the centre of the region of interest and
// the point p. This distance must be less than the radius of the region
// of interest for p to be contained in the region of interest.
- register Float lx = fCentre.fX - p.fX;
- register Float ly = fCentre.fY - p.fY;
+ register Float lx = fCentre.X() - p.X();
+ register Float ly = fCentre.Y() - p.Y();
register Float r = (Float) sqrt( lx * lx + ly * ly );
DebugMsg(4, "\tAliRegionOfInterest::Contains : p = " << p
<< " , centre = " << fCentre << " , r = " << r << " , Rs = " << fRs
{
// Works out the smallest boundary box that will contain the region of interest.
- left = fCentre.fX - fRs;
- right = fCentre.fX + fRs;
- bottom = fCentre.fY - fRs;
- top = fCentre.fY + fRs;
+ left = fCentre.X() - fRs;
+ right = fCentre.X() + fRs;
+ bottom = fCentre.Y() - fRs;
+ top = fCentre.Y() + fRs;
}
{
// Construct vertex from a point on the XY plane and z coordinate.
- fX = xy.fX;
- fY = xy.fY;
+ fX = xy.X();
+ fY = xy.Y();
fZ = z;
}
DebugMsg(4, "FillTrack: st5 = " << fSt5rec->fClusterPoint << ", st4 = " << fFoundPoint->fClusterPoint);
- Float x1 = fFoundPoint->fClusterPoint.fX;
- Float y1 = fFoundPoint->fClusterPoint.fY;
- Float y2 = fSt5rec->fClusterPoint.fY;
+ Float x1 = fFoundPoint->fClusterPoint.X();
+ Float y1 = fFoundPoint->fClusterPoint.Y();
+ Float y2 = fSt5rec->fClusterPoint.Y();
Float momentum;
Float pt = AliHLTMUONCoreCalculateSignedPt(x1, y1, y2, fSt4z, fSt5z, momentum);
DebugMsg(1, "Calculated Pt = " << pt);
// Check that the cluster actually is in our region of interest on station 4.
if ( data->fRoi.Contains(cluster) )
{
- DebugMsg(4, "Adding cluster [" << cluster.fX << ", " << cluster.fY << "] from chamber 7.");
+ DebugMsg(4, "Adding cluster [" << cluster.X() << ", " << cluster.Y() << "] from chamber 7.");
AliStation4Data* newdata = fSt4points.New();
newdata->fClusterPoint = cluster;
newdata->fSt5tag = data;
// Check that the cluster actually is in our region of interest on station 4.
if ( data->fRoi.Contains(cluster) )
{
- DebugMsg(4, "Adding cluster [" << cluster.fX << ", " << cluster.fY << "] from chamber 8.");
+ DebugMsg(4, "Adding cluster [" << cluster.X() << ", " << cluster.Y() << "] from chamber 8.");
AliStation4Data* newdata = fSt4points.New();
newdata->fClusterPoint = cluster;
newdata->fSt5tag = data;
// Check that the cluster actually is in our region of interest on station 5.
if ( fMc1.fRoi.Contains(cluster) )
{
- DebugMsg(4, "Adding cluster [" << cluster.fX << ", " << cluster.fY << "] from chamber 9.");
+ DebugMsg(4, "Adding cluster [" << cluster.X() << ", " << cluster.Y() << "] from chamber 9.");
AliStation5Data* data = fSt5data.New();
data->fClusterPoint = cluster;
ProjectToStation4(data, fgZ9); // This adds a new request for station 4.
// Check that the cluster actually is in our region of interest on station 5.
if ( fMc1.fRoi.Contains(cluster) )
{
- DebugMsg(4, "Adding cluster [" << cluster.fX << ", " << cluster.fY << "] from chamber 10.");
+ DebugMsg(4, "Adding cluster [" << cluster.X() << ", " << cluster.Y() << "] from chamber 10.");
AliStation5Data* data = fSt5data.New();
data->fClusterPoint = cluster;
ProjectToStation4(data, fgZ10); // This adds a new request for station 4.
#ifndef ALIHLTMUONCOREMANSOTRACKER_H
#define ALIHLTMUONCOREMANSOTRACKER_H
-#include "BasicTypes.hpp"
+#include "AliHLTMUONBasicTypes.h"
#include "Tracking/Tracker.hpp"
#include "Buffers/List.hpp"
#include "Buffers/CountedList.hpp"
#ifndef ALIHLTMUONCORETRACKER_H
#define ALIHLTMUONCORETRACKER_H
-#include "BasicTypes.hpp"
-#include "TriggerRecord.hpp"
-#include "Cluster.hpp"
-#include "Track.hpp"
-#include "EventID.hpp"
-#include "RegionOfInterest.hpp"
-#include "Utils.hpp"
+#include "AliHLTMUONBasicTypes.h"
+#include "AliHLTMUONUtils.h"
+#include "AliHLTMUONCoreTriggerRecord.h"
+#include "AliHLTMUONCoreCluster.h"
+#include "AliHLTMUONCoreTrack.h"
+#include "AliHLTMUONCoreEventID.h"
+#include "AliHLTMUONCoreRegionOfInterest.h"
class AliHLTMUONCoreTracker;
+++ /dev/null
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "Utils.hpp"
-
-#ifdef DEBUG
-
-// The global debug level, specifying how much debug information should
-// be written to screen.
-int gAliHLTMUONDebugLevel = 0x7FFFFFFF;
-
-#endif // DEBUG
#ifndef dHLT_VERSION_FUNCTIONS_HPP
#define dHLT_VERSION_FUNCTIONS_HPP
-#include "BasicTypes.hpp"
+#include "AliHLTMUONBasicTypes.h"
namespace dHLT
{
MUON/src/AliRoot/Tracker.hpp \
MUON/src/AliRoot/ClusterFinder.hpp \
-SRCS += MUON/src/Utils.cxx \
-MUON/src/AliHLTMUONError.cxx \
+SRCS += MUON/src/AliHLTMUONUtils.cxx \
+MUON/src/AliHLTMUONOutOfMemory.cxx \
MUON/src/Version/Version.cxx \
-MUON/src/RegionOfInterest.cxx \
+MUON/src/AliHLTMUONCoreRegionOfInterest.cxx \
MUON/src/Tracking/Calculations.cxx \
MUON/src/Tracking/MansoTracker.cxx \
MUON/src/Clustering/CenterOfGravityFinder.cxx \
MUON/src/AliRoot/ClusterFinderProxy.cxx \
MUON/src/AliRoot/convert.cxx \
MUON/src/AliRoot/AliHLTMUONTracker.cxx \
-MUON/src/Debug/print.cxx
+MUON/src/Debug/AliHLTMUONPrint.cxx
DHDR:= MUON/src/AliRoot/MUONHLTLinkDef.h