]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Basic functionality of the HLT components is achieved, The components runs without...
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 20:32:35 +0000 (20:32 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Jan 2007 20:32:35 +0000 (20:32 +0000)
Raw data processing will now be implemeted.

15 files changed:
HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzer.h
HLT/PHOS/AliHLTPHOSRawAnalyzerChiSquareFit.h
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.h
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponent.h
HLT/PHOS/AliHLTPHOSRawAnalyzerKLevel.h
HLT/PHOS/AliHLTPHOSRawAnalyzerLMS.h
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.h
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinderComponent.h

index 89327565750164540fab8b48463edd58948c601b..0703628aa7dba40be59807d3f65f3498dd7a2413 100644 (file)
@@ -8,8 +8,7 @@ using std::endl;
 
 AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), n(99999)
 {
-
-
+cout <<"AliHLTPHOSRawAnalyzer Base class::Creating a new AliHLTPHOSRawAnalyzer() object"<<endl;
 }
 
 AliHLTPHOSRawAnalyzer::~AliHLTPHOSRawAnalyzer()
index 257be84e4d4ec98493b97fe8c1d6cdd078a96f80..3b0b9dc12c8b1ed51b5c49c0e6b72ede93bb769a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZER_H
-#define ALIHLTPHOSANALYZER_H
+#ifndef ALIHLTPHOSRAWANALYZER_H
+#define ALIHLTPHOSRAWANALYZER_H
 /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
index 0e8a0825aa6dfaf521f7efca0ebd842135739c4b..7bb58175b21741fd59bae1f6c31e2cb0b468a95a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERCHISQUAREFIT_H
-#define ALIHLTPHOSANALYZERCHISQUAREFIT_H
+#ifndef ALIHLTPHOSRAWANALYZERCHISQUAREFIT_H
+#define ALIHLTPHOSRAWANALYZERCHISQUAREFIT_H
 #include <Rtypes.h>
 #include "TObject.h"
 #include "AliHLTPHOSRawAnalyzer.h"
@@ -21,6 +21,8 @@ class AliHLTPHOSRawAnalyzerChiSquareFit : public AliHLTPHOSRawAnalyzer
   
   virtual ~AliHLTPHOSRawAnalyzerChiSquareFit();
   virtual void Evaluate(int start = 0, int lenght = 100);
+   
+
  private:
 
   ClassDef(AliHLTPHOSRawAnalyzerChiSquareFit, 2) 
index f9a3811e4c6abd7f7a71d3636a82cf3750986811..5eb3d75287a441c0f4cd9f094c02cc8ccc3c0f72 100644 (file)
 #include "AliHLTPHOSRawAnalyzerComponent.h"
 #include <iostream>
 
-//ClassImp(AliHLTPHOSRawAnalyzerComponent) 
+const AliHLTComponentDataType AliHLTPHOSRawAnalyzerComponent::inputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
+const AliHLTComponentDataType AliHLTPHOSRawAnalyzerComponent::outputDataType=kAliHLTVoidDataType;
+
+
 
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent()
+//ClassImp(AliHLTPHOSRawAnalyzerComponent) 
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(), eventCount(0)
 {
 
 } 
@@ -29,7 +33,7 @@ AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
 }
 
 
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor()
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(), eventCount(0)
 {
 
 }
@@ -43,49 +47,56 @@ AliHLTPHOSRawAnalyzerComponent::Deinit()
 int 
 AliHLTPHOSRawAnalyzerComponent::DoDeinit()
 {
+ Logging(kHLTLogInfo, "HLT", "PHOS", ",AliHLTPHOSRawAnalyzerComponen DoDeinit");
   return 0;
-}
 
-const char* 
-AliHLTPHOSRawAnalyzerComponent::GetComponentID()
-{
-  return 0;
 }
 
+//const char* 
+//AliHLTPHOSRawAnalyzerComponent::GetComponentID()
+//{
+//  return 0;
+//}
+
 void
-AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&)
+AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
 {
-
+  const AliHLTComponentDataType* pType=inputDataTypes;
+  while (pType->fID!=0) {
+    list.push_back(*pType);
+    pType++;
+  }
 }
 
 AliHLTComponentDataType 
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
 {
-  AliHLTComponentDataType tmp;
-  return tmp;
+  return outputDataType;
 }
 
 void
-AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(long unsigned int&, double&)
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
 {
-
+  constBase = 0;inputMultiplier = 0;
 }
 
-void 
-AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(long  int&, double&)
-{
-
-}
-
-AliHLTComponent* 
-AliHLTPHOSRawAnalyzerComponent::Spawn()
+int 
+AliHLTPHOSRawAnalyzerComponent::DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&)
 {
+  Logging(kHLTLogInfo, "HLT", "Sample", "PhosHLTRawAnalyzerComonent, DoEvent");
+  printf("\nPHOSHLT DoEvent: processing event: %d\n", eventCount);
+  //  printf("\nPHOSHLT DoEvent, not yet implemented\n");
+  eventCount++;
   return 0;
 }
 
-int 
-AliHLTPHOSRawAnalyzerComponent::DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&)
+
+int
+AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
 {
-  printf("\nPHOSHLT DoEvent, not yet implemented\n");
+  printf("\nInside AliHLTPHOSRawAnalyzerComponent:DoInit\n");
+  if (argc==0 && argv==NULL) {
+    // this is currently just to get rid of the warning "unused parameter"
+  }
   return 0;
 }
index 5fa27ed9ddafa83365b76d7004c4dae158832bb8..496e3419633bc1e29fbb0c36d9a9df25319925af 100644 (file)
@@ -1,14 +1,16 @@
+
+
+#ifndef ALIHLTPHOSRAWANALYZERCOMPONENT_H
+#define ALIHLTPHOSRAWANALYZERCOMPONENT_H
+
 /* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                          */
 
-#ifndef ALIHLTPHOSANALYZERCOMPONENT_H
-#define ALIHLTPHOSANALYZERCOMPONENT_H
-
 //#include <Rtypes.h>
 //#include "TObject.h"
 #include "AliHLTProcessor.h"
 #include "AliHLTPHOSRawAnalyzer.h"
-#include "AliHLTPHOSRawAnalyzerCrude.h"
+//#include "AliHLTPHOSRawAnalyzerCrude.h"
 
 class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
 {
@@ -21,14 +23,21 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
       return *this;
    };
 
+  virtual int DoInit( int argc, const char** argv );
   virtual int Deinit();
   virtual int DoDeinit();
-  virtual const char* GetComponentID();
+
+  virtual const char* GetComponentID() = 0;
+
   virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
   virtual AliHLTComponentDataType GetOutputDataType();
   virtual void GetOutputDataSize(long unsigned int&, double&);
-  virtual void GetOutputDataSize(long  int&, double&);
-  virtual AliHLTComponent* Spawn();
+
+  //  virtual void GetOutputDataSize(long  int&, double&);
+
+  //  virtual AliHLTComponent* Spawn();
+  virtual AliHLTComponent* Spawn() = 0;
+
   virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
 
   // private:
@@ -36,5 +45,10 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
  AliHLTPHOSRawAnalyzer *analyzerPtr; 
 
  // ClassDef(AliHLTPHOSRawAnalyzerComponent, 2) 
+ private:
+ int eventCount;
+  static const AliHLTComponentDataType inputDataTypes[];
+  static const AliHLTComponentDataType outputDataType;
+
 };
 #endif
