]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Online Fourier analysis
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Aug 2008 02:04:12 +0000 (02:04 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Aug 2008 02:04:12 +0000 (02:04 +0000)
13 files changed:
HLT/PHOS/AliHLTPHOSDefinitions.cxx
HLT/PHOS/AliHLTPHOSDefinitions.h
HLT/PHOS/AliHLTPHOSFourier.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSFourier.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSFourierComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSFourierComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSRcuAltroPatternTestComponent.cxx
HLT/PHOS/AliHLTPHOSRcuFFTDataStruct.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRcuHistogramProducerComponent.h
HLT/PHOS/AliHLTPHOSUtilities.h
HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx
HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h

index 6017616ad9b099f672f550cf5b3c251a07ba9931..f57d7c9e5462d540c9bdd062c8e7265dc2c76c8f 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "AliHLTPHOSDefinitions.h"
 //CRAP PTH
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkFourierTransform              = { sizeof(AliHLTComponentDataType),       {'F','O','U','R','I','E','R','T'},{'P','H','O','S'}};;
+
 //const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkDDLPackedRawDataType          = { sizeof(AliHLTComponentDataType),       {'D','D','L','_','R','W','P','K'},{'P','H','O','S'}};;
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkDDLPackedRawDataType          = { sizeof(AliHLTComponentDataType),       {'D','D','L','_','R','A','W',' '},{'P','H','O','S'}};;
 const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellEnergyDataType            = { sizeof(AliHLTComponentDataType),       {'C','E','L','L','E','N','E','R'},{'P','H','O','S'}};;
index 854f137643b5e617961411bcae3a76f65dc50b36..053b2cb9a5eaccf8331694085535105a38368d70 100644 (file)
@@ -15,6 +15,7 @@
 class AliHLTPHOSDefinitions
 {
 public:
+  static const AliHLTComponentDataType fgkFourierTransform;    /**Fourier transform of time dependent signals*/
 
   static const AliHLTComponentDataType fgkCellEnergyDataType;    /**<Reconstructed cell/crystal energies*/
   static const AliHLTComponentDataType fgkDDLPackedRawDataType;  /**<DDL raw data on the RCU data format*/
diff --git a/HLT/PHOS/AliHLTPHOSFourier.cxx b/HLT/PHOS/AliHLTPHOSFourier.cxx
new file mode 100644 (file)
index 0000000..6d69368
--- /dev/null
@@ -0,0 +1,163 @@
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT 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 "AliHLTPHOSFourier.h"
+
+//#include "AliHLTPHOSRcuFFTDataStruct.h"
+
+AliHLTPHOSFourier::AliHLTPHOSFourier() :  fFFT_own(0),
+                                         fFFTInputArray(0),
+                                         fFFTOutputArray(0),
+                                         fIsFirstChannel(true),
+                                         fFixedDataSize(0), 
+                                         fFFTOupuStruct()
+{
+  
+
+}
+
+
+AliHLTPHOSFourier::AliHLTPHOSFourier(const AliHLTPHOSFourier&) : fFFT_own(0),
+                                                                fFFTInputArray(0),
+                                                                fFFTOutputArray(0),
+                                                                fIsFirstChannel(true),
+                                                                fFixedDataSize(0),
+                                                                fFFTOupuStruct()
+
+{
+  
+}
+
+
+AliHLTPHOSFourier::~AliHLTPHOSFourier()
+{
+
+}
+
+AliHLTPHOSRcuFFTDataStruct 
+AliHLTPHOSFourier::GetPSD()
+{
+  return fFFTOupuStruct;
+}
+
+
+void 
+AliHLTPHOSFourier::ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain)
+{
+  Double_t  re = 0;
+  Double_t  im = 0;
+
+  if(fIsFirstChannel == true)
+    {
+      fIsFirstChannel = false;
+      fFixedDataSize = length;
+      Int_t n_size = fFixedDataSize +1;
+      fFFT_own = TVirtualFFT::FFT(1, &n_size, "R2C ES K"); 
+      Init();
+  }
+
+  if( CheckSignal(data, length) == true)
+    {
+      Int2Double(data, fFFTInputArray,  fFixedDataSize );
+      fFFT_own->SetPoints( fFFTInputArray );    
+      fFFT_own->Transform();
+
+      for(int j=0; j < length; j++)
+       {
+         fFFT_own->GetPointComplex(j,  re,  im);
+         fFFTOupuStruct.fGlobalAccumulatedPSD[gain][j] +=  EvaluateMagnitude(re, im);
+         fFFTOupuStruct.fGlobalLastPSD[gain][j] =  EvaluateMagnitude(re, im);
+
+       }
+    }
+  //  printf("AliHLTPHOSFourier::ProcessFourier;  (z, x, gain)  =  (%d, %d, %d),  length = %d",  z,  x,  gain, length);
+}
+
+
+bool 
+//AliHLTPHOSFourier::CheckSignal(const UInt_t *data, const int length)
+AliHLTPHOSFourier::CheckSignal(const Int_t *data, const int length)
+{
+  //  UInt_t tmpMax =  Max(  const_cast< UInt_t *>(data), length);
+  //  UInt_t tmpMin =  Min(  const_cast< UInt_t *>(data), length);
+
+
+  Int_t tmpMax =  Max(  const_cast< Int_t *>(data), length);
+  Int_t tmpMin =  Min(  const_cast< Int_t *>(data), length);
+
+
+  // if( (tmpMax -tmpMin) > 200)
+  if( (tmpMax -tmpMin) > 100)
+   {
+      cout << "FourierAna::CheckSignal min = "<< tmpMin << "  max =  " << tmpMax << endl;
+    }
+  
+  if( (tmpMax >= MAX_BIN_VALUE) || tmpMin < 1 )
+    {
+      cout << "ERROR, FourierAna::CheckSignal failed, signal out of range, min= "<< tmpMin << "max = " << tmpMax << endl;
+      return false;
+    }
+  else
+    {
+      return true;
+    }
+  
+  //return true;
+}
+
+
+void 
+AliHLTPHOSFourier::Init()
+{
+  fFFTInputArray = new double[fFixedDataSize];
+  fFFTOutputArray = new double[fFixedDataSize];
+  
+  for(int gain = 0; gain < N_GAINS; gain ++)
+    {
+      fFFTOupuStruct.fDataLength = fFixedDataSize;
+      for(int k= 0; k <fFixedDataSize; k++ )
+       {
+         fFFTInputArray[k] = 0;
+         fFFTOutputArray[k] = 0;
+
+       }
+      for(int i=0; i <  ALTRO_MAX_SAMPLES  ; i++)
+       {
+         fFFTOupuStruct.fGlobalAccumulatedPSD[gain][i] = 0;
+         fFFTOupuStruct.fGlobalLastPSD[gain][i] = 0;
+       }
+    }
+}
+
+
+double 
+AliHLTPHOSFourier::EvaluateMagnitude(const double re, const double im)
+{
+  return re*re + im*im;
+}
+
+
+void 
+AliHLTPHOSFourier::Int2Double(const Int_t *inputarray, double *outputarray, const int size)
+{
+  for(int i=0; i< size; i++)
+    {
+      outputarray[i] = (double)inputarray[i];
+    }
+}
diff --git a/HLT/PHOS/AliHLTPHOSFourier.h b/HLT/PHOS/AliHLTPHOSFourier.h
new file mode 100644 (file)
index 0000000..5490f55
--- /dev/null
@@ -0,0 +1,110 @@
+#ifndef ALIHLTPHOSFOURIER_H
+#define ALIHLTPHOSFOURIER_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT 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 "Rtypes.h"
+#include "TVirtualFFT.h"
+#include "TMath.h"
+#include "AliHLTPHOSConstants.h"
+#include <iostream>
+
+#include "AliHLTPHOSRcuFFTDataStruct.h"
+
+using namespace PhosHLTConst;
+using namespace std;
+
+#define SAMPLING_FREQUENCY 10 
+
+class  AliHLTPHOSFourier
+{
+ public:
+  AliHLTPHOSFourier();
+  virtual ~AliHLTPHOSFourier();
+  AliHLTPHOSRcuFFTDataStruct GetPSD();
+  void ProcessFourier(const Int_t *data, const int length, const int z, const int x, const int gain);
+
+private:
+  void Init();
+  void Int2Double(const Int_t *inputarray, double *outputarray, const int size);
+  bool CheckSignal(const Int_t *data, const int length);
+
+  double EvaluateMagnitude(const double re, const double im);
+  
+  //  double *fAccumulateFFTsAll[N_GAINS];
+  // int fNFFTsAll[N_GAINS];
+  // double *fAccumulateFFTs [N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
+  // int fNFFTs[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
+  TVirtualFFT *fFFT_own;
+
+  double *fFFTInputArray;
+  double *fFFTOutputArray;
+  bool fIsFirstChannel;
+  int  fFixedDataSize;
+  
+  // AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct[N_GAINS];
+  AliHLTPHOSRcuFFTDataStruct fFFTOupuStruct;
+
+  template<typename T> 
+    T  Max(T *array, int N) const
+    {
+      T tmpMax = 0;
+
+      for(int i = 0; i < N; i++)
+       {
+         if(array[i] > tmpMax)
+           {
+             tmpMax = array[i];
+           }
+       }
+  
+      return tmpMax;
+    }
+
+
+  template<typename T> 
+    T  Min(T *array, int N) const
+    {
+      
+      T tmpMin = Max(array , N);
+      
+      //   T tmpMin = 100;
+
+      for(int i = 0; i < N; i++)
+       {
+         if(array[i] < tmpMin)
+           {
+             tmpMin = array[i];
+           }
+       }
+  
+      return tmpMin;
+    }
+
+  
+  AliHLTPHOSFourier(const AliHLTPHOSFourier&);
+  AliHLTPHOSFourier & operator=(const AliHLTPHOSFourier&){return *this;};
+
+};
+
+#endif
+
+// AliHLTPHOSRcuAltroPatternTestComponent(const AliHLTPHOSRcuAltroPatternTestComponent &);
+//  AliHLTPHOSRcuAltroPatternTestComponent & operator = (const AliHLTPHOSRcuAltroPatternTestComponent &);
diff --git a/HLT/PHOS/AliHLTPHOSFourierComponent.cxx b/HLT/PHOS/AliHLTPHOSFourierComponent.cxx
new file mode 100644 (file)
index 0000000..1ae1da4
--- /dev/null
@@ -0,0 +1,206 @@
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT 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 "AliHLTPHOSFourierComponent.h"
+#include "AliHLTPHOSFourier.h"
+#include "AliHLTPHOSValidCellDataStruct.h"
+#include "AliHLTPHOSRcuCellEnergyDataStruct.h"
+#include "AliHLTPHOSSharedMemoryInterface.h"
+
+#include "AliHLTPHOSRcuFFTDataStruct.h"
+
+AliHLTPHOSFourierComponent gAliHLTPHOSFourierComponent;
+
+AliHLTPHOSFourierComponent::AliHLTPHOSFourierComponent(): AliHLTPHOSRcuProcessor(),fFourierPtr(0), fShmPtr(0),fOutPtr(0)
+{
+  fFourierPtr = new AliHLTPHOSFourier();
+  fShmPtr = new AliHLTPHOSSharedMemoryInterface();
+}
+
+
+AliHLTPHOSFourierComponent::~AliHLTPHOSFourierComponent()
+{
+
+}
+
+
+int
+AliHLTPHOSFourierComponent::Deinit()
+{
+  Logging(kHLTLogInfo, "HLT", "PHOS", ",Deinitializing AliHLTPHOSFourierComponent");
+  return 0;
+}
+
+
+const char* 
+AliHLTPHOSFourierComponent::GetComponentID()
+{
+  return "PhosFourier";
+  //     "PhosFourier"
+}
+
+
+AliHLTComponent*
+AliHLTPHOSFourierComponent::Spawn()
+
+{
+  return new AliHLTPHOSFourierComponent;
+}
+
+
+void 
+AliHLTPHOSFourierComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  const AliHLTComponentDataType* pType=fgkInputDataTypes;
+
+  while (pType->fID!=0) 
+    {
+      list.push_back(*pType);
+      pType++;
+    }
+}
+
+
+AliHLTComponentDataType 
+AliHLTPHOSFourierComponent::GetOutputDataType()
+{
+  return AliHLTPHOSDefinitions::fgkFourierTransform;
+  // return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
+  // return kAliHLTMultipleDataType;
+}
+
+
+/*
+int 
+AliHLTPHOSFourierComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+  tgtList.clear();
+  tgtList.push_back(AliHLTPHOSDefinitions::fgkFourierTransform);
+  //  tgtList.push_back(kAliHLTDataTypeHwAddr16);
+  return tgtList.size();
+}
+*/
+
+
+
+void 
+AliHLTPHOSFourierComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier)
+{
+ //  constBase =1;
+//   inputMultiplier = 1;
+  // constBase = 30;
+  // inputMultiplier = 1.2;
+  inputMultiplier = 0.1;
+}
+int 
+AliHLTPHOSFourierComponent::DoInit(int /*argc*/, const char** /*argv*/)
+{
+  cout << "AliHLTPHOSFourierComponent::DoInit !!!!!!!!!! " << endl;
+  return 0;
+}
+
+/*
+int 
+AliHLTPHOSFourierComponent::DoDeinit()
+{
+
+}
+*/
+
+int 
+AliHLTPHOSFourierComponent::DoEvent(const AliHLTComponentEventData& evtData,
+                                   const AliHLTComponentBlockData* blocks, 
+                                   AliHLTComponentTriggerData& /*trigData*/,
+                                   AliHLTUInt8_t* outputPtr, 
+                                   AliHLTUInt32_t& size,
+                                   AliHLTComponentBlockDataList& outputBlocks )
+{
+  fPhosEventCount ++;
+  AliHLTPHOSValidCellDataStruct *currentChannel =0;
+  UInt_t offset            = 0; 
+  UInt_t mysize            = 0;
+  UInt_t tSize             = 0;
+  const AliHLTComponentBlockData* iter = NULL; 
+  unsigned long ndx;
+  UInt_t specification = 0;
+  for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
+    {
+      iter = blocks+ndx;
+      if(iter->fDataType != AliHLTPHOSDefinitions::fgkCellEnergyDataType)
+       {
+         
+         continue;
+       }
+      
+      specification = specification|iter->fSpecification;       
+      AliHLTPHOSRcuCellEnergyDataStruct *cellDataPtr = (AliHLTPHOSRcuCellEnergyDataStruct*)( iter->fPtr);
+      AliHLTPHOSRcuFFTDataStruct *fourierOutPtr =  (AliHLTPHOSRcuFFTDataStruct*)outputPtr;
+      fShmPtr->SetMemory(cellDataPtr);
+      currentChannel = fShmPtr->NextChannel();
+      
+      while(currentChannel != 0)
+       {
+         Int_t *data;
+         Int_t nsamples = 0;
+         data= fShmPtr->GetRawData(nsamples);
+         //      fFourierPtr->ProcessFourier(data, nsamples, currentChannel->fZ, currentChannel->fX, currentChannel->fGain  ); 
+         currentChannel = fShmPtr->NextChannel();
+       }
+          
+      *fourierOutPtr =  fFourierPtr->GetPSD();
+  
+      for(int i=0; i < 500; i++)
+       {
+         if(i%16 == 0)
+           {
+             printf("\n");
+           }
+
+         cout << fourierOutPtr->fGlobalAccumulatedPSD[1][i] <<  "\t";
+       }
+      
+      mysize += sizeof(AliHLTPHOSRcuFFTDataStruct);
+      AliHLTComponentBlockData bd;
+      bd.fOffset = offset;
+      bd.fSize = mysize;
+      bd.fDataType = AliHLTPHOSDefinitions::fgkFourierTransform;
+      // bd.fSpecification = 0xFFFFFFFF;
+      bd.fSpecification = specification;
+      outputBlocks.push_back( bd );
+      
+      cout <<"size left is "<<  size  <<"  FourierComponenet: offset ="<< offset << "mysize =" << mysize << "specification =" << specification <<endl;
+
+      tSize += mysize;
+   
+      outputPtr += mysize;
+
+      if( tSize > size )
+       {
+         cout <<"HLT::AliHLTFourierComponent::DoEvent Too much data Data written over allowed buffer. Amount written:"<< tSize<<"allowed amount"<< size << endl;
+         Logging( kHLTLogFatal, "HLT::AliHLTFourierComponent::DoEvent", "Too much data",
+                  "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu." , tSize, size );
+
+         return EMSGSIZE;
+       }
+    
+    }
+
+  return 0;
+
+}
diff --git a/HLT/PHOS/AliHLTPHOSFourierComponent.h b/HLT/PHOS/AliHLTPHOSFourierComponent.h
new file mode 100644 (file)
index 0000000..2fdfdf6
--- /dev/null
@@ -0,0 +1,73 @@
+#ifndef ALIHLTPHOSFOURIERCOMPONENT_H
+#define ALIHLTPHOSFOURIERCOMPONENT_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT 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 "AliHLTPHOSRcuProcessor.h"
+
+class  AliHLTPHOSFourier;
+class  AliHLTPHOSSharedMemoryInterface;
+class AliHLTPHOSRcuFFTDataStruct;
+
+class  AliHLTPHOSFourierComponent :  public AliHLTPHOSRcuProcessor
+{
+ public:
+  AliHLTPHOSFourierComponent();
+  virtual ~AliHLTPHOSFourierComponent();
+  int DoInit(int argc, const char** argv);
+  virtual int Deinit();
+  int DoEvent(const AliHLTComponentEventData& evtData,
+             const AliHLTComponentBlockData* blocks, 
+             AliHLTComponentTriggerData& trigData,
+             AliHLTUInt8_t* outputPtr, 
+             AliHLTUInt32_t& size,
+             AliHLTComponentBlockDataList& outputBlocks );
+
+  virtual const char* GetComponentID();
+  virtual AliHLTComponent* Spawn();
+  virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
+  virtual AliHLTComponentDataType GetOutputDataType();
+  virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
+  //virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
+
+protected:
+  //  int DoInit(int argc, const char** argv);
+  //  int DoDeinit();
+private:
+  AliHLTPHOSFourierComponent  (const  AliHLTPHOSFourierComponent  & ): AliHLTPHOSRcuProcessor(),
+    fFourierPtr(0),
+    fShmPtr(0),
+    fOutPtr(0)
+      {
+      };
+
+  AliHLTPHOSFourierComponent  & operator = (const AliHLTPHOSFourierComponent)
+  {
+    return *this;
+  };
+
+  AliHLTPHOSFourier *fFourierPtr;
+  AliHLTPHOSSharedMemoryInterface *fShmPtr; // Interface to read altro channel data from shared memory
+  AliHLTPHOSRcuFFTDataStruct* fOutPtr;  //comment
+};
+
+#endif
index 8edafa41963a5666d8fee16efab2853d62440fa8..bbcaba99354fe1d58e9ac3599aae3be4f951d5cf 100644 (file)
@@ -123,17 +123,22 @@ AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
   //  return AliHLTPHOSDefinitions::fgkDigitDataType;
 }
 
