#ifndef ALIHLTPHOSCELLENERGIESFILEWRITER_H
#define ALIHLTPHOSCELLENERGIESFILEWRITER_H
-//#include "AliHLTPHOSFileWriterDescriptorStruct.h"
#include "AliHLTPHOSFileWriter.h"
#include <string>
#include "AliHLTDataTypes.h"
// virtual int WriteFile(const AliHLTComponentEventData& evtData,
// const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData,AliHLTComponentDataType dataType, int evntCnt);
-
private:
int fCurrentEvntCnt;
- // ofstream fCurrentFile;
};
#define ALTRO_MAX_SAMPLES 1008 /**<The maximum number of samples of the ALTRO*/
//Geometry constants
-//#define N_MODULES 5 /**<Number of modules of the PHOS detector*/
-
-//#define N_ROWS_MOD 64 /**<Number of rows per module*/
-//#define N_COLUMNS_MOD 56 /**<Number of columns per module*/
-
#define N_ROWS_MOD 56 /**<Number of rows per module*/
#define N_COLUMNS_MOD 64 /**<Number of columns per module*/
#define N_ROWS_RCU 28 /**<Number of rows per module*/
#define N_COLUMNS_RCU 32
-#define N_ZROWS_RCU N_ROWS_RCU /**<Number of rows per module*/
+#define N_ZROWS_RCU N_ROWS_RCU /**<Number of rows per module*/
#define N_XCOLUMNS_RCU N_COLUMNS_RCU
-#define N_ZROWS_MOD N_ROWS_MOD /**<Number of rows per module*/
-#define N_XCOLUMNS_MOD N_COLUMNS_MOD /**<Number of columns per module*/
-
-//#define N_ROWS_RCU 32 /**<Number of rows per module*/
-//#define N_COLUMNS_RCU 28 /**<Number of columns per module*/
-
-
-
-//#define N_ZROWS_RCU N_ROWS_RCU /**<Number of rows per module*/
-//#define N_XCOLUMNS_RCU N_COLUMNS_RCU
+#define N_ZROWS_MOD N_ROWS_MOD /**<Number of rows per module*/
+#define N_XCOLUMNS_MOD N_COLUMNS_MOD /**<Number of columns per module*/
#define N_GAINS 2 /**<Number of gains per ALTRO channel*/
-
#define N_DATATYPES 10
//peakfinder constatnts
#define LOW_GAIN 1
#define HIGH_GAIN 0
-
//general altro signal constatnts
#define DEFAULT_TAU 2 /**<Assume that the signal rise time of the altrp pulses is 2 us (nominal value of the electronics)*/
#define DEFAULT_FS 10 /**<Assume that the signal is samples with 10 MHZ samle rate*/
#ifndef ALIHLTPHOSDDLPACKEDFILEWRITER_H
#define ALIHLTPHOSDDLPACKEDFILEWRITER_H
-//#include "AliHLTPHOSFileWriterDescriptorStruct.h"
#include "AliHLTPHOSFileWriter.h"
#include <string>
#include "AliHLTDataTypes.h"
void
AliHLTPHOSFileWriter::MakeFilename(int eventNr, const AliHLTComponentDataType& dataType)
{
-
int charPos =fDirectory.size() +1;
- cout <<"charPos.size() = "<< charPos << endl;
fCurrentFilename.erase(charPos);
#ifndef ALIHLTPHOSFILEWRITER_H
#define ALIHLTPHOSFILEWRITER_H
-//#include "AliHLTPHOSFileWriterDescriptorStruct.h"
#include "AliHLTPHOSFileWriter.h"
#include <string>
#include "AliHLTDataTypes.h"
public:
AliHLTPHOSFileWriter();
virtual ~AliHLTPHOSFileWriter();
- // virtual int WriteFile(const AliHLTComponentEventData& evtData,
- // const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, int evntCnt) = 0;
void MakeFilename(int eventNr, const AliHLTComponentDataType& dataType);
void SetDirectory(string& directory);
* provided "as is" without express or implied warranty. *
**************************************************************************/
-//#include "AliHLTPHOSFileWriterComponent.h"
-
-
#include "AliHLTPHOSFileWriterComponent.h"
#include <iostream>
#include "stdio.h"
AliHLTPHOSFileWriterComponent gAliHLTPHOSFileWriterComponent;
-//AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent():AliHLTDataSink(), fCellEnergiesFileWriterPtr(0), fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
-AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0), fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
+AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0) \
+ , fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
{
for(int i=0; i<N_DATATYPES; i++)
{
}
-//AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(const AliHLTPHOSFileWriterComponent & ):AliHLTDataSink(), fCellEnergiesFileWriterPtr(0), fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
-AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(const AliHLTPHOSFileWriterComponent & ): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0), fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
+
+AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(const AliHLTPHOSFileWriterComponent & ): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0), \
+ fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
{
}
#include "Rtypes.h"
#include "AliHLTFileWriter.h"
-
using std::string;
+
class AliHLTPHOSRcuCellEnergyDataStruct;
-//class AliHLTPHOSFileWriterComponent:public AliHLTDataSink
+
class AliHLTPHOSFileWriterComponent:public AliHLTFileWriter
{
public:
AliHLTPHOSFileWriterComponent();
virtual ~AliHLTPHOSFileWriterComponent();
int AddDataType(string dataType);
- // virtual int DoInit( int argc, const char** argv );
virtual int Deinit();
virtual int DoDeinit();
- // virtual int DumpEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData );
virtual const char* GetComponentID();
virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
virtual AliHLTComponentDataType GetOutputDataType();
AliHLTPHOSHistogramProducerComponent::DoDeinit()
{
Logging(kHLTLogInfo, "HLT", "PHOS", ",AliHLTPHOSHistogramProducer DoDeinit");
-
-
return 0;
-
}
AliHLTPHOSRcuCellEnergyDataStruct *cellDataPtr;
AliHLTUInt8_t* outBPtr;
outBPtr = outputPtr;
-
fOutPtr = (AliHLTPHOSModuleCellAccumulatedEnergyDataStruct*)outBPtr;
- // cout << "evtData.fBlockCnt=" << evtData.fBlockCnt << endl;
- // int tmpModuleID;
- // int tmpRcuX;
- // int tmpRcuZ;
int tmpCnt;
-
AliHLTUInt8_t tmpModuleID;
AliHLTUInt8_t tmpRcuX;
AliHLTUInt8_t tmpRcuZ;
tmpCnt = cellDataPtr->fCnt;
tmpModuleID = cellDataPtr->fModuleID;
- cout << " AliHLTPHOSHistogramProducerComponent::DoEven: ModuleID =" << tmpModuleID << endl;
-
tmpRcuX = cellDataPtr->fRcuX ;
tmpRcuZ = cellDataPtr->fRcuZ;
- cout << endl << endl;
- cout << " AliHLTPHOSHistogramProducerComponen::RCU coordnates are (X,Z) = ("<< tmpRcuX<<","<< tmpRcuZ<<")"<< endl;
fOutPtr->fModuleID = tmpModuleID;
-
- // int tmpRow;
- // int tmpCol;
+
int tmpGain;
int tmpZ;
int tmpX;
-
-
- // AliHLTUInt8_t tmpZ;
- // AliHLTUInt8_t tmpX;
-
- // AliHLTUInt8_t tmpGain;
- // int tmpGain;
-
for(int i= 0; i< tmpCnt; i ++)
{
return EMSGSIZE;
}
- // cout << "AliHLTPHOSHistogramProducerComponent::DoEvent TP10" <<endl;
fEventCount++;
return 0;
}//end DoEvent
AliHLTComponent*
AliHLTPHOSHistogramProducerComponent::Spawn()
{
- // cout << "AliHLTPHOSHistogramProducerComponent:: Spawn()" << endl;
return new AliHLTPHOSHistogramProducerComponent;
}
#include "AliHLTPHOSModuleCellAccumulatedEnergyDataStruct.h"
-
class AliHLTPHOSHistogramProducerComponent:public AliHLTProcessor
{
public:
private:
- // TH2F fEnergyHistograms[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
- // TH2F fTimingHistograms[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
-
// TH2F *fEnergyHistograms[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
- // TH2F *fTimingHistograms[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
-
- // Double_t fEnergyAverageValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
- // Double_t fTimingAverageValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
-
+ // TH2F *fTimingHistograms[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
Double_t fEnergyAverageValues[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
Double_t fAccumulatedValues[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
Double_t fTimingAverageValues[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
AliHLTUInt32_t fHits[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
-
int fEventCount;
AliHLTUInt32_t fEquippmentID;
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES];
- // Double_t fAccumulatedValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
AliHLTPHOSModuleCellAccumulatedEnergyDataStruct* fOutPtr;
-
static const AliHLTComponentDataType inputDataTypes[];
static const AliHLTComponentDataType outputDataType;
};
#pragma link C++ class AliHLTPHOSPulseGenerator+;
#pragma link C++ class AliHLTPHOSEmcCalibData+;
#pragma link C++ class AliHLTPHOSDefinitions+;
-//#pragma link C++ class AliHLTPHOSValidCellDataStruct+;
-//#pragma link C++ class AliHLTPHOSRawAnalyzerComponent+;
-//#pragma link C++ class AliHLTPHOSRawAnalyzerPeakFinderComponent+;
-//#pragma link C++ class AliHLTPHOSRawAnalyzerCrudeComponent+;
-//#pragma link C++ class AliHLTPHOSRawAnalyzerPeakFinderComponent+;
-//#pragma link C++ class AliHLTPHOSRawAnalyzer+;
#endif
struct AliHLTPHOSModuleCellAccumulatedEnergyDataStruct
{
AliHLTUInt8_t fModuleID;
-
- // Int_t fModuleID;
-
- // AliHLTUInt16_t fCnt;
- // AliHLTUInt16_t fValidData[N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
- // AliHLTPHOSValidCellDataStruct fValidData[N_MODULES*N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
- // Double_t fAccumulatedEnergies[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
Float_t fAccumulatedEnergies[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
AliHLTUInt32_t fHits[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
};
**************************************************************************/
#include "AliHLTPHOSCommonDefs.h"
-//#include "AliHLTPHOSValidCellDataStruct.h"
struct AliHLTPHOSModuleCellAverageEnergyDataStruct
{
AliHLTUInt8_t fModuleID;
- // AliHLTUInt16_t fCnt;
- // AliHLTUInt16_t fValidData[N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
AliHLTPHOSValidCellDataStruct fValidData[N_MODULES*N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
Double_t fAverageEnergies[N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
};
{
AliHLTUInt8_t fModuleID;
AliHLTUInt16_t fCnt;
- // AliHLTUInt16_t fValidData[N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
AliHLTPHOSValidCellDataStruct fValidData[N_MODULES*N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS];
-
unsigned long cellEnergies[N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
};
if(cellDataPtr->fValidData[i].fGain == HIGH_GAIN)
{
fMaxValues[tmpModuleID][ cellDataPtr->fValidData[i].fZ + N_ZROWS_RCU*tmpRcuZ][ cellDataPtr->fValidData[i].fX + N_XCOLUMNS_RCU*tmpRcuX][HIGH_GAIN] = cellDataPtr->fValidData[i].fEnergy;
- // fMaxValues[0][0][0][0] = 0;
}
else if(cellDataPtr->fValidData[i].fGain == LOW_GAIN)
{
- fMaxValues[tmpModuleID][ cellDataPtr->fValidData[i].fZ + N_ROWS_RCU*tmpRcuZ][ cellDataPtr->fValidData[i].fX +N_COLUMNS_RCU*tmpRcuX][LOW_GAIN] = cellDataPtr->fValidData[i].fEnergy;
- // fMaxValues[0][0][0][0]=0;
+ fMaxValues[tmpModuleID][ cellDataPtr->fValidData[i].fZ + N_ROWS_RCU*tmpRcuZ][ cellDataPtr->fValidData[i].fX +N_COLUMNS_RCU*tmpRcuX][LOW_GAIN] = cellDataPtr->fValidData[i].fEnergy;
}
}
#include "AliHLTPHOSDefinitions.h"
#include "AliHLTPHOSCommonDefs.h"
-
-
class AliHLTPHOSModuleMergerComponent:public AliHLTProcessor
{
public:
~AliHLTPHOSModuleMergerComponent();
AliHLTPHOSModuleMergerComponent(const AliHLTPHOSModuleMergerComponent & );
AliHLTPHOSModuleMergerComponent & operator = (const AliHLTPHOSModuleMergerComponent &)
- {
+ {
return *this;
};
virtual int DoInit( int argc, const char** argv );
virtual int DoDeinit();
virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
- void DumpData(int gain);
+ void DumpData(int gain);
- int GetEquippmentId();
- virtual const char* GetComponentID();
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ int GetEquippmentId();
+ virtual const char* GetComponentID();
+ virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
void SetEquippmentId(int id);
* provided "as is" without express or implied warranty. *
**************************************************************************/
-
#include "AliHLTPHOSPulseGenerator.h"
-//#include <stdio.h>
#include <cmath>
#include <iostream>
-
-
using std::cout;
using std::endl;
-
ClassImp(AliHLTPHOSPulseGenerator)
/**
**/
AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(double a, double t0, int N, double t, double fs): fAmplitude(a), fNSamples(N),fTau(0), fSampleFreq(fs), fTZero(0), fDataPtr(0), fDT(0), fEvent(0)
{
-
fDataPtr = new double[100];
-
-
-
SetAmplitude(a);
SetDT(fs);
SetTZero(t0);
fNSamples=N;
fTau=t;
fSampleFreq=fs;
- // dT=tau/fs; //Function values are calculated at intervals dT
- // fDT=1/fs; //Function values are calculated at intervals dT
MakePulse(fDataPtr);
}
/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-//#include <TObject.h>
#include <Rtypes.h>
class AliHLTPHOSPulseGenerator
double *fDataPtr; //[1000]
double fDT;
double *fEvent; //[1000]
-
ClassDef(AliHLTPHOSPulseGenerator,1)
-
};
#endif
using std::cout;
using std::endl;
-
-
AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer():fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999)
{
fFloatDataPtr = new double[1008];
AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, int N)
{
fFloatDataPtr = dataPtr;
- // n=N;
cout << "Baseline correction not yet implemeted" << endl;
} //end BaselineCorrection
void
AliHLTPHOSRawAnalyzer::SetData(double *data)
{
- // double *dta;
- // dta = data;
fFloatDataPtr = data;
- // cout << "Set data not yet implemented" << endl;
}
void
int
AliHLTPHOSRawAnalyzer::FindStartIndex(double treshold)
{
- printf("\ntreshold = %f \n", treshold);
cout << "Find Start index not yet implemented" << endl;
return 0;
} //end FindStartIndex
void
AliHLTPHOSRawAnalyzer::MakeInitialGuess(int treshold)
{
- printf("\ntreshold = %d\n", treshold);
cout << "Make initial guess not yet implemeted" << endl;
}
{
tmpMax = dta[i];
}
-
}
return tmpMax;
double fTau; /**<The risetime in micro seconds*/
double fDTof; /**<Time of flight in entities of sample intervals */
double fDAmpl; /**<Amplitude in entities of ADC levels*/
- // int n;
int fStartIndex;
};
*/
- //thats all
+ //thats all for the moment
} //end FitChiSquareFit
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
- // Int_t tmpMod = 0;
- // Int_t tmpZ = 0;
- // Int_t tmpX = 0;
- // Int_t tmpGain = 0;
-
AliHLTUInt8_t tmpMod = 0;
AliHLTUInt8_t tmpZ = 0;
AliHLTUInt8_t tmpX = 0;
AliHLTUInt8_t tmpGain = 0;
-
Int_t sampleCnt = 0;
Int_t processedChannels = 0;
UInt_t offset = 0;
const AliHLTComponentBlockData* iter = NULL;
unsigned long ndx;
- if((fEventCount % 100) == 0)
- {
- // cout << "analyzing event: " << fEventCount << endl;
- }
-
for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
iter = blocks+ndx;
if ( iter->fDataType != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
{
- // cout << "Warning: data type = is nOT gkDDLPackedRawDataType " << endl;
continue;
}
fOutPtr->fModuleID = fModuleID;
tmpChannelCnt = 0;
- if(fEventCount%100 ==0)
- {
- // cout <<"Analyzing event: " << fEventCount << endl;
- }
-
while(fPHOSRawStream->Next())
{
if (fPHOSRawStream->IsNewHWAddress())
}
tmpMod = (AliHLTUInt8_t)fPHOSRawStream->GetModule() ;
-
tmpX =(AliHLTUInt8_t)fPHOSRawStream->GetRow() - fRcuXOffset;
tmpZ =(AliHLTUInt8_t)fPHOSRawStream->GetColumn() - fRcuZOffset;
-
- // if(tmpZ < 0)
-
- /*
- {
- cout << endl << endl;
- cout << "RCUZ = " <<fRcuZ <<"\t";
- cout << "Equippment ID ="<< fRawMemoryReader->GetEquipmentId() << "\t";
- cout << "fPHOSRawStream->GetrOW() = " << fPHOSRawStream->GetRow() <<"\t";
- cout << "fRcuZOffset = "<< fRcuZOffset <<"\t";
- cout << " fPHOSRawStream->GetRow() - fRcuZOffset = " << fPHOSRawStream->GetRow() - fRcuZOffset << "\t";
- cout << " AliHLTPHOSRawAnalyzerComponent::DoEven: tmpZ =" << tmpZ<< "\t";
- }
-
- // if(tmpX < 0)
- {
- cout << endl;
- cout << "RCUX = " <<fRcuX <<"\t";
- cout << "Equippment ID ="<< fRawMemoryReader->GetEquipmentId() << "\t";
- cout << "fPHOSRawStream->GetColumn() = " << fPHOSRawStream->GetColumn() << "\t";
- cout << "fRcuXOffset = "<< fRcuXOffset <<"\t";
- cout << " fPHOSRawStream->GetColumn() - fRcuXOffset = " << fPHOSRawStream->GetColumn() - fRcuXOffset << "\t";
- cout << " AliHLTPHOSRawAnalyzerComponent::DoEven: tmpX =" << tmpX<< "\t";
- }
-
- */
-
-
tmpGain = fPHOSRawStream->IsLowGain();
processedChannels ++;
}
}//end DoEvent
-
int
AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
{
return 0;
}
+
void
AliHLTPHOSRawAnalyzerComponent::DumpData(int gain)
{
}
-
void
AliHLTPHOSRawAnalyzerComponent::Reset()
{
} // end Reset
-
void
AliHLTPHOSRawAnalyzerComponent::ResetDataPtr()
{
}
}
-
void
-//AliHLTPHOSRawAnalyzerComponent::SetEquippmentID(AliHLTUInt32_t id)
AliHLTPHOSRawAnalyzerComponent::SetEquippmentID(AliHLTUInt16_t id)
{
fEquippmentID = id;
}
+
AliHLTUInt16_t
AliHLTPHOSRawAnalyzerComponent::GetEquippmentID()
{
return fEquippmentID;
}
+
void
-//AliHLTPHOSRawAnalyzerComponent::SetCoordinates(AliHLTUInt32_t equippmentID)
AliHLTPHOSRawAnalyzerComponent::SetCoordinates(AliHLTUInt16_t equippmentID)
{
- // int rcuIndex = (fEquippmentID - 1792)%N_RCUS_PER_MODULE;
int rcuIndex = (fEquippmentID - 1792)%N_RCUS_PER_MODULE;
-
fModuleID = (fEquippmentID -1792 -rcuIndex)/N_RCUS_PER_MODULE;
if(rcuIndex == 0)
fRcuZ = 0;
}
-
if(rcuIndex == 3)
{
fRcuX = 1;
fRcuZ = 1;
}
-
-
fRcuZOffset = N_ZROWS_RCU*fRcuZ;
fRcuXOffset = N_XCOLUMNS_RCU*fRcuX;
void DumpData(int gain);
void DumpData();
void DumpChannelData(Double_t *data);
- // void SetEquippmentID(AliHLTUInt32_t id);
void SetEquippmentID(AliHLTUInt16_t id);
- // int GetEquippmentID();
AliHLTUInt16_t GetEquippmentID();
- // void SetCoordinates( AliHLTUInt32_t equippmentID);
void SetCoordinates(AliHLTUInt16_t equippmentID);
-
virtual const char* GetComponentID() = 0;
virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
virtual AliHLTComponentDataType GetOutputDataType();
void ResetDataPtr(int sampleCnt);
void ResetDataPtr(int startindex, int sampleCnt);
static int fEventCount;
-
-
- // AliHLTUInt32_t fEquippmentID;
- // AliHLTUInt16_t fRcuX;
- // AliHLTUInt16_t fRcuZ;
- // AliHLTUInt16_t fRcuZOffset;
- // AliHLTUInt16_t fRcuXOffset;
- // AliHLTUInt16_t fModuleID;
-
- // Int_t fEquippmentID;
-
- // Int_t fRcuX;
- // Int_t fRcuZ;
- // Int_t fRcuZOffset;
- // Int_t fRcuXOffset;
- // Int_t fModuleID;
AliHLTUInt16_t fEquippmentID;
-
AliHLTUInt8_t fRcuX;
AliHLTUInt8_t fRcuZ;
AliHLTUInt8_t fRcuZOffset;
AliHLTUInt8_t fRcuXOffset;
AliHLTUInt8_t fModuleID;
-
-
-
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES];
Double_t fMaxValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS];
AliCaloRawStream *fPHOSRawStream;
static const AliHLTComponentDataType inputDataTypes[];
};
#endif
+
**/
AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude():AliHLTPHOSRawAnalyzer()
{
- // cout <<"AliHLTPHOSRawAnalyzerCrude::Creating a new AliHLTPHOSRawAnalyzerCrude() object "<<endl;
+
}
void
AliHLTPHOSRawAnalyzerCrude::Evaluate(int start, int length)
{
- // printf("\nAliHLTPHOSRawAnalyzerCrude::Evaluat() from index %d to %d\n", start, start + length);
-
-
double tmpAmplitudeMax =0;
double tmpTime = 0;
} //end Crude
-
-
-
-
#define ALIHLTPHOSRAWANALYZERCRUDE_H
#include <Rtypes.h>
#include "TObject.h"
-// "AliHLTPHOSRawAnalyzer"
#include "AliHLTPHOSRawAnalyzer.h"
#include "AliHLTPHOSRawAnalyzerCrudeComponent.h"
#include "AliHLTPHOSRawAnalyzerCrude.h"
-//ClassImp(AliHLTPHOSRawAnalyzerCrudeComponent)
AliHLTPHOSRawAnalyzerCrudeComponent gAliHLTPHOSRawAnalyzerCrudeComponent;
AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent()
{
public:
AliHLTPHOSRawAnalyzerCrudeComponent();
- ~AliHLTPHOSRawAnalyzerCrudeComponent();
+ virtual ~AliHLTPHOSRawAnalyzerCrudeComponent();
AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & );
AliHLTPHOSRawAnalyzerCrudeComponent & operator = (const AliHLTPHOSRawAnalyzerCrudeComponent)
{
return *this;
};
- //ClassDef(AliHLTPHOSRawAnalyzerCrudeComponent, 2)
virtual const char* GetComponentID();
virtual AliHLTComponent* Spawn();
-
- };
+};
#endif
}
-/**
- * The AliHLTPHOSPeakfinder class is the class for extracting the basic signal parameters
- * "timing" and "energy" from the PHOS raw data. Physical data will for a given readout channel be
- * a sequense of ADC digitized 10 bit integer values, however for performance reasons all values used in
- * calculation is of type double.
- **/
+
AliHLTPHOSRawAnalyzerLMS::AliHLTPHOSRawAnalyzerLMS():AliHLTPHOSRawAnalyzer()
{
cout <<"You cannot invoke the Fitter without arguments"<<endl;;
} //end AliHLTPHOSRawAnalyzerLMS
-/**
-* Extraction of timing and energy using the Peakfinde Algorithm.
-* 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.
-* The baseline must also be subtracted.
-* The length of "tVector" and "aVector" mus be equal to length.
-* "index + length" must not exeed the length of the data array set in the constructor.
-* @param start the start index of the subarray of the data array.
-* @param length the number of samples to use starting from index
-**/
+
void
AliHLTPHOSRawAnalyzerLMS::Evaluate(int start, int length)
{
- /*
-
- */
- //thats all
} //end FitLMS
/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-
class AliHLTPHOSRawAnalyzerLMS : public AliHLTPHOSRawAnalyzer
{
public:
virtual ~AliHLTPHOSRawAnalyzerLMS();
virtual void Evaluate(int start = 0, int lenght = 100);
- private:
- // double **kfMCovarPtrPtr; //*[1000000] /**<Covariance matrix of the measurements*/
- // double **fPCovarPtrPtr; //*[1000000] /**<Covariance matrix of the estimated parameters*/
+ private:
double kfMCovarPtrPtr[1008][1008]; /**<Covariance matrix of the measurements*/
double fPCovarPtrPtr[1008][1008]; /**<Covariance matrix of the estimated parameters*/
-
ClassDef(AliHLTPHOSRawAnalyzerLMS, 2)
};
void
AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(int start, int length)
{
- // printf("\n AliHLTPHOSRawAnalyzerPeakFinder::Evaluat from index %d to %d\n", start, start + length);
fDTof = 0;
fDAmpl = 0;
Int_t tmpLength;
-
if(fTVectorPtr == 0 || fAVectorPtr == 0)
{
// printf("\nError: the peakfinder vectors are not specified, aborting !!!\n");
#include "TObject.h"
#include "AliHLTPHOSRawAnalyzer.h"
-
class AliHLTPHOSRawAnalyzerPeakFinder : public AliHLTPHOSRawAnalyzer
{
public:
AliHLTPHOSRawAnalyzerPeakFinderComponent gAliHLTPHOSRawAnalyzerPeakFinderComponent;
-//AliHLTPHOSRawAnalyzerPeakFinderComponen
-//AliHLTPHOSRawAnalyzerPeakFinderComponent AliHLTPHOSRawAnalyzerPeakFinderComponent::gAliHLTPHOSRawAnalyzerPeakFinderComponent;
-
AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponent()
{
{
// cout << "Loaded PF vectors" << endl;
}
-
}
+
AliHLTPHOSRawAnalyzerPeakFinderComponent::~AliHLTPHOSRawAnalyzerPeakFinderComponent()
{
}
-
AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & ) : AliHLTPHOSRawAnalyzerComponent()
{
Double_t tmpAVector[nSamples];
Double_t tmpTVector[nSamples];
sprintf(tmpPFPath,"%s%s/start%dN%dtau%dfs%d.txt", getenv("ALICE_ROOT"), PF_VECTOR_DIR, startIndex, nSamples, tau, fs);
- // cout <<"PF PATH =" << tmpPFPath << endl;
-
FILE *fp;
-
fp = fopen(tmpPFPath, "r");
if(fp != 0)
fscanf(fp, "%lf", &tmpAVector[i]);
}
-
fscanf(fp, "\n");
for(int i=0; i < nSamples; i++)
{
fscanf(fp, "%lf", &tmpTVector[i]);
}
-
analyzerPtr->SetAVector(tmpAVector, nSamples);
analyzerPtr->SetTVector(tmpTVector, nSamples);
-
fclose(fp);
return kTRUE;
-
}
else
}
-
AliHLTComponent*
AliHLTPHOSRawAnalyzerPeakFinderComponent::Spawn()
{
struct AliHLTPHOSRcuCellEnergyDataStruct
{
- // AliHLTUInt16_t fModuleID;
- // AliHLTUInt16_t fRcuX;
- // AliHLTUInt16_t fRcuZ;
- // AliHLTUInt16_t fCnt;
-
- // int fModuleID;
- // int fRcuX;
- // int fRcuZ;
- // int fCnt;
-
Int_t fModuleID;
Int_t fRcuX;
Int_t fRcuZ;
struct AliHLTPHOSValidCellDataStruct
{
- // AliHLTUInt16_t fRow;
- // AliHLTUInt16_t fCol;
-
- // AliHLTUInt16_t fZ;
- // AliHLTUInt16_t fX;
-
- // AliHLTUInt16_t fGain;
-
- // int fZ;
- // int fX;
-
- // Int_t fZ;
- // Int_t fX;
AliHLTUInt8_t fZ;
AliHLTUInt8_t fX;
-
- // AliHLTUInt16_t fGain;
- /// int fGain;
- // Int_t fGain;
AliHLTUInt8_t fGain;
-
Float_t fEnergy;
Float_t fTime;
};
#endif
+
#include "TCanvas.h"
#include "AliHLTPHOSModuleCellAccumulatedEnergyDataStruct.h"
#include "AliHLTPHOSCommonDefs.h"
-//#include AliHLTPHOSCommonDefs.h
/**************************************************************************
* This file is property of and copyright by the Experimental Nuclear *
HOMERReader* AliHLTPHOSOnlineDisplay::fgHomerReaderPtr = 0; /**<Homer reader that fetches events from the HLT online stream*/
HOMERReader* AliHLTPHOSOnlineDisplay::fgHomerReadersPtr[MAX_HOSTS]; /**<Homer reader that fetches events from the HLT online stream*/
HOMERReader* AliHLTPHOSOnlineDisplay::fgCalibReadersPtr[MAX_HOSTS]; /**<Homer reader that fetches histograms from the HLT online stream*/
-
-//TH2S* AliHLTPHOSOnlineDisplay::fgLegoPlotLGPtr = 0; /**<2D histogram for low gain channels*/
-//TH2S* AliHLTPHOSOnlineDisplay::fgLegoPlotHGPtr = 0; /**<2D histogram for high gain channels*/
-
TH2D* AliHLTPHOSOnlineDisplay::fgLegoPlotLGPtr = 0; /**<2D histogram for low gain channels*/
TH2D* AliHLTPHOSOnlineDisplay::fgLegoPlotHGPtr = 0; /**<2D histogram for high gain channels*/
-
TH2D* AliHLTPHOSOnlineDisplay::fgCalibHistPtr[N_GAINS]; /**<2D histogram for low gain channels*/
TH2I* AliHLTPHOSOnlineDisplay::fgHitsHistPtr[N_GAINS]; /**<2D histogram for low gain channels*/
-
-
char* AliHLTPHOSOnlineDisplay::fgDefaultDet = "SOHP"; /**<PHOS written backwards*/
char* AliHLTPHOSOnlineDisplay::fgDefaultDataType = "RENELLEC"; /**<CELLENER (Celle energy) written backwards*/
int AliHLTPHOSOnlineDisplay::fgEvntCnt = 0; /**<Event Counter*/
for(int i = 0; i <fgNHosts; i++)
{
fgHomerReadersPtr[i] = new HOMERReader(fgHosts[i], fgPorts[i]);
- // fgCalibReadersPtr[i] = new HOMERReader(fgHosts[i], DEFAULT_HISTO_PORT);
fgCalibReadersPtr[i] = new HOMERReader(fgHosts[i], fgPorts[i]);
}
void
AliHLTPHOSOnlineDisplay::InitDisplay()
{
- /*
- fgLegoPlotHGPtr = new TH2S("Homer","HLT: #pi^{0} 5 - 30Gev, High gain",
- N_XCOLUMNS_MOD*N_MODULES , 0, N_XCOLUMNS_MOD*N_MODULES,
- N_ZROWS_MOD, 0, N_ZROWS_MOD);
- fgLegoPlotHGPtr->SetMaximum( MAX_BIN_VALUE);
-
- fgLegoPlotLGPtr = new TH2S("Homer","HLT: #pi^{0} 5 - 30Gev, Low gain",
- N_XCOLUMNS_MOD* N_MODULES , 0, N_XCOLUMNS_MOD* N_MODULES,
- N_ZROWS_MOD, 0, N_ZROWS_MOD);
- fgLegoPlotLGPtr->SetMaximum( MAX_BIN_VALUE);
- */
-
-
fgLegoPlotHGPtr = new TH2D("Homer","HLT: #pi^{0} 5 - 30Gev, High gain",
N_XCOLUMNS_MOD*N_MODULES , 0, N_XCOLUMNS_MOD*N_MODULES,
N_ZROWS_MOD, 0, N_ZROWS_MOD);
fgLegoPlotHGPtr->SetMaximum( MAX_BIN_VALUE);
fgLegoPlotHGPtr->Reset();
-
fgLegoPlotLGPtr = new TH2D("Homer","HLT: #pi^{0} 5 - 30Gev, Low gain",
N_XCOLUMNS_MOD* N_MODULES , 0, N_XCOLUMNS_MOD* N_MODULES,
N_ZROWS_MOD, 0, N_ZROWS_MOD);
fgLegoPlotLGPtr->SetMaximum( MAX_BIN_VALUE);
fgLegoPlotLGPtr->Reset();
-
- // fgHitsHistPtr = new TH2I("Homer","HLT: #pi^{0} 5 - 30Gev, Low gain",
- // N_XCOLUMNS_MOD* N_MODULES , 0, N_XCOLUMNS_MOD* N_MODULES,
- // N_ZROWS_MOD, 0, N_ZROWS_MOD);
- //fgHitsHistPtr->SetMaximum( MAX_BIN_VALUE);
- // fgHitsHistPtr->Reset();
-
-
-
for(int gain = 0; gain< N_GAINS; gain ++)
{
- fgCalibHistPtr[gain] = new TH2D("Homer","HLT:",
+ fgCalibHistPtr[gain] = new TH2D("Homer","HLT:",
N_XCOLUMNS_MOD*N_MODULES , 0, N_XCOLUMNS_MOD*N_MODULES ,
N_ZROWS_MOD, 0, N_ZROWS_MOD);
- fgCalibHistPtr[gain]->Reset();
-
- fgHitsHistPtr[gain] = new TH2I("Homer","HLT: #pi^{0} 5 - 30Gev, Low gain",
+ fgCalibHistPtr[gain]->Reset();
+
+ fgHitsHistPtr[gain] = new TH2I("Homer","HLT: #pi^{0} 5 - 30Gev, Low gain",
N_XCOLUMNS_MOD* N_MODULES , 0, N_XCOLUMNS_MOD* N_MODULES,
N_ZROWS_MOD, 0, N_ZROWS_MOD);
- fgHitsHistPtr[gain]->SetMaximum( MAX_BIN_VALUE);
- fgHitsHistPtr[gain]->Reset();
+ fgHitsHistPtr[gain]->SetMaximum( MAX_BIN_VALUE);
+ fgHitsHistPtr[gain]->Reset();
}
-
-
gStyle->SetPalette(1);
fTab = new TGTab(this, 100, 100);
TGLayoutHints *fL1 = new TGLayoutHints(kLHintsBottom | kLHintsExpandX |
TGCompositeFrame *tf = fTab->AddTab("Event display");
fSubTab1 = new TGTab(tf, 100, 100);
-
TGCompositeFrame *tf2 = fSubTab1->AddTab("FGLEGO");
fSubF1 = new TGCompositeFrame(tf2, 60, 20, kVerticalFrame);
fEc1 = new TRootEmbeddedCanvas("ec1", fSubF1, 100, 100);
fSubF1->AddFrame(fEc2, fL1);
tf2->AddFrame(fSubF1, fL1);
-
tf2 = fSubTab1->AddTab("SCAT");
fSubF2 = new TGCompositeFrame(tf2, 60, 20, kVerticalFrame);
tf2->AddFrame(fSubF2, fL1);
fEc4 = new TRootEmbeddedCanvas("ec4", fSubF2, 100, 100);
fSubF2->AddFrame(fEc4, fL1);
-
tf2 = fSubTab1->AddTab("SURF");
fSubF3 = new TGCompositeFrame(tf2, 60, 20, kVerticalFrame);
tf2->AddFrame(fSubF3, fL1);
}//end ScanArguments
-
-
int
AliHLTPHOSOnlineDisplay::GetNextEvent()
{
for(int reader = 0; reader < fgNHosts; reader ++)
{
ret =fgCalibReadersPtr[reader]->ReadNextEvent(); ;
- // cout << "Event ID for reader " << reader <<" = "<< fgCalibReadersPtr[reader]->GetEventID() << endl;;
if( ret )
{
int ndx = fgCalibReadersPtr[reader]->GetErrorConnectionNdx();
cout << "HOMER getconncetioNdx status = " << ndx << endl;
return ret;
}
-
- unsigned long blockCnt = fgCalibReadersPtr[reader]->GetBlockCnt();
+ unsigned long blockCnt = fgCalibReadersPtr[reader]->GetBlockCnt();
cout << "AliHLTPHOSOnlineDisplay::GetHistogram(): blockCnt = " << blockCnt << endl;
for ( unsigned long i = 0; i < blockCnt; i++ )
ULong_t* tmp22 = (ULong_t*)tmp21;
*tmp22 = fgCalibReadersPtr[reader]->GetBlockDataOrigin( i );
cout << "Dataype is: "<< tmp1<<" "<<tmp2 <<endl;
- }
+ }
unsigned long blk = fgCalibReadersPtr[reader]->FindBlockNdx("UCCARENE","SOHP", 0xFFFFFFFF );
- int tmpWhileCnt = 0;
+ int tmpWhileCnt = 0;
- while ( blk != ~(unsigned long)0 )
+ while ( blk != ~(unsigned long)0 )
{
cout << "GetHistogram: updating block " << endl;
AliHLTUInt16_t moduleID;
const AliHLTPHOSModuleCellAccumulatedEnergyDataStruct* accCellEnergiesPtr = (const AliHLTPHOSModuleCellAccumulatedEnergyDataStruct*)fgCalibReadersPtr[reader]->GetBlockData( blk );
moduleID = accCellEnergiesPtr->fModuleID ;
-
- cout << "Module ID = " << moduleID<< endl;
-
- cout << "GetHistogram: TP1 " << endl;
for(int z = 0; z <N_ZROWS_MOD; z ++)
{
}
blk = fgCalibReadersPtr[reader]->FindBlockNdx("UCCARENE","SOHP", 0xFFFFFFFF, blk+1);
-
tmpWhileCnt ++;
-
}
}
-
+
UpdateHistograms();
fgEvntCnt ++;
}
fgCalibHistPtr[LOW_GAIN]->Draw("LEGO2Z");
fgCanvasLGPtr->Update();
- // fgCanvasHGPtr = fEc9->GetCanvas();
- // fgCanvasHGPtr->cd();
- // fgCalibHistPtr[HIGH_GAIN]->Draw("SCAT");
- // fgCanvasHGPtr->Update();
- // fgCanvasLGPtr = fEc10->GetCanvas();
- // fgCanvasLGPtr->cd();
- // fgCalibHistPtr[LOW_GAIN]->Draw("SCAT");
- // fgCanvasLGPtr->Update();
-
fgCanvasHGPtr = fEc9->GetCanvas();
fgCanvasHGPtr->cd();
fgHitsHistPtr[HIGH_GAIN]->Draw("SCAT");
fgHitsHistPtr[LOW_GAIN]->Draw("SCAT (Hits)");
fgCanvasLGPtr->Update();
-
-
fgCanvasHGPtr = fEc11->GetCanvas();
fgCanvasHGPtr->cd();
- fgCalibHistPtr[HIGH_GAIN]->Draw("CONTZ");
+
+ fgCalibHistPtr[HIGH_GAIN]->Draw("COLZ");
+
fgCanvasHGPtr->Update();
fgCanvasLGPtr = fEc12->GetCanvas();
fgCanvasLGPtr->cd();
- fgCalibHistPtr[LOW_GAIN]->Draw("CONTZ");
- fgCanvasLGPtr->Update();
+ fgCalibHistPtr[LOW_GAIN]->Draw("COLZ");
+
+ fgCanvasLGPtr->Update();
}
#define MAX_HOSTNAME_LENGTH 64
#define DEFAULT_EVENT_PORT 42001
#define DEFAULT_HISTO_PORT 42002
-//#define MAX_PORTS_PER_HOST
class TCanvas;
class AliHLTPHOSRcuCellEnergyDataStruct;
void UpdateHistograms();
static int ScanArguments(int argc, char** argv);
static AliHLTPHOSOnlineDisplay* Instance();
+
private:
AliHLTPHOSOnlineDisplay();
static TGCompositeFrame *fFrame1, *fF1, *fF2, *fF3, *fF4, *fF5, *fSubF1, *fSubF2, *fSubF3, *fSubF4, *fSubF5, *fSubF6, *fSubF7;
static TRootEmbeddedCanvas *fEc1, *fEc2, *fEc3, *fEc4, *fEc5, *fEc6, *fEc7, *fEc8, *fEc9, *fEc10, *fEc11, *fEc12;
static AliHLTPHOSGetEventButton* fgEventButtPtr;
static AliHLTPHOSOnlineDisplay* fgInstancePtr;
-
- // static TH2S *fgLegoPlotLGPtr;
- // static TH2S *fgLegoPlotHGPtr;
-
static TH2D *fgLegoPlotLGPtr;
static TH2D *fgLegoPlotHGPtr;
-
static TH2D *fgCalibHistPtr[N_GAINS];
static TH2I *fgHitsHistPtr[N_GAINS];
-
static char *fgDefaultDet;
static char *fgDefaultDataType;
static int fgEvntCnt;
static TCanvas *fgCanvasHGPtr;
static TCanvas *fgCanvasLGPtr;
-
static unsigned int fgNHosts;
static unsigned int fgNPorts;
static HOMERReader* fgHomerReaderPtr;
static HOMERReader* fgHomerReadersPtr[MAX_HOSTS];
static HOMERReader* fgCalibReadersPtr[MAX_HOSTS];
-
static char *fgHosts[MAX_HOSTS];
static short unsigned *fgPorts;
static Bool_t fgAccumulate;