index 0b7380c55148f237fcec56e7ed2b69376cb980d0..18f1415217b7d13cdd7511769e6da416c5c4e3a2 100644 (file)
@@ -35,7 +35,7 @@ AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude(const AliHLTPHOSRawAnalyz
  **/
 AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude():AliHLTPHOSRawAnalyzer() 
 {
-  cout <<"You cannot invoke the Fitter without arguments"<<endl;
+  cout <<"AliHLTPHOSRawAnalyzerCrude::Creating a new AliHLTPHOSRawAnalyzerCrude() object "<<endl;
 }
 
 
@@ -48,7 +48,7 @@ AliHLTPHOSRawAnalyzerCrude::~AliHLTPHOSRawAnalyzerCrude()
 
 
 /**
-* Extraction of timing and energy using the Peakfinde Algorithm.
+* Extraction of timing and energy using Crude estimate.
 * The. The parameters "start" and "length" defines a sub array  of the data array
 * that will be used for the the fit. If start+length must not exeed the total length
 * of the Data array. "start" must be chosen as close as possible to t0.
index c3f3f7c499028e7ba06ebfedf52d9f982b4ae036..b330f6be8fac840158cdfde50d0a83721508698e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERCRUDE_H
-#define ALIHLTPHOSANALYZERCRUDE_H
+#ifndef ALIHLTPHOSRAWANALYZERCRUDE_H
+#define ALIHLTPHOSRAWANALYZERCRUDE_H
 #include <Rtypes.h>
 #include "TObject.h"
 //         "AliHLTPHOSRawAnalyzer"
index fdf278ea468eaebd883e36f2b92d3255bd703f71..8875734f2776fde3ae738cc5032a4a4f6d7b6941 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
  *                                                                        *
  **************************************************************************/
 
 #include "AliHLTPHOSRawAnalyzerCrudeComponent.h"
-
+#include "AliHLTPHOSRawAnalyzerCrude.h"
 
 //ClassImp(AliHLTPHOSRawAnalyzerCrudeComponent) 
-
+AliHLTPHOSRawAnalyzerCrudeComponent gAliHLTPHOSRawAnalyzerCrudeComponent;
 
 AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent()
 {
@@ -35,3 +36,14 @@ AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent(const A
 
 }
 
+const char* 
+AliHLTPHOSRawAnalyzerCrudeComponent::GetComponentID()
+{
+  return "PhosRawCrude";
+}
+
+AliHLTComponent*
+AliHLTPHOSRawAnalyzerCrudeComponent::Spawn()
+{
+  return new AliHLTPHOSRawAnalyzerCrudeComponent;
+}
index 310a14a50fb7af0cae58e0f6ec4597f5d07d6696..001e64691f35bf3f1208d600506285205ca5e71d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERCRUDECOMPONENT_H
-#define ALIHLTPHOSANALYZERCRUDECOMPONENT_H
+#ifndef ALIHLTPHOSRAWANALYZERCRUDECOMPONENT_H
+#define ALIHLTPHOSRAWANALYZERCRUDECOMPONENT_H
 
 #include "AliHLTPHOSRawAnalyzerComponent.h"
 
@@ -9,6 +9,7 @@
 
 class AliHLTPHOSRawAnalyzerCrudeComponent: public AliHLTPHOSRawAnalyzerComponent
 {
+ public:
   AliHLTPHOSRawAnalyzerCrudeComponent();
   ~AliHLTPHOSRawAnalyzerCrudeComponent();
   AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & );
@@ -18,6 +19,9 @@ class AliHLTPHOSRawAnalyzerCrudeComponent: public AliHLTPHOSRawAnalyzerComponent
   };
 
   //ClassDef(AliHLTPHOSRawAnalyzerCrudeComponent, 2) 
+  virtual const char* GetComponentID();
+  virtual AliHLTComponent* Spawn();
+
   };
 
 #endif
index 5281ef02a126f01ec99a8e038b7debd9721c1ec5..3ee478a094d85d163cc768cc5cd2ed5f75d3ab61 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERKLEVEL_H
-#define ALIHLTPHOSANALYZERKLEVEL_H
+#ifndef ALIHLTPHOSRAWANALYZERKLEVEL_H
+#define ALIHLTPHOSRAWANALYZERKLEVEL_H
 #include <Rtypes.h>
 #include "TObject.h"
 #include "AliHLTPHOSRawAnalyzer.h"
index 11caa8cf7e7951cacc826773d21797c390ec570d..ea31ec484740ebfa0c834496c33ddfbeb6d6cc7b 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERLMS_H
-#define ALIHLTPHOSANALYZERLMS_H
+#ifndef ALIHLTPHOSRAWANALYZERLMS_H
+#define ALIHLTPHOSRAWANALYZERLMS_H
 #include <Rtypes.h>
 #include "TObject.h"
 #include "AliHLTPHOSRawAnalyzer.h"
