]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modified files to use constants declared in the
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Jul 2007 11:18:30 +0000 (11:18 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 10 Jul 2007 11:18:30 +0000 (11:18 +0000)
namespace PhosHltConst.

HLT/PHOS/AliHLTPHOSClusterizer.h
HLT/PHOS/AliHLTPHOSCommonDefs.h
HLT/PHOS/AliHLTPHOSEmcCalibData.h
HLT/PHOS/AliHLTPHOSModuleMergerComponent.cxx
HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.cxx
HLT/PHOS/AliHLTPHOSProcessor.h
HLT/PHOS/AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h
HLT/PHOS/AliHLTPHOSRcuCellEnergyDataStruct.h
HLT/PHOS/AliHLTPHOSRcuHistogramProducerComponent.cxx

index 59b0697594efe7556ba8030e7fa8441ee3b461e5..8cbe2971a0cac4258446176fdec09a8a6f422d67 100644 (file)
@@ -2,7 +2,7 @@
  * See cxx source for full Copyright notice                               */
 
 /** @file   AliHLTPHOSClusterizer.h
-    @author Øystein Djuvsland
+    @author Ã\83Â\98ystein Djuvsland
     @date   
     @brief  A temporary clusterizer for PHOS
 */
@@ -10,7 +10,9 @@
 #ifndef ALIHLTPHOSCLUSTERIZER_H
 #define ALIHLTPHOSCLUSTERIZER_H
 
-#include "AliHLTPHOSCommonDefs.h"
+//#include "AliHLTPHOSCommonDefs.h"
+#include "AliHLTPHOSConstants.h"
+using namespace PhosHLTConst;
 
 struct AliHLTPHOSClusterDataStruct;
 struct AliHLTPHOSRecPointDataStruct;
index f2f794292d7ea2968da2b4a2f962d93df53627c1..1398d02eb7f3ad149392b1be4c6cae0348a882f2 100644 (file)
@@ -1,52 +1,91 @@
-#ifndef ALIPHOSCOMMONDEFS_H
-#define ALIPHOSCOMMONDEFS_H
-
-//Hardware constants
-#define N_MODULES          5                             /**<Number of modules of the PHOS detector*/
-#define N_RCUS             4                             /**<Number of RCUs per Module*/
-#define N_RCUS_PER_MODULE  4                             /**<Number of RCUs per Module*/
-#define N_RCUS_PER_TOTAL   N_MODULES*N_RCUS_PER_MODULE   /**<Total number of RCUs for PHOS*/
-#define N_BRANCHES         2                             /**<Number of branches per RCU*/
-#define N_FEECS           14                             /**<Number of Frontend cards per branch*/
-#define N_ALTROS           4                             /**<Number of ALTROs per frontend card*/
-#define N_ALTROCHANNELS   16                             /**<Number of readout channles per ALTRO*/
-#define ALTRO_MAX_SAMPLES 1008                           /**<The maximum number of samples of the ALTRO*/
-
-//Geometry constants
-#define N_ROWS_MOD         56                            /**<Number of rows per module*/       
-#define N_COLUMNS_MOD      64                            /**<Number of columns per module*/ 
-
-#define N_ROWS_RCU         28                            /**<Number of rows per module*/       
-#define N_COLUMNS_RCU      32   
-#define N_ZROWS_RCU        N_ROWS_RCU                    /**<Number of rows per module*/       
-#define N_XCOLUMNS_RCU     N_COLUMNS_RCU 
-
-#define N_ZROWS_MOD        N_ROWS_MOD                    /**<Number of rows per module*/       
-#define N_XCOLUMNS_MOD     N_COLUMNS_MOD                 /**<Number of columns per module*/ 
-
-#define N_GAINS            2                             /**<Number of gains per ALTRO channel*/
-#define N_DATATYPES        10                            /**<Max number of output datatypes for a single component*/
-
-//peakfinder constatnts
-#define PF_MAX_PATH_LENGTH 256
-#define PF_VECTOR_DIR "/HLT/PHOS/PFVectors"
-#define PF_DEFAULT_N_SAMPLES 70
-#define PF_DEFAULT_STARTINDEX 0
-
-//analysis constatnts
-#define LOW_GAIN 1
-#define HIGH_GAIN 0
-
-//general altro signal constatnts
-#define DEFAULT_TAU 2    /**<Assume that the signal rise time of the altrp pulses is 2 us (nominal value of the electronics)*/
-#define DEFAULT_FS  10   /**<Assume that the signal is samples with 10 MHZ samle rate*/
-
-//HOMER
-#define MAX_BIN_VALUE 1023
-#define MAX_HOSTS 20
-#define MAX_HOSTNAME_LENGTH 64
-#define DEFAULT_EVENT_PORT 42001 
-#define DEFAULT_HISTO_PORT 42002 
+#ifndef COMMONDEFS_H
+#define COMMONDEFS_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2006                                       *
+ *                                                                        * 
+ * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project.  *
+ * Contributors are mentioned in the code where appropriate.              *
+ * Please report bugs to perthi@fys.uio.no                                * 
+ *                                                                        *
+ * 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.                  *
+ **************************************************************************/
+
+#include "PhosConst.h"
+
+#define PHOS_CRYSTALS  (PHOS_MODS*PHOS_ROWS*PHOS_COLS)  // Total number of PHOS crystals
+
+//#define unsigned long int PHOS_CHANNELS      (PHOS_GAINS*PHOS_CRYSTALS) // Total number of PHOS channels
+//#define unsigned long int MP_MAP_FILE_NAME   "phosmp.map" // Shared memory map file name
+//#define unsigned long int MP_MAP_FILE_SIZE   (PHOS_CHANNELS*1024*8) // Shared memory map file size
+//#define unsigned long int MP_RESULT_DIR      "mp_result" // Directory to store result to
+
+#define  PHOS_CHANNELS (PHOS_GAINS*PHOS_CRYSTALS) // Total number of PHOS channels
+#define  MP_MAP_FILE_NAME      "phosmp.map" // Shared memory map file name
+#define  MP_MAP_FILE_SIZE      (PHOS_CHANNELS*1024*8) // Shared memory map file size
+#define  MP_RESULT_DIR "mp_result" // Directory to store result to
+
+
+////#define unsigned long int TRUE     1 // General purpose definition
+////#define FALSE      0 // General purpose definition
+
+
+#define MIN(x,y) ((x)>(y)?(y):(x))
+#define MAX(x,y) ((x)>(y)?(x):(y))
+#define ADJUST_TO_HIGHER(size,step) ((((size)+(step)-1)/(step))*(step))
+#define ADJUST_TO_LOWER(size,step) (((size)/(step))*(step))
+
+/////////////////////////////////////////////
+// Find index of maximum in array of any type
+/////////////////////////////////////////////
+
+#define __IMPLEMENT__findIndexOfMax(type)                      \
+       inline int findIndexOfMax(type *data, int count)        \
+       { int m=0; for(int i=1; i<count; i++) if(data[i]>data[m]) m=i; return m;}
+__IMPLEMENT__findIndexOfMax(char)
+__IMPLEMENT__findIndexOfMax(unsigned char)
+__IMPLEMENT__findIndexOfMax(int)
+__IMPLEMENT__findIndexOfMax(unsigned int)
+__IMPLEMENT__findIndexOfMax(short int)
+__IMPLEMENT__findIndexOfMax(unsigned short int)
+__IMPLEMENT__findIndexOfMax(long long)
+__IMPLEMENT__findIndexOfMax(unsigned long long)
+__IMPLEMENT__findIndexOfMax(float)
+__IMPLEMENT__findIndexOfMax(double)
+       
+/////////////////////////////////////////////
+// Find index of minimum in array of any type
+/////////////////////////////////////////////
+#define __IMPLEMENT__findIndexOfMin(type)                      \
+       inline int findIndexOfMin(type *data, int count)        \
+       { int m=0; for(int i=1; i<count; i++) if(data[i]<data[m]) m=i; return m;}
+__IMPLEMENT__findIndexOfMin(char)
+__IMPLEMENT__findIndexOfMin(unsigned char)
+__IMPLEMENT__findIndexOfMin(int)
+__IMPLEMENT__findIndexOfMin(unsigned int)
+__IMPLEMENT__findIndexOfMin(short int)
+__IMPLEMENT__findIndexOfMin(unsigned short int)
+__IMPLEMENT__findIndexOfMin(long long)
+__IMPLEMENT__findIndexOfMin(unsigned long long)
+__IMPLEMENT__findIndexOfMin(float)
+__IMPLEMENT__findIndexOfMin(double)
+       
+//////////////////////////////////////
+// Fill struct x of any type with zero
+//////////////////////////////////////
+#define FILL_ZERO(x)   memset(&(x),0,sizeof(x))
+
+//////////////
+// END OF FILE
+//////////////
 
 #endif
 
index 08d5092e50c602154d6447f17ab61e601ccd30d5..f8949693c4a8d94fe6a00ed2b1f324d65bdf4d54 100644 (file)
 
 #include "TNamed.h"
 #include "AliHLTPHOSCommonDefs.h"
+#include "AliHLTPHOSConstants.h"
 
 
+//              PhosHLTConst
+using namespace PhosHLTConst;
+
 class AliHLTPHOSEmcCalibData: public TNamed {
 
  public:
index 956f2f70b12fdff2a465b039391482f39d414980..8db4e3830627fe7cb23da9d10eede897ddc94c95 100644 (file)
@@ -13,6 +13,8 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+
+
 #include "AliHLTPHOSModuleMergerComponent.h"
 #include "AliRawReaderMemory.h"
 #include "AliCaloRawStream.h"
@@ -26,7 +28,7 @@ const AliHLTComponentDataType  AliHLTPHOSModuleMergerComponent::fgkOutputDataTyp
 AliHLTPHOSModuleMergerComponent gAliHLTPHOSModuleMergerComponent;
 
 //_____________________________________________________________________________________________________
-AliHLTPHOSModuleMergerComponent:: AliHLTPHOSModuleMergerComponent():AliHLTProcessor(),  fPhosEventCount(0),  fEquippmentID(0)
+AliHLTPHOSModuleMergerComponent:: AliHLTPHOSModuleMergerComponent():AliHLTPHOSProcessor(),  fPhosEventCount(0),  fEquippmentID(0)
 {
 
 } 
@@ -40,7 +42,7 @@ AliHLTPHOSModuleMergerComponent::~ AliHLTPHOSModuleMergerComponent()
 
 
 //_____________________________________________________________________________________________________
-AliHLTPHOSModuleMergerComponent::AliHLTPHOSModuleMergerComponent(const  AliHLTPHOSModuleMergerComponent & ) : AliHLTProcessor(),  fPhosEventCount(0),  fEquippmentID(0)
+AliHLTPHOSModuleMergerComponent::AliHLTPHOSModuleMergerComponent(const  AliHLTPHOSModuleMergerComponent & ) : AliHLTPHOSProcessor(),  fPhosEventCount(0),  fEquippmentID(0)
 {
 
 }
index 8ba116756a5e67b586f23c25d60dd701760f4377..70d7fd7a1e2b735f1db0e72fb3328ec6ba909490 100644 (file)
@@ -2,7 +2,7 @@
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
- * Author: Øystein Djuvsland <oysteind@ift.uib.no>                        *
+ * Author: Ã\83Â\98ystein Djuvsland <oysteind@ift.uib.no>                        *
  *                                                                        *
  * Permission to use, copy, modify and distribute this software and its   *
  * documentation strictly for non-commercial purposes is hereby granted   *
@@ -24,6 +24,8 @@
 #include "AliHLTPHOSCommonDefs.h"
 #include "AliHLTPHOSClusterDataStruct.h"
  
+#include "AliHLTPHOSConstants.h"
+using namespace PhosHLTConst;
 
 ClassImp(AliHLTPHOSPhysicsAnalyzer);
 
index e23bc05c90102837dc454bae4032c509f5ddfdad..ebd3af7aed6be2ed0e14e92f2da1cf2e6b4b3d21 100644 (file)
@@ -2,6 +2,10 @@
 #define ALIHLTPHOSPROCESSOR_H
 
 #include "AliHLTProcessor.h"
+#include "AliHLTPHOSConstants.h"
+#include "AliHLTPHOSCommonDefs.h"
+
+using namespace PhosHLTConst;
 
 class AliHLTPHOSProcessor:public AliHLTProcessor
 {
index 95f59f95dc85c98977f3ca8232d309293328ff9e..7d0f8c30f60c22045d36b336d9865ffefb6a44f1 100644 (file)
  * provided "as is" without express or implied warranty.                   *
  **************************************************************************/
 
-#include "AliHLTPHOSCommonDefs.h"
+
+//#include "AliHLTPHOSCommonDefs.h"
+#include "AliHLTPHOSConstants.h"
+using namespace PhosHLTConst;
 
 
 struct AliHLTPHOSRcuCellAccumulatedEnergyDataStruct
index 46edd5caaa59be6735354a6af9a36f8bb4b91eb4..38c9ce4a68b0f2bc4d431d8312736219c2550cc1 100644 (file)
 #include "AliHLTPHOSValidCellDataStruct.h"
 #include "Rtypes.h"
 
+//#include "AliHLTPHOSConstants.h"
+#include "AliHLTPHOSConstants.h"
+using namespace PhosHLTConst;
+
 struct AliHLTPHOSRcuCellEnergyDataStruct
 {
   Int_t fModuleID;
index fd48d993784e22c8690472be8f246851cbc1c9eb..751dc9273514796ad2bf121fa8e0d65ae7a92d54 100644 (file)
@@ -21,9 +21,6 @@
 #include "AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h"
 
 
-//const AliHLTComponentDataType  AliHLTPHOSRcuHistogramProducerComponent::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
-//const AliHLTComponentDataType  AliHLTPHOSRcuHistogramProducerComponent::fgkOutputDataType=kAliHLTVoidDataType;
-
 AliHLTPHOSRcuHistogramProducerComponent gAliHLTPHOSRcuHistogramProducerComponent;