#include "AliHLTPHOSRawAnalyzer.h"
#include "AliHLTPHOSRawAnalyzerComponent.h"
-#include "AliRawReaderMemory.h"
-#include "AliCaloRawStream.h"
#include "AliHLTPHOSRcuCellEnergyDataStruct.h"
#include "AliHLTPHOSRcuChannelDataStruct.h"
#include "AliHLTDDLDecoder.h"
#include "AliHLTAltroData.h"
-
#include "AliHLTPHOSMapper.h"
-using namespace std;
+using namespace std;
-//_________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTPHOSProcessor(), fAnalyzerPtr(0),
-fSendChannelData(kFALSE),fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
+fSendChannelData(kFALSE),fOutPtr(0)
{
fMapperPtr = new AliHLTPHOSMapper();
}
-//_________________________________________________________________________________________________
+
AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
{
- if(fRawMemoryReader != 0)
- {
- delete fRawMemoryReader;
- }
- if(fPHOSRawStream != 0)
- {
- delete fPHOSRawStream;
- }
+
}
-//_________________________________________________________________________________________________
+
AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTPHOSProcessor(), fAnalyzerPtr(0),
-fSendChannelData(kFALSE),fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
+fSendChannelData(kFALSE),fOutPtr(0)
{
}
-//_________________________________________________________________________________________________
+
int
AliHLTPHOSRawAnalyzerComponent::Deinit()
{
Logging(kHLTLogInfo, "HLT", "PHOS", ",AliHLTPHOSRawAnalyzerComponen Deinit");
-
- if(fRawMemoryReader !=0)
- {
- delete fRawMemoryReader;
- }
-
- if(fPHOSRawStream != 0)
- {
- delete fPHOSRawStream;
- }
- return 0;
-
return 0;
}
-//_________________________________________________________________________________________________
+
const char*
AliHLTPHOSRawAnalyzerComponent::GetComponentID()
{
}
-//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
}
}
-//_________________________________________________________________________________________________
+
AliHLTComponentDataType
AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
{
}
-//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
inputMultiplier = 1;
}
-//_________________________________________________________________________________________________
+
int
AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
- Int_t sampleCnt = 0;
- Int_t processedChannels = 0;
UInt_t offset = 0;
UInt_t mysize = 0;
UInt_t tSize = 0;
Int_t tmpChannelCnt = 0;
- Int_t tmpStartIndex = 0;
AliHLTUInt8_t* outBPtr;
- unsigned long first;
- unsigned long last;
outBPtr = outputPtr;
const AliHLTComponentBlockData* iter = NULL;
unsigned long ndx;
fDecoderPtr->Decode();
fOutPtr = (AliHLTPHOSRcuCellEnergyDataStruct*)outBPtr;
- // int tmpCnt = 0;
-
while( fDecoderPtr->NextChannel(fAltroDataPtr) == true )
{
fOutPtr->fValidData[tmpChannelCnt].fEnergy = (float)fAnalyzerPtr->GetEnergy();
fOutPtr->fValidData[tmpChannelCnt].fTime = (float)fAnalyzerPtr->GetTiming();
tmpChannelCnt ++;
- // tmpCnt ++;
}
mysize += sizeof(AliHLTPHOSRcuCellEnergyDataStruct);
}//end DoEvent
-
-//_________________________________________________________________________________________________
int
AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
{
-
-cout <<"AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) "<< endl;
-
+ cout <<"AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) "<< endl;
fAltroDataPtr = new AliHLTAltroData();
fDecoderPtr = new AliHLTDDLDecoder();
fSendChannelData = kFALSE;
fPrintInfo = kFALSE;
Reset();
- fRawMemoryReader = new AliRawReaderMemory();
- fPHOSRawStream = new AliCaloRawStream(fRawMemoryReader,"PHOS");
-
- // fPHOSRawStream->SetOldRCUFormat(kFALSE);
-
- fPHOSRawStream->SetOldRCUFormat(kTRUE);
-
int iResult=0;
TString argument="";
iResult = ScanArguments(argc, argv);
-
if(fIsSetEquippmentID == kFALSE)
{
cout << "The argument equippmentID is not set: set it with a component argumet like this: -equippmentID <number>" << endl;
}
else
{
- fRawMemoryReader->SetEquipmentID(fkEquippmentID);
+ iResult = 0;
+ // fRawMemoryReader->SetEquipmentID(fkEquippmentID);
}
+ // return iResult;
+ // return 0;
return iResult;
-
-
-return 0;
-
}
-/*
-//_________________________________________________________________________________________________
-void
-AliHLTPHOSRawAnalyzerComponent::DumpData(int gain) const
-{
- for(int mod = 0; mod < N_MODULES; mod ++)
- {
- printf("\n *********** MODULE %d ************\n", mod);
- for(int row = 0; row < N_ROWS_MOD; row ++)
- {
- for(int col = 0; col < N_COLUMNS_MOD; col ++)
- {
- if( fMaxValues[mod][row][col][0] != 0)
- {
- cout << fMaxValues[mod][row][col][gain] << "\t";
- }
- }
- }
- }
-}
-*/
-
-//_________________________________________________________________________________________________
-
-/*
-void
-AliHLTPHOSRawAnalyzerComponent::DumpChannelData(Double_t *data) const
-{
- cout << endl;
- for(int i=0; i< ALTRO_MAX_SAMPLES; i++)
- {
- if (data[i] != 0)
- {
- cout <<i <<"\t";
- }
- }
- cout << endl;
-
- for(int i=0; i< ALTRO_MAX_SAMPLES; i++)
- {
- if (data[i] != 0)
- {
- cout <<data[i] <<"\t";
- }
- }
-
- cout << endl;
-}
-*/
-
-
-//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::Reset()
{
} // end Reset
-
-
-//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::ResetDataPtr(int startindex, int sampleCnt)
{
//Base class for PHOS HLT raw data analysis components
// see cxx file for more details
-#include "AliHLTPHOSDefinitions.h"
-#include "AliHLTPHOSCommonDefs.h"
+//#include "AliHLTPHOSDefinitions.h"
+//#include "AliHLTPHOSCommonDefs.h"
+
#include "AliHLTPHOSProcessor.h"
-class AliRawReaderMemory;
-class AliCaloRawStream;
+//class AliRawReaderMemory;
+//class AliCaloRawStream;
class AliHLTPHOSRawAnalyzer;
class AliHLTPHOSRcuCellEnergyDataStruct;
class AliHLTPHOSRcuChannelDataStruct;
Bool_t fSendChannelData; /**<wether or not to send raw data from the component into shared memory*/
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES]; /**<temporary variable to store raw samples from a single altro channel*/
Double_t fMaxValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS]; /**<array to store cell energies*/
- AliCaloRawStream *fPHOSRawStream; /**<Streamer for PHOS raw data, used by fPHOSRawMemory reader*/
- AliRawReaderMemory *fRawMemoryReader; /**<Decoder to read PHOS raw data on the altro format*/
+
+ // AliCaloRawStream *fPHOSRawStream; /**<Streamer for PHOS raw data, used by fPHOSRawMemory reader*/
+ // AliRawReaderMemory *fRawMemoryReader; /**<Decoder to read PHOS raw data on the altro format*/
+
AliHLTPHOSRcuCellEnergyDataStruct* fOutPtr; /**<Pointer to outputbuffer to write results from the component into shared memory*/
AliHLTPHOSMapper *fMapperPtr;