index 16726b562d9c1eaf22b0f736ed6b91d8d85b9b87..f9cbeffc29652d6e4fe6e8e6eb161892c733b2eb 100644 (file)
@@ -37,7 +37,7 @@ AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHO
  **/
 AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder():AliHLTPHOSRawAnalyzer(),tVector(0), aVector(0) 
 {
-  cout <<"You cannot invoke the Fitter without arguments"<<endl;;
+  cout <<"PeakFinder:You cannot invoke the Fitter without arguments"<<endl;;
 }
 
 
index 31be0c6a8949ba596db566c99b21fac7a76695e4..b8ad68cb939056eb485a5f2528a2f815b470d4ca 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERPEAKFINDER_H
-#define ALIHLTPHOSANALYZERPEAKFINDER_H
+#ifndef ALIHLTPHOSRAWANALYZERPEAKFINDER_H
+#define ALIHLTPHOSRAWANALYZERPEAKFINDER_H
 #include <Rtypes.h>
 #include "TObject.h"
 #include "AliHLTPHOSRawAnalyzer.h"
index eb1fdb5256ffe55805f9355927ce054ae2e4a7b6..7d7e060fc9bc2ed38e622ae387b6d0d7ee61d7c9 100644 (file)
  **************************************************************************/
 
 #include "AliHLTPHOSRawAnalyzerPeakFinderComponent.h"
-
+#include "AliHLTPHOSRawAnalyzerPeakFinder.h"
 
 //ClassImp(AliHLTPHOSRawAnalyzerPeakFinderComponent) 
+AliHLTPHOSRawAnalyzerPeakFinderComponent gAliHLTPHOSRawAnalyzerPeakFinderComponent;
 
-
-  AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponent()
+AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponent()
 {
-
+  analyzerPtr = new AliHLTPHOSRawAnalyzerPeakFinder();
 } 
 
 AliHLTPHOSRawAnalyzerPeakFinderComponent::~AliHLTPHOSRawAnalyzerPeakFinderComponent()
@@ -30,9 +30,22 @@ AliHLTPHOSRawAnalyzerPeakFinderComponent::~AliHLTPHOSRawAnalyzerPeakFinderCompon
 }
 
 
+
 AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & ) : AliHLTPHOSRawAnalyzerComponent()
 {
 
 }
 
 
+const char* 
+AliHLTPHOSRawAnalyzerPeakFinderComponent::GetComponentID()
+{
+  return "PhosRawPeakFinder";
+}
+
+
+AliHLTComponent*
+AliHLTPHOSRawAnalyzerPeakFinderComponent::Spawn()
+{
+  return new AliHLTPHOSRawAnalyzerPeakFinderComponent;
+}
index 714ed59713fc145e2d9d930795b7258c615dcf34..8729ecd653e91e3d21361622b4ce24fc09206c14 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHLTPHOSANALYZERPEAKFINDERCOMPONENT_H
-#define ALIHLTPHOSANALYZERPEAKFINDERCOMPONENT_H
+#ifndef ALIHLTPHOSRAWANALYZERPEAKFINDERCOMPONENT_H
+#define ALIHLTPHOSRAWANALYZERPEAKFINDERCOMPONENT_H
 
 /* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice  */ 
@@ -8,6 +8,7 @@
 
 class AliHLTPHOSRawAnalyzerPeakFinderComponent: public AliHLTPHOSRawAnalyzerComponent
 {
+ public:
   AliHLTPHOSRawAnalyzerPeakFinderComponent();
   ~AliHLTPHOSRawAnalyzerPeakFinderComponent();
   AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & );
@@ -16,6 +17,9 @@ class AliHLTPHOSRawAnalyzerPeakFinderComponent: public AliHLTPHOSRawAnalyzerComp
     return *this;
   };
 
+  
+ virtual const char* GetComponentID();
+ virtual AliHLTComponent* Spawn();
   //ClassDef(AliHLTPHOSRawAnalyzerPeakFinderComponent, 2) 
   };