+
 int 
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
 {
   // Added by OD
   // see header file for class documentation
+  
   tgtList.clear();
   tgtList.push_back(AliHLTPHOSDefinitions::fgkCellEnergyDataType);
-   tgtList.push_back(kAliHLTDataTypeHwAddr16);
+  tgtList.push_back(kAliHLTDataTypeHwAddr16);
   return tgtList.size();
+
 }
 
+
+
 void
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
 {
@@ -312,6 +317,11 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData
       bdCellEnergy.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
       bdCellEnergy.fSpecification = specification;
       //    cout << "Pushing cell energies" << endl;
+
+
+      cout << "nRawAanalyzer: offset ="<< offset << "mysize =" << mysize << "specification =" << specification <<endl;
+
+
       outputBlocks.push_back( bdCellEnergy );
       
       tSize += mysize;
index a36a3eea1c213dd79cf9c246f064d1571e2cef49..a1c96c50bfaed50378f42902ff4f6f83da32a8d8 100644 (file)
@@ -105,8 +105,6 @@ int  AliHLTPHOSRcuAltroPatternTestComponent::DoEvent( const AliHLTComponentEvent
   AliHLTPHOSRcuCellEnergyDataStruct *cellDataPtr;
   AliHLTUInt8_t* outBPtr;
 
-
   for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
     {
       iter = blocks+ndx;
diff --git a/HLT/PHOS/AliHLTPHOSRcuFFTDataStruct.h b/HLT/PHOS/AliHLTPHOSRcuFFTDataStruct.h
new file mode 100644 (file)
index 0000000..15aaa95
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef ALIHLTPHOSRCUFFTDATASTRUCT_H
+#define ALIHLTPHOSRCUFFTDATASTRUCT_H
+
+
+#include "Rtypes.h"
+#include "AliHLTPHOSConstants.h"
+
+using namespace PhosHLTConst;
+
+struct AliHLTPHOSRcuFFTDataStruct
+{
+  int fDataLength;
+  Double_t fGlobalAccumulatedPSD[N_GAINS][ALTRO_MAX_SAMPLES];
+  Double_t fGlobalLastPSD[N_GAINS][ALTRO_MAX_SAMPLES];
+};
+
+#endif
index 82850e5a83e8e11128bf8f3f28f921f6e9f25edc..24bfd1f887119bdb871a5469b23747429eab7a6b 100644 (file)
@@ -28,6 +28,7 @@ class AliHLTPHOSRcuHistogramProducerComponent:public AliHLTPHOSRcuProcessor
   virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
                     AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                     AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
   virtual void GetInputDataTypes( vector <AliHLTComponentDataType>&);
   virtual AliHLTComponentDataType GetOutputDataType();
   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
index 5eecf862a7f5c68f80430d611e23c6c47638b898..2d81391993b48f7ffe5de4746299d864cae6c5b8 100644 (file)
@@ -78,6 +78,8 @@ class  AliHLTPHOSUtilities
       return tmpMax;
     }
 
+
+
   
  private:
   int DoExistArgument(const int argc, const char** argv, const char *argument) const;
index 74908080dc14d9adf7c5d5667821c072e9e96472..df977235fa3343f3a04fa30301631f607ed244b9 100644 (file)
@@ -127,15 +127,37 @@ AliHLTPHOSOnlineDisplayEventTab::GetNextEvent()
 }
 
 
+void
+AliHLTPHOSOnlineDisplayEventTab::FindFourierBlocks(AliHLTHOMERReader *homerReaderPtr)
+{
+ cout << "AliHLTPHOSOnlineDisplayEventTab::FindFourierBlocks" << endl; 
+  // unsigned long blk = homeReaderPtr->FindBlockNdx("RENELLEC","SOHP", 0xFFFFFFFF );
+  unsigned long blk = homerReaderPtr->FindBlockNdx(" TREIRUOF","SOHP", 0xFFFFFFFF );
+
+  while ( blk != ~(unsigned long)0 )
+    {
+      cout << "AliHLTPHOSOnlineDisplayEventTab::FindFourierBlocks(homerReaderPtr) FOUND FOURIER DATA !!!!!!!!!!!!!!" << endl;
+
+
+      blk = homerReaderPtr->FindBlockNdx("TREIRUOF","SOHP", 0xFFFFFFFF );
+    }
+
+}
+
 
 void 
 AliHLTPHOSOnlineDisplayEventTab::ReadBlockData(AliHLTHOMERReader *homeReaderPtr)
 {  
   AliHLTPHOSValidCellDataStruct *currentChannel =0;
-  cout << "AliHLTPHOSOnlineDisplayEventTab::ReadBlockDat, Reading block data" << endl;
+  cout << "AliHLTPHOSOnlineDisplayEventTab::ReadBlockDat, Reading block data, therere are " <<  homeReaderPtr->GetBlockCnt() << " blocks " <<endl;
+
+  FindFourierBlocks(homeReaderPtr);
 
   unsigned long blk = homeReaderPtr->FindBlockNdx("RENELLEC","SOHP", 0xFFFFFFFF );
 
+  //CRAP PT
+  //  FindFourierBlocks(homeReaderPtr);
+
   while ( blk != ~(unsigned long)0 ) 
     {
       Int_t moduleID;
@@ -197,12 +219,14 @@ AliHLTPHOSOnlineDisplayEventTab::ReadBlockData(AliHLTHOMERReader *homeReaderPtr)
          currentChannel = fShmPtr->NextChannel();
        }
       
-
       blk = homeReaderPtr->FindBlockNdx("RENELLEC","SOHP", 0xFFFFFFFF, blk+1);
+
     }
 }
 
 
+
+
 void
 AliHLTPHOSOnlineDisplayEventTab::ResetDisplay()
 {
index e15c9236b8f250785f4fcedd431ed193d526bb24..c16e2a393b5df18b494abecfeee979f9d3e9d4ff 100644 (file)
@@ -30,6 +30,8 @@ class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab
   void UpdateDisplay();
   int GetNextEvent();
   virtual void ReadBlockData(AliHLTHOMERReader *homeReaderPtr);
+  void FindFourierBlocks(AliHLTHOMERReader *homeReaderPtr);
+
   void ResetDisplay();
   TGTab               *fTab;
   TGTab               *fSubTab1;