//AliHLTPHOSRawAnalyzerComponent gAliHLTPHOSRawAnalyzerComponent;
//ClassImp(AliHLTPHOSRawAnalyzerComponent)
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(), eventCount(0), fPHOSRawStream(), fRawMemoryReader(0)
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(), fEventCount(0), fEquippmentId(0), fPHOSRawStream(), fRawMemoryReader(0)
{
// fRawMemoryReader = NULL;
}
-AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(), eventCount(0), fPHOSRawStream(),fRawMemoryReader(0)
+AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(), fEventCount(0), fEquippmentId(0), fPHOSRawStream(),fRawMemoryReader(0)
{
// fRawMemoryReader = NULL;
}
AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
{
- constBase = 0;inputMultiplier = 0;
+ constBase = 30;
+ inputMultiplier = 0.1;
}
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;
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())
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"
fTmpChannelData[i] = 0;
}
}
+
+
+void
+AliHLTPHOSRawAnalyzerComponent::SetEquippmentId(int id)
+{
+ fEquippmentId = id;
+}
+
+int
+AliHLTPHOSRawAnalyzerComponent::GetEquippmentId()
+{
+ return fEquippmentId;
+}
-
-
#ifndef ALIHLTPHOSRAWANALYZERCOMPONENT_H
#define ALIHLTPHOSRAWANALYZERCOMPONENT_H
#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
{
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