Cosmetic changes
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Jan 2007 19:52:44 +0000 (19:52 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Jan 2007 19:52:44 +0000 (19:52 +0000)
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h

index 26530aeef8b1e5b306f423c552ce169c4949a3c7..b7f7f3f796ec7017bb2f3c22cf5b68229e30f1fc 100644 (file)
@@ -31,7 +31,7 @@ const AliHLTComponentDataType AliHLTPHOSRawAnalyzerComponent::outputDataType=kAl
 
 //AliHLTPHOSRawAnalyzerComponent gAliHLTPHOSRawAnalyzerComponent;
 //ClassImp(AliHLTPHOSRawAnalyzerComponent) 
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(),  eventCount(0), fPHOSRawStream(), fRawMemoryReader(0)
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(),  fEventCount(0),  fEquippmentId(0), fPHOSRawStream(), fRawMemoryReader(0)
 {
   //  fRawMemoryReader = NULL;
 } 
@@ -51,7 +51,7 @@ AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
 
 
 
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(),  eventCount(0), fPHOSRawStream(),fRawMemoryReader(0)
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(),  fEventCount(0),  fEquippmentId(0), fPHOSRawStream(),fRawMemoryReader(0)
 {
   //  fRawMemoryReader = NULL;
 }
@@ -107,7 +107,8 @@ void
 AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
 
 {
-  constBase = 0;inputMultiplier = 0;
+  constBase = 30;
+  inputMultiplier = 0.1;
 }
 
 
@@ -115,11 +116,24 @@ int AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evt
                                              AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                                              AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
 {
+
   Int_t tmpMod  = 0;
   Int_t tmpRow  = 0;
   Int_t tmpCol  = 0;
   Int_t tmpGain = 0;
   Int_t processedChannels = 0;
+
+  //  AliHLTUInt8_t *tmpOut = &((AliHLTUInt8_t)(GetEquippmentId()));
+
+  AliHLTUInt8_t *tmpOut =( AliHLTUInt8_t*)&fEquippmentId;
+
+  outputPtr[0] = tmpOut[0];
+  outputPtr[1] = tmpOut[1];
+
+  AliHLTUInt16_t  tmpID = *((AliHLTUInt16_t*)(outputPtr));
+
+  cout << "OutputBuffer setting equippment ID to " << tmpID << endl;
+
   //  Int_t tmpMax  = 0;
   const AliHLTComponentBlockData* iter = NULL; 
   unsigned long ndx;
@@ -128,20 +142,16 @@ int AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evt
   for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
     {
       iter = blocks+ndx;
-      if (eventCount == 0)
-       {
-         continue;
-       }
+
       if ( iter->fDataType != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
        {
          cout << "Warning: data type = is nOT gkDDLPackedRawDataType " << endl;
          continue;
        }
+
      fRawMemoryReader->SetMemory( reinterpret_cast<UChar_t*>( iter->fPtr ), iter->fSize );
      fRawMemoryReader->DumpData();
      fRawMemoryReader->RewindEvents();
-
      analyzerPtr->SetData(fTmpChannelData);
  
       while(fPHOSRawStream->Next())
@@ -192,11 +202,13 @@ AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
 
   Reset();
   cout << "AliHLTPHOSRawAnalyzerComponent::DoInit Creating new  AliRawReaderMemory()" << endl; 
-  legoPlotPtr   = new TH2S("Lego plot 1","Phi0 20Gev, High gain", 56*5, 0, 56*5, 64, 0, 64);
+  //legoPlotPtr   = new TH2S("Lego plot 1","Phi0 20Gev, High gain", 56*5, 0, 56*5, 64, 0, 64);
   fRawMemoryReader = new AliRawReaderMemory();
   fPHOSRawStream = new  AliCaloRawStream(fRawMemoryReader,"PHOS");
   fRawMemoryReader->SetEquipmentID(equippmentId); 
 
+  SetEquippmentId(equippmentId);
+
   cout <<"AliHLTPHOSRawAnalyzerComponent::DoIni  DONE!" << endl;
   if (argc==0 && argv==NULL) {
     // this is currently just to get rid of the warning "unused parameter"
@@ -255,3 +267,16 @@ AliHLTPHOSRawAnalyzerComponent::ResetDataPtr()
       fTmpChannelData[i] = 0;
     }
 }
+
+
+void 
+AliHLTPHOSRawAnalyzerComponent::SetEquippmentId(int id)
+{
+  fEquippmentId = id;
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponent::GetEquippmentId()
+{
+  return  fEquippmentId;
+}
index 31301f41da6d344cd6f10151b2c412ef14bea26f..8f157ec2bf171a1832c1122d33ec9197f23ebfdc 100644 (file)
@@ -1,5 +1,3 @@
-
-
 #ifndef ALIHLTPHOSRAWANALYZERCOMPONENT_H
 #define ALIHLTPHOSRAWANALYZERCOMPONENT_H
 
@@ -11,20 +9,6 @@
 #include "AliRawReaderMemory.h"
 #include "AliCaloRawStream.h"
 #include "AliHLTPHOSDefinitions.h"
-#include "TH2.h"
-
-
-/*
-#include "AliHLTTPCRawDataUnpackerComponent.h"
-#include "AliTPCRawStream.h"
-#include "AliRawDataHeader.h"
-#include "AliRawReaderMemory.h"
-#include "AliHLTTPCRawDataFormat.h"
-#include "AliHLTTPCDigitData.h"
-#include "AliHLTTPCTransform.h"
-#include <stdlib.h>
-#include <errno.h>
-*/
 
 class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
 {
@@ -37,47 +21,33 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTProcessor
       return *this;
    };
 
-
-
   virtual int DoInit( int argc, const char** argv );
   virtual int Deinit();
   virtual int DoDeinit();
   void DumpData();
-
+  void SetEquippmentId(int id);
+  int GetEquippmentId();
   virtual const char* GetComponentID() = 0;
-
   virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
   virtual AliHLTComponentDataType GetOutputDataType();
   virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
   virtual AliHLTComponent* Spawn() = 0;
-
   virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
 
-  // private:
  protected:
- AliHLTPHOSRawAnalyzer *analyzerPtr; 
- void Reset();
- void ResetDataPtr();
 AliHLTPHOSRawAnalyzer *analyzerPtr; 
 void Reset();
 void ResetDataPtr();
 
  private:
-
- int eventCount;
-
-
- //    AliRawReaderMemory *fRawMemoryReader;
- //    AliTPCRawStream *fTPCRawStream;
- Double_t fTmpChannelData[1008];
- // Int_t fMaxValues[5][64][56][2];
- Double_t fMaxValues[5][64][56][2];
-
-  //  Int_t fMaxValuesLG[5][64][56][2];
-  TH2S *legoPlotPtr;
-  //  TH2S *legoPlotLgPtr;
- AliCaloRawStream *fPHOSRawStream;
- AliRawReaderMemory *fRawMemoryReader;
- static const AliHLTComponentDataType inputDataTypes[];
- static const AliHLTComponentDataType outputDataType;
-
+  int fEventCount;
+  int fEquippmentId;
+  Double_t fTmpChannelData[1008];
+  Double_t fMaxValues[5][64][56][2];
+  AliCaloRawStream *fPHOSRawStream;
+  AliRawReaderMemory *fRawMemoryReader;
+  static const AliHLTComponentDataType inputDataTypes[];
+  static const AliHLTComponentDataType outputDataType;
+  
 };
 #endif