int AliHLTPHOSDDLDecoderComponent::fgEventCount = 0;
-/**
- * @class AliHLTPHOSDDLDecoderComponent
- */
AliHLTPHOSDDLDecoderComponent::AliHLTPHOSDDLDecoderComponent():AliHLTProcessor(), fEquippmentID(0), fRcuX(0),
fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0), fModuleID(0), fSendChannelData(kFALSE), fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
{
}
-/*
- *Deinit function called by the HLT framwork at end of run
- *@return 0 if the denitialzation was sucessfull.
- */
int
AliHLTPHOSDDLDecoderComponent::Deinit()
{
}
-/*
- *Deinit function called by the HLT framwork at end of run
- *@return 0 if the denitialzation was sucessfull.
- */
int
AliHLTPHOSDDLDecoderComponent::DoDeinit()
{
}
-/*
- *Function called by the HLT framework during initialization
- *@return the ID of the component
- */
+
const char*
AliHLTPHOSDDLDecoderComponent::GetComponentID()
{
}
+
void
-AliHLTPHOSDDLDecoderComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+AliHLTPHOSDDLDecoderComponent::GetInputDataTypes(vector<AliHLTComponentDataType>& list)
{
const AliHLTComponentDataType* pType=fgkInputDataTypes;
while (pType->fID!=0) {
AliHLTComponentDataType
AliHLTPHOSDDLDecoderComponent::GetOutputDataType()
{
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
void
}
-int AliHLTPHOSDDLDecoderComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+
+int
+AliHLTPHOSDDLDecoderComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
tmpChannelCnt = 0;
offset = tSize;
- if ( iter->fDataType != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
+ if ( iter->fDataType != AliHLTPHOSDefinitions::fgkDDLPackedRawDataType )
{
continue;
}
FillBlockData( bd );
bd.fOffset = offset;
bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::gkCellChannelDataDataType;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkCellChannelDataDataType;
bd.fSpecification = 0xeFFFFFFF;
outputBlocks.push_back( bd);
tSize += mysize;
#include "AliHLTPHOSDefinitions.h"
#include "AliHLTPHOSCommonDefs.h"
#include "AliHLTPHOSRcuChannelDataStruct.h"
+#include <cstdlib>
class AliHLTPHOSRcuCellEnergyDataStruct;
class AliHLTPHOSRcuChannelDataStruct;
{
public:
-
-
- AliHLTPHOSDDLDecoderComponent();
+ AliHLTPHOSDDLDecoderComponent();
virtual ~AliHLTPHOSDDLDecoderComponent();
- AliHLTPHOSDDLDecoderComponent(const AliHLTPHOSDDLDecoderComponent & );
- AliHLTPHOSDDLDecoderComponent & operator = (const AliHLTPHOSDDLDecoderComponent &)
- {
+ AliHLTPHOSDDLDecoderComponent(const AliHLTPHOSDDLDecoderComponent & );
+ AliHLTPHOSDDLDecoderComponent & operator = (const AliHLTPHOSDDLDecoderComponent &)
+ {
return *this;
- };
+ };
virtual int DoInit( int argc, const char** argv );
virtual int Deinit();
AliHLTUInt16_t GetEquippmentID();
void SetCoordinates(AliHLTUInt16_t equippmentID);
virtual const char* GetComponentID();
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>&);
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
virtual AliHLTComponent* Spawn();
-
- virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
-
+
+ virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
private:
static int fgEventCount;
AliHLTUInt16_t fEquippmentID;
#include "AliHLTPHOSDDLPackedFileWriter.h"
+//_________________________________________________________________________________________________
AliHLTPHOSDDLPackedFileWriter::AliHLTPHOSDDLPackedFileWriter()
{
}
+//_________________________________________________________________________________________________
AliHLTPHOSDDLPackedFileWriter::~AliHLTPHOSDDLPackedFileWriter()
{
}
-int
+//_________________________________________________________________________________________________
+const int
AliHLTPHOSDDLPackedFileWriter::WriteFile(const AliHLTComponentEventData& evtData,
- const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, int evntCnt)
+ const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, int evntCnt) const
{
return 0;
}
#include <string>
#include "AliHLTDataTypes.h"
-
using std::string;
class AliHLTPHOSDDLPackedFileWriter: public AliHLTPHOSFileWriter
{
public:
AliHLTPHOSDDLPackedFileWriter();
- ~AliHLTPHOSDDLPackedFileWriter();
-
-virtual int WriteFile(const AliHLTComponentEventData& evtData,
- const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, int evntCnt);
+ virtual ~AliHLTPHOSDDLPackedFileWriter();
+ const virtual int WriteFile(const AliHLTComponentEventData& evtData,
+ const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, int evntCnt) const;
+
};
+
// $Id$
/**************************************************************************
#include "AliHLTPHOSDefinitions.h"
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkDDLPackedRawDataType = { sizeof(AliHLTComponentDataType), {'D','D','L','_','R','W','P','K'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellEnergyDataType = { sizeof(AliHLTComponentDataType), {'C','E','L','L','E','N','E','R'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellEnergyHistogramDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','H','I','S','T'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellAverageEnergyDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','A','V','E','R'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellAccumulatedEnergyDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','A','C','C','U'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellTimingHistogramDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','H','I','S','T'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellTimingAverageDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','A','V','E','R'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::gkCellChannelDataDataType = { sizeof(AliHLTComponentDataType), {'C','H','A','N','D','A','T','A'},{'P','H','O','S'}};;
+
+
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkDDLPackedRawDataType = { sizeof(AliHLTComponentDataType), {'D','D','L','_','R','W','P','K'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellEnergyDataType = { sizeof(AliHLTComponentDataType), {'C','E','L','L','E','N','E','R'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellEnergyHistogramDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','H','I','S','T'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellAverageEnergyDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','A','V','E','R'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellAccumulatedEnergyDataType = { sizeof(AliHLTComponentDataType), {'E','N','E','R','A','C','C','U'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingHistogramDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','H','I','S','T'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingAverageDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','A','V','E','R'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellChannelDataDataType = { sizeof(AliHLTComponentDataType), {'C','H','A','N','D','A','T','A'},{'P','H','O','S'}};;
+
// XEmacs -*-C++-*-
// @(#) $Id$
*/
#include "AliHLTDataTypes.h"
-#include "Rtypes.h"
+//#include "Rtypes.h"
class AliHLTPHOSDefinitions
{
public:
- static const AliHLTComponentDataType gkCellEnergyDataType; /**<Reconstructed cell/crystal energies*/
- static const AliHLTComponentDataType gkDDLPackedRawDataType; /**<DDL raw data on the RCU data format*/
- static const AliHLTComponentDataType gkCellEnergyHistogramDataType; /**<Histogram for per cell/gain energy distribution*/
- static const AliHLTComponentDataType gkCellAverageEnergyDataType; /**<Histogram for per cell/gain energy distribution*/
- static const AliHLTComponentDataType gkCellAccumulatedEnergyDataType; /**<Histogram for per cell/gain energy distribution*/
- static const AliHLTComponentDataType gkCellTimingHistogramDataType; /**<Histogram for per cell/gain time distribution*/
- static const AliHLTComponentDataType gkCellTimingAverageDataType; /**<Histogram for per cell/gain time distribution*/
- static const AliHLTComponentDataType gkCellChannelDataDataType; /**<Time dependent signal from the readout channels*/
+ static const AliHLTComponentDataType fgkCellEnergyDataType; /**<Reconstructed cell/crystal energies*/
+ static const AliHLTComponentDataType fgkDDLPackedRawDataType; /**<DDL raw data on the RCU data format*/
+ static const AliHLTComponentDataType fgkCellEnergyHistogramDataType; /**<Histogram for per cell/gain energy distribution*/
+ static const AliHLTComponentDataType fgkCellAverageEnergyDataType; /**<Histogram for per cell/gain energy distribution*/
+ static const AliHLTComponentDataType fgkCellAccumulatedEnergyDataType; /**<Histogram for per cell/gain energy distribution*/
+ static const AliHLTComponentDataType fgkCellTimingHistogramDataType; /**<Histogram for per cell/gain time distribution*/
+ static const AliHLTComponentDataType fgkCellTimingAverageDataType; /**<Histogram for per cell/gain time distribution*/
+ static const AliHLTComponentDataType fgkCellChannelDataDataType; /**<Time dependent signal from the readout channels*/
};
#endif
}
}
-
+//________________________________________________________________
void
AliHLTPHOSEmcCalibData::MakeADCpedestalCorrectionTable()
{
#include "AliHLTPHOSFileWriter.h"
-#include <string>
#include <cstdlib>
-using std::string;
+using namespace std;
+//_________________________________________________________________________________________________
AliHLTPHOSFileWriter::AliHLTPHOSFileWriter():fCurrentEvntCnt(0), fCurrentFile(0), fDirectory(""), fCurrentFilename("")
{
}
+//_________________________________________________________________________________________________
AliHLTPHOSFileWriter::~AliHLTPHOSFileWriter()
{
}
+//_________________________________________________________________________________________________
void
AliHLTPHOSFileWriter::SetDirectory(string& directory)
{
}
+
+//_________________________________________________________________________________________________
void
AliHLTPHOSFileWriter::MakeFilename(int eventNr, const AliHLTComponentDataType& dataType)
{
#ifndef ALIHLTPHOSFILEWRITER_H
#define ALIHLTPHOSFILEWRITER_H
-#include "AliHLTPHOSFileWriter.h"
-#include <string>
#include "AliHLTDataTypes.h"
#include <iostream>
-
using std::string;
+
class AliHLTPHOSFileWriter
{
public:
AliHLTPHOSFileWriter();
virtual ~AliHLTPHOSFileWriter();
- void MakeFilename(int eventNr, const AliHLTComponentDataType& dataType);
+ void MakeFilename(int eventNr =0, const AliHLTComponentDataType& dataType = kAliHLTVoidDataType);
void SetDirectory(string& directory);
protected:
int fCurrentEvntCnt;
- FILE *fCurrentFile;
- string fDirectory;
- string fCurrentFilename;
+ FILE *fCurrentFile; /**<Flepointer to current file*/
+ string fDirectory; /**<Ouput directory for files produced by this component*/
+ string fCurrentFilename; /**<Name of file for writng current data to file*/
private:
- AliHLTPHOSFileWriter(const AliHLTPHOSFileWriter & ); /**<Never to be called*/
+ AliHLTPHOSFileWriter(const AliHLTPHOSFileWriter &); /**<Never to be called*/
AliHLTPHOSFileWriter & operator = (const AliHLTPHOSFileWriter &) /**<Never to be called*/
{
return *this;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+#include "AliHLTPHOSDefinitions.h"
#include "AliHLTPHOSFileWriterComponent.h"
#include <iostream>
#include <TObjString.h>
#include "AliHLTPHOSRcuCellEnergyDataStruct.h"
#include "AliHLTPHOSDataHeaderStruct.h"
#include "AliHLTDataTypes.h"
+#include "AliHLTPHOSDDLPackedFileWriter.h"
+#include "AliHLTPHOSCellEnergiesFileWriter.h"
-
-class AliRawReaderMemory;
-class AliCaloRawStream;
-class AliHLTPHOSRcuCellEnergyDataStruct;
-
-
-const AliHLTComponentDataType AliHLTPHOSFileWriterComponent::fInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
+const AliHLTComponentDataType AliHLTPHOSFileWriterComponent::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
AliHLTPHOSFileWriterComponent gAliHLTPHOSFileWriterComponent;
+//____________________________________________________________________________________
AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0) \
, fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
{
- // see header file for documentation
+ /*
+ *Default constructor
+ */
for(int i=0; i<N_DATATYPES; i++)
{
fDataTypesToFile[i] = kAliHLTVoidDataType;
}
+//____________________________________________________________________________________
AliHLTPHOSFileWriterComponent::~AliHLTPHOSFileWriterComponent()
{
- // see header file for documentation
delete fCellEnergiesFileWriterPtr;
delete fDDLPackedFileWriterPtr;
}
-
+//____________________________________________________________________________________
AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent(const AliHLTPHOSFileWriterComponent & ): AliHLTFileWriter(), fCellEnergiesFileWriterPtr(0), \
fDDLPackedFileWriterPtr(0), fDirectory(""),fFilename(""), fEventCount(0)
{
- // see header file for documentation
}
+
+//____________________________________________________________________________________
int
AliHLTPHOSFileWriterComponent::AddDataType(string dataType)
{
- // see header file for documentation
int ret = -1;
int tmpCnt = 0;
for(int i=0; i< N_DATATYPES; i++)
if(dataType.compare("gkCellEnergyDataType") == 0)
{
- fDataTypesToFile[tmpCnt] = AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ fDataTypesToFile[tmpCnt] = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
cout <<"regsitring dataType for filewriting: fDataTypesToFile[" << tmpCnt <<"]"<<endl;
}
else if(dataType.compare("gkDDLPackedRawDataType") == 0)
{
- fDataTypesToFile[tmpCnt] = AliHLTPHOSDefinitions::gkDDLPackedRawDataType;
+ fDataTypesToFile[tmpCnt] = AliHLTPHOSDefinitions::fgkDDLPackedRawDataType;
}
cout << "dataType.compare(cmpString) = " <<dataType.compare(cmpString)<<endl;
return ret;
}
-
+//____________________________________________________________________________________
int
AliHLTPHOSFileWriterComponent::Deinit()
{
- // see header file for documentation
return 0;
}
+//____________________________________________________________________________________
int
AliHLTPHOSFileWriterComponent::DoDeinit()
{
- // see header file for documentation
Logging(kHLTLogInfo, "HLT", "PHOS", ",AliHLTPHOSFileWriterComponen DoDeinit");
return 0;
}
+
+//____________________________________________________________________________________
const char*
AliHLTPHOSFileWriterComponent::GetComponentID()
{
- // see header file for documentation
return "PhosFileWriter";
}
+
+//____________________________________________________________________________________
AliHLTComponent*
AliHLTPHOSFileWriterComponent::Spawn()
{
- // see header file for documentation
return new AliHLTPHOSFileWriterComponent;
}
+//____________________________________________________________________________________
void
AliHLTPHOSFileWriterComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
- // see header file for documentation
- const AliHLTComponentDataType* pType=fInputDataTypes;
+ const AliHLTComponentDataType* pType=fgkInputDataTypes;
while (pType->fID!=0) {
list.push_back(*pType);
pType++;
}
}
+//____________________________________________________________________________________
AliHLTComponentDataType
AliHLTPHOSFileWriterComponent::GetOutputDataType()
{
- // see header file for documentation
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
+//____________________________________________________________________________________
void
AliHLTPHOSFileWriterComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
inputMultiplier = 0.1;
}
+//____________________________________________________________________________________
Bool_t
AliHLTPHOSFileWriterComponent::IsRegisteredDataType(const AliHLTComponentDataType& dataType)
{
#ifndef ALIHLTPHOSFILEWRITERCOMPONENT_H
#define ALIHLTPHOSFILEWRITERCOMPONENT_H
-#include "AliHLTPHOSDefinitions.h"
+//#include "AliHLTPHOSDefinitions.h"
#include <string>
#include "AliHLTPHOSCommonDefs.h"
-#include "AliHLTPHOSFileWriter.h"
-#include "AliHLTPHOSCellEnergiesFileWriter.h"
-#include "AliHLTPHOSDDLPackedFileWriter.h"
#include "Rtypes.h"
#include "AliHLTFileWriter.h"
+#include <vector>
class AliRawReaderMemory;
class AliCaloRawStream;
class AliHLTPHOSRcuCellEnergyDataStruct;
class AliHLTPHOSFileWriterComponent;
+class AliHLTPHOSDDLPackedFileWriter;
+class AliHLTPHOSCellEnergiesFileWriter;
+//class AliHLTFileWriter;
class AliHLTPHOSFileWriterComponent:public AliHLTFileWriter
{
virtual int Deinit();
virtual int DoDeinit();
virtual const char* GetComponentID();
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>&);
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
virtual AliHLTComponent* Spawn();
{
return *this;
};
- AliHLTPHOSCellEnergiesFileWriter *fCellEnergiesFileWriterPtr;
- AliHLTPHOSDDLPackedFileWriter *fDDLPackedFileWriterPtr ;
- string fDirectory; /**<target directory for files*/
- string fFilename; /**<the basename of the output file*/
- AliHLTComponentDataType fDataTypesToFile[N_DATATYPES];
- int fEventCount;
- static const AliHLTComponentDataType fInputDataTypes[];
+ AliHLTPHOSCellEnergiesFileWriter *fCellEnergiesFileWriterPtr; /**<to write celle energies to files*/
+ AliHLTPHOSDDLPackedFileWriter *fDDLPackedFileWriterPtr ; /**<to write untouched DDL raw data to files*/
+ string fDirectory; /**<target directory for files*/
+ string fFilename; /**<the basename of the output file*/
+ AliHLTComponentDataType fDataTypesToFile[N_DATATYPES]; /**<Array for registering datatypes that should be written to files*/
+ int fEventCount; /**<Event counter*/
+ static const AliHLTComponentDataType fgkInputDataTypes[]; /**<Datatypes that can be given as input to this component*/
};
#endif
* and it fills the histograms with amplitudes per channel. *
* Usage example see in PHOS/macros/Shuttle/AliPHOSCalibHistoProducer.C *
**************************************************************************/
-AliHLTPHOSHistogramProducerComponent:: AliHLTPHOSHistogramProducerComponent():AliHLTProcessor(), fEventCount(0), fEquippmentID(0)
+AliHLTPHOSHistogramProducerComponent:: AliHLTPHOSHistogramProducerComponent():AliHLTProcessor(), fPhosEventCount(0), fEquippmentID(0)
{
- /**
- *Default constructor
- */
Reset();
}
-
+//________________________________________________________________________________________
AliHLTPHOSHistogramProducerComponent::~ AliHLTPHOSHistogramProducerComponent()
{
- /**
- *Default destructor
- */
-}
+}
-AliHLTPHOSHistogramProducerComponent::AliHLTPHOSHistogramProducerComponent(const AliHLTPHOSHistogramProducerComponent & ) : AliHLTProcessor(), fEventCount(0), fEquippmentID(0)
+//________________________________________________________________________________________
+AliHLTPHOSHistogramProducerComponent::AliHLTPHOSHistogramProducerComponent(const AliHLTPHOSHistogramProducerComponent & ) : AliHLTProcessor(), fPhosEventCount(0), fEquippmentID(0)
{
- /**
- *Copy constructor
- */
-}
+}
+//________________________________________________________________________________________
int
AliHLTPHOSHistogramProducerComponent::Deinit()
{
- /**
- *See base class for documenation
- */
return 0;
}
-
+//________________________________________________________________________________________
int
AliHLTPHOSHistogramProducerComponent::DoDeinit()
{
return 0;
}
-
+//________________________________________________________________________________________
const char*
AliHLTPHOSHistogramProducerComponent::GetComponentID()
{
- /**
- *See base class for documenation
- */
return "HistogramProducer";
}
-
+//________________________________________________________________________________________
void
- AliHLTPHOSHistogramProducerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+AliHLTPHOSHistogramProducerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
- /**
- *See base class for documenation
- */
const AliHLTComponentDataType* pType=fgkInputDataTypes;
while (pType->fID!=0)
{
}
}
-
+//________________________________________________________________________________________
AliHLTComponentDataType
AliHLTPHOSHistogramProducerComponent::GetOutputDataType()
{
- /**
- *See base class for documenation
- */
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
+//________________________________________________________________________________________
void
AliHLTPHOSHistogramProducerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
{
- /**
- *See base class for documenation
- */
constBase = 30;
inputMultiplier = 1;
}
-
-int AliHLTPHOSHistogramProducerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+//________________________________________________________________________________________
+int
+AliHLTPHOSHistogramProducerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
FillBlockData( bd );
bd.fOffset = offset;
bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::gkCellAccumulatedEnergyDataType;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkCellAccumulatedEnergyDataType;
bd.fSpecification = 0xFFFFFFFF;
outputBlocks.push_back( bd );
tSize += mysize;
return EMSGSIZE;
}
- fEventCount++;
+ fPhosEventCount++;
return 0;
}//end DoEvent
+//________________________________________________________________________________________
int
AliHLTPHOSHistogramProducerComponent::DoInit( int argc, const char** argv )
{
}
+//________________________________________________________________________________________
void
AliHLTPHOSHistogramProducerComponent::DumpData(int gain)
{
+//________________________________________________________________________________________
void
AliHLTPHOSHistogramProducerComponent::Reset()
{
}
} // end Reset
+
+//________________________________________________________________________________________
void
AliHLTPHOSHistogramProducerComponent::ResetDataPtr()
{
}
+//________________________________________________________________________________________
void
AliHLTPHOSHistogramProducerComponent::SetEquippmentId(int id)
{
fEquippmentID = id;
}
+
+//________________________________________________________________________________________
const int
AliHLTPHOSHistogramProducerComponent::GetEquippmentId() const
{
return fEquippmentID;
}
-
+//________________________________________________________________________________________
AliHLTComponent*
AliHLTPHOSHistogramProducerComponent::Spawn()
{
virtual int DoInit( int argc = 0, const char** argv = 0);
virtual int Deinit();
virtual int DoDeinit();
- virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
+ virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
void DumpData(int gain = 0);
const int GetEquippmentId() const;
virtual const char* GetComponentID();
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list);
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
void SetEquippmentId(int id = 0);
Double_t fAccumulatedValues[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS]; /**<Accumulated energy for each readout channel of one RCU*/
// Double_t fTimingAverageValues[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS];
AliHLTUInt32_t fHits[N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS]; /**<Total number of hits for each cell of one RCU*/
- int fEventCount; /**<Event counter, (mainly used for debugging)*/
+ int fPhosEventCount; /**<Event counter, (mainly used for debugging)*/
AliHLTUInt32_t fEquippmentID; /**<Eguippment ID as defined by ALICE*/
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES]; /**<Array to temporarily store dat fro a single altro channel*/
AliHLTPHOSModuleCellAccumulatedEnergyDataStruct* fOutPtr; /**<Pointer to outputbuffer to write results from the component into shared memory*/
**************************************************************************/
#include "AliHLTPHOSModuleMergerComponent.h"
-//#include <iostream>
-//#include "stdio.h"
#include "AliRawReaderMemory.h"
#include "AliCaloRawStream.h"
-//#include <cstdlib>
#include <cstdio>
#include "AliHLTPHOSRcuCellEnergyDataStruct.h"
const AliHLTComponentDataType AliHLTPHOSModuleMergerComponent::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
const AliHLTComponentDataType AliHLTPHOSModuleMergerComponent::fgkOutputDataType=kAliHLTVoidDataType;
-
AliHLTPHOSModuleMergerComponent gAliHLTPHOSModuleMergerComponent;
-AliHLTPHOSModuleMergerComponent:: AliHLTPHOSModuleMergerComponent():AliHLTProcessor(), fEventCount(0), fEquippmentID(0)
+
+//_____________________________________________________________________________________________________
+AliHLTPHOSModuleMergerComponent:: AliHLTPHOSModuleMergerComponent():AliHLTProcessor(), fPhosEventCount(0), fEquippmentID(0)
{
}
+//_____________________________________________________________________________________________________
AliHLTPHOSModuleMergerComponent::~ AliHLTPHOSModuleMergerComponent()
{
}
-AliHLTPHOSModuleMergerComponent::AliHLTPHOSModuleMergerComponent(const AliHLTPHOSModuleMergerComponent & ) : AliHLTProcessor(), fEventCount(0), fEquippmentID(0)
+//_____________________________________________________________________________________________________
+AliHLTPHOSModuleMergerComponent::AliHLTPHOSModuleMergerComponent(const AliHLTPHOSModuleMergerComponent & ) : AliHLTProcessor(), fPhosEventCount(0), fEquippmentID(0)
{
}
+//_____________________________________________________________________________________________________
int
AliHLTPHOSModuleMergerComponent::Deinit()
{
}
+//_____________________________________________________________________________________________________
int
AliHLTPHOSModuleMergerComponent::DoDeinit()
{
}
+//_____________________________________________________________________________________________________
const char*
AliHLTPHOSModuleMergerComponent::GetComponentID()
{
}
+//_____________________________________________________________________________________________________
void
- AliHLTPHOSModuleMergerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+AliHLTPHOSModuleMergerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
- ///
const AliHLTComponentDataType* pType=fgkInputDataTypes;
while (pType->fID!=0)
{
}
+//_____________________________________________________________________________________________________
AliHLTComponentDataType
AliHLTPHOSModuleMergerComponent::GetOutputDataType()
{
- ///
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
+//_____________________________________________________________________________________________________
void
AliHLTPHOSModuleMergerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
{
}
DumpData(1);
- fEventCount++;
+ fPhosEventCount++;
return 0;
}//end DoEvent
+//_____________________________________________________________________________________________________
int
AliHLTPHOSModuleMergerComponent::DoInit( int argc, const char** argv )
{
}
+//_____________________________________________________________________________________________________
void
AliHLTPHOSModuleMergerComponent::DumpData(int gain)
{
+//_____________________________________________________________________________________________________
void
AliHLTPHOSModuleMergerComponent::Reset()
{
}
} // end Reset
+
+//_____________________________________________________________________________________________________
void
AliHLTPHOSModuleMergerComponent::ResetDataPtr()
{
}
+//_____________________________________________________________________________________________________
void
AliHLTPHOSModuleMergerComponent::SetEquippmentId(int id)
{
fEquippmentID = id;
}
-int
-AliHLTPHOSModuleMergerComponent::GetEquippmentId()
+
+//_____________________________________________________________________________________________________
+const int
+AliHLTPHOSModuleMergerComponent::GetEquippmentId() const
{
return fEquippmentID;
}
+//_____________________________________________________________________________________________________
AliHLTComponent*
AliHLTPHOSModuleMergerComponent::Spawn()
{
virtual int DoInit(int argc =0, const char** argv = 0);
virtual int Deinit();
virtual int DoDeinit();
- virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*, AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
+ virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
void DumpData(int gain =0);
- int GetEquippmentId();
+ const int GetEquippmentId() const;
virtual const char* GetComponentID();
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list);
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
void SetEquippmentId(int id = 0);
void ResetDataPtr();
private:
- int fEventCount; /**<event counter*/
+ int fPhosEventCount; /**<event counter*/
AliHLTUInt32_t fEquippmentID; /**<Eguippment ID as given by ALICE*/
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES]; /**<Array to tmporarily store samples from a single ALTRO*/
Double_t fMaxValues[N_MODULES][N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS]; /**<Tower/Crystal energies*/
ClassImp(AliHLTPHOSPulseGenerator)
-/**
- * Default constructor, not to be called without argumets
- **/
-AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(): fAmplitude(0), fNSamples(0),fTau(0), fSampleFreq(0), fTZero(0), fDataPtr(0), fDT(0), fEvent(0)
+//______________________________________________________________________________________________________
+AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(): fAmplitude(0), fNSamples(0),fTau(0), fSampleFreq(0), fTZero(0), fDataPtr(0), fDT(0)
{
cout << "You cannot invoke the Pulsgenerator without parameters" << endl;
}
-AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(const AliHLTPHOSPulseGenerator &): fAmplitude(0), fNSamples(0),fTau(0), fSampleFreq(0), fTZero(0), fDataPtr(0), fDT(0), fEvent(0)
+
+//______________________________________________________________________________________________________
+AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(const AliHLTPHOSPulseGenerator &): fAmplitude(0), fNSamples(0),fTau(0), fSampleFreq(0), fTZero(0), fDataPtr(0), fDT(0)
{
}
+//______________________________________________________________________________________________________
AliHLTPHOSPulseGenerator::~AliHLTPHOSPulseGenerator()
{
delete fDataPtr;
* Contruct a pulsegenrator object an initializes all necessary parameters
* @param a Amplitude in ADC levels (0 -1023)
* @param t0 Timedelay in nanoseconds of signal relative the first sample. This value should be between 0 and Ts
- * where Ts is the sample interval
+ * @param N the number of samples
+ * @param tau Rise time of the semi Gaussian signal
+ * @param fs samling rate
**/
-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)
+AliHLTPHOSPulseGenerator::AliHLTPHOSPulseGenerator(double a, double t0, int N, double tau, double fs): fAmplitude(a), fNSamples(N),fTau(0), fSampleFreq(fs), fTZero(0), fDataPtr(0), fDT(0)
{
fDataPtr = new double[100];
SetAmplitude(a);
SetDT(fs);
SetTZero(t0);
fNSamples=N;
- fTau=t;
+ fTau=tau;
fSampleFreq=fs;
+ // MakePulse(fDataPtr,a);
MakePulse(fDataPtr);
}
+
/**
* Adds a baseline offset to the signal
* @param baselineLevel The basline level to add
* Adds correlated Gaussian noise with cutof frequency "cutoff"
* @param dataPtr array of values
* @param sigma noise amplitude in entities of ADC levels
- * @param -30DB cutoff frequency of the noise in entities of sampling frequency
+ * @param cutoff -30DB cutoff frequency of the noise in entities of sampling frequency
**/
void
AliHLTPHOSPulseGenerator::AddNoise(double *dataPtr, double *sigma, double cutoff)
cout << "AddNoise is not implemeted yet" << endl;
}
+
+
/**
* Adds pretrigger samples to the sample array and returns
* a new array containing the pretrigger samples concatenatet
* in front of the samples given by "samples"
- * @param The baseline value of the pretrigger samples
- * @param The sample array for which to add the pretrigger samples
+ * @param baselineLevel The baseline value of the pretrigger samples
+ * @param samples The sample array for which to add the pretrigger samples
**/
double *
AliHLTPHOSPulseGenerator::AddPretriggerSamples(double baselineLevel, double *samples)
}
-/**
- * Returns the generated pulse with the parameters given in the constructor
- **/
-double *
-AliHLTPHOSPulseGenerator::GetPulse()
-{
- return fDataPtr;
-}
-
-
/**
* Returns a Pulse with new amplidude and t0
* @param a new amplidude, overriding the one given in the constructor
+ * @param t0 start time of the pulse relative to the sampling clock.
**/
double *
AliHLTPHOSPulseGenerator::GetPulse(double a, double t0)
// cout << "Quantisize is not implemented yet" << endl;
}
+
+//______________________________________________________________________________________________________
void
AliHLTPHOSPulseGenerator::SetAmplitude(double a)
{
fAmplitude=a;
}
+
+//______________________________________________________________________________________________________
void
AliHLTPHOSPulseGenerator::SetDT(double fs)
{
fDT=1/fs;
}
+//______________________________________________________________________________________________________
void
AliHLTPHOSPulseGenerator::SetTZero(double t0)
{
}
+//______________________________________________________________________________________________________
void
AliHLTPHOSPulseGenerator::MakePulse(double *dtaPtr)
{
#include <Rtypes.h>
+
class AliHLTPHOSPulseGenerator
{
public:
AliHLTPHOSPulseGenerator();
virtual ~AliHLTPHOSPulseGenerator();
- AliHLTPHOSPulseGenerator(double a, double t0, const int N, const double t, const double f);
+ AliHLTPHOSPulseGenerator(double a, double t0, const int N , const double tau, const double fs);
AliHLTPHOSPulseGenerator(const AliHLTPHOSPulseGenerator & );
AliHLTPHOSPulseGenerator & operator = (const AliHLTPHOSPulseGenerator)
{
return *this;
}
- void AddBaseline(double baselineLevel, double *samples);
+ void AddBaseline(double baselineLevel = 0, double *samples = 0);
void AddNoise(double *dataPtr, double *sigma);
- void AddNoise(double *dataPtr, double *sigma, double cutoff);
- double *AddPretriggerSamples(double baslineLevel, double *samples);
- double *GetPulse();
- double *GetPulse(double a, double t0);
- void Quantisize(double *dataPtr);
- void SetAmplitude(double a);
- void SetDT(double fs);
- void SetTZero(double t0);
+ void AddNoise(double *dataPtr, double *sigma, double cutoff);
+ double *AddPretriggerSamples(double baslineLevel = 0, double *samples = 0);
+ double *GetPulse(double a = 1, double t0 = 0);
+ void Quantisize(double *dataPtr = 0);
+ void SetAmplitude(double a = 1);
+ void SetDT(double fs = 10);
+ void SetTZero(double t0 = 0);
private:
- void MakePulse(double *dtaPtr);
- void MakePulse(double *dtaPtr, double ampl);
- double fAmplitude;
- int fNSamples;
- double fTau;
- double fSampleFreq;
- double fTZero;
- double *fDataPtr; //[1000]
- double fDT;
- double *fEvent; //[1000]
+ void MakePulse(double *dtaPtr = 0);
+ double fAmplitude; /**<The amplitude in entities of ADC counts of the genrated pulse*/
+ int fNSamples; /**<The number of samples of the genrated pulse*/
+ double fTau; /**<The risetime in entities of us of the generated pulse*/
+ double fSampleFreq; /**<The sampling frequency in MHz*/
+ double fTZero; /**<t0 of the genrated pulse in entities of nanoseconds*/
+ double *fDataPtr; //[1000] /**<pointer to array holding the genrated pulse*/
+ double fDT; /**<1/fSampleFreq*/
+ // double *fEvent; //[1000]
ClassDef(AliHLTPHOSPulseGenerator,1)
};
/**
* Main constructor
-* @param dataPtr Data array for wich a subarray will be taken to perform the fit
+* @param dtaPtr Data array for wich a subarray will be taken to perform the fit
* @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
**/
AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double *dtaPtr, double fs):fFloatDataPtr(0), fSampleFrequency(10), fTau(2), fDTof(99999), fDAmpl(99999), fStartIndex(0)
* Shifts the baseline with the amount given by baselineValue
* If pretrigger samples are not present then the basline correction will be incorrect.
* @param dataPtr array for wich to correct the basline
-* @param BaslineValue the basline value to subtract..
+* @param baselineValue the basline value to subtract..
**/
void
AliHLTPHOSRawAnalyzer::BaselineCorrection(double *dataPtr, double baselineValue)
* Physical time is found by multiplying with the sampling intervall (Ts).
**/
float
-AliHLTPHOSRawAnalyzer::GetTiming()
+AliHLTPHOSRawAnalyzer::GetTiming() const
{
return fDTof;
} //end GetTiming
* Absolute enrgy is found by multiplying with offline calibration constants.
**/
float
-AliHLTPHOSRawAnalyzer::GetEnergy()
+AliHLTPHOSRawAnalyzer::GetEnergy() const
{
return fDAmpl;
} //end GetEnergy
fStartIndex = index;
}
+
void
AliHLTPHOSRawAnalyzer::SetTVector(Double_t *tVector, Int_t size)
{
Double_t
-AliHLTPHOSRawAnalyzer::GetMaxValue(Double_t *dta, Int_t size)
+AliHLTPHOSRawAnalyzer::GetMaxValue(Double_t *dta, Int_t size) const
{
Double_t tmpMax = 0;
void BaselineCorrection(double *dataPtr, int N);
void BaselineCorrection(double *dataPtr, double baselineValue);
int FindStartIndex(double treshold);
- float GetTiming();
- float GetEnergy();
+ float GetTiming() const;
+ float GetEnergy() const;
void SetData(double *data);
void SetSampleFreq(double freq);
void SetStartIndex(int startIndex);
void MakeInitialGuess(int treshold);
virtual void SetTVector(Double_t *tVector, Int_t size);
virtual void SetAVector(Double_t *aVector, Int_t size);
- virtual void Evaluate(int start = 0, int lenght = 100) = 0;
- Double_t GetMaxValue(Double_t *dta, Int_t size);
+
+ /**
+ *Abstratct class documentation
+ */
+ virtual void Evaluate(Int_t start = 0, Int_t lenght = 100) = 0;
+ Double_t GetMaxValue(Double_t *dta, Int_t size) const;
protected:
Double_t *fFloatDataPtr; /**<Float representation of data that should be fitted */
/**
-* Extraction of timing and energy using the Peakfinde Algorithm.
+* Extraction of timing and energy using Chi Square Fit.
* 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.
#ifndef ALIHLTPHOSRAWANALYZERCHISQUAREFIT_H
#define ALIHLTPHOSRAWANALYZERCHISQUAREFIT_H
-#include <Rtypes.h>
+//#include <Rtypes.h>
#include "TObject.h"
#include "AliHLTPHOSRawAnalyzer.h"
+//_________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent():AliHLTProcessor(), fAnalyzerPtr(0),
-fEquippmentID(0), fModuleID(0), fRcuX(0), fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0),fPrintInfo(kFALSE),fSendChannelData(kFALSE),fPrintInfoFrequncy(1000),
+fkEquippmentID(0), fModuleID(0), fRcuX(0), fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0),fPrintInfo(kFALSE),fSendChannelData(kFALSE),fPrintInfoFrequncy(1000),
fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
{
- /**
- *Default constructor
- */
-}
+}
+//_________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
{
/**
}
}
-
+//_________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerComponent::AliHLTPHOSRawAnalyzerComponent(const AliHLTPHOSRawAnalyzerComponent & ) : AliHLTProcessor(), fAnalyzerPtr(0),
-fEquippmentID(0), fModuleID(0), fRcuX(0), fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0),fPrintInfo(kFALSE),fSendChannelData(kFALSE),fPrintInfoFrequncy(1000),
+fkEquippmentID(0), fModuleID(0), fRcuX(0), fRcuZ(0),fRcuZOffset(0), fRcuXOffset(0),fPrintInfo(kFALSE),fSendChannelData(kFALSE),fPrintInfoFrequncy(1000),
fPHOSRawStream(0), fRawMemoryReader(0), fOutPtr(0)
{
/**
*/
}
+//_________________________________________________________________________________________________
int
AliHLTPHOSRawAnalyzerComponent::Deinit()
{
return 0;
}
+//_________________________________________________________________________________________________
int
AliHLTPHOSRawAnalyzerComponent::DoDeinit()
{
- //See base class for documentation
+ //See base class or for documentation
cout << "DoDeinit" << endl;
Logging(kHLTLogInfo, "HLT", "PHOS", ",AliHLTPHOSRawAnalyzerComponen DoDeinit");
}
+//_________________________________________________________________________________________________
const char*
AliHLTPHOSRawAnalyzerComponent::GetComponentID()
{
- ///Returns the component ID
+ //Returns the component ID
return "AliPhosTestRaw";
}
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
}
}
+//_________________________________________________________________________________________________
AliHLTComponentDataType
AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
{
//See Base class for documentation
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
+
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
{
//See Base class for documentation
constBase = 30;
- // inputMultiplier = 0.1;
inputMultiplier = 1;
}
-int AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
+//_________________________________________________________________________________________________
+int
+AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
{
- /// Function that proceesses the raw date to give Energy and TOF for the
- /// Individual cells/crystals.
-
+ //See base class for documentation
AliHLTUInt8_t tmpMod = 0;
AliHLTUInt8_t tmpZ = 0;
AliHLTUInt8_t tmpX = 0;
mysize = 0;
offset = tSize;
- if ( iter->fDataType != AliHLTPHOSDefinitions::gkDDLPackedRawDataType )
+ if ( iter->fDataType != AliHLTPHOSDefinitions::fgkDDLPackedRawDataType )
{
continue;
}
FillBlockData( bd );
bd.fOffset = offset;
bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
bd.fSpecification = 0xFFFFFFFF;
outputBlocks.push_back( bd );
tSize += mysize;
{
if(fgEventCount%fPrintInfoFrequncy == 0)
{
- cout <<"Analyzing event " << fgEventCount << "for Equippment " << fEquippmentID << endl;
+ cout <<"Analyzing event " << fgEventCount << "for Equippment " << fkEquippmentID << endl;
}
}
size = tSize;
}//end DoEvent
-
+//_________________________________________________________________________________________________
int
AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
{
- /// See base class for documentation
+ // See headerfile for documentation
fSendChannelData = kFALSE;
fPrintInfo = kFALSE;
Reset();
if(i+1 <= argc)
{
SetEquippmentID((AliHLTUInt16_t)atoi(argv[i+1]));
- cout << "AliHLTPHOSRawAnalyzerComponent:DoInit setting equippment ID to " << fEquippmentID <<endl;
- fRawMemoryReader->SetEquipmentID(fEquippmentID);
- SetCoordinates(fEquippmentID);
+ cout << "AliHLTPHOSRawAnalyzerComponent:DoInit setting equippment ID to " << fkEquippmentID <<endl;
+ fRawMemoryReader->SetEquipmentID(fkEquippmentID);
+ SetCoordinates(fkEquippmentID);
isSetEquippmentID = kTRUE;
}
else
return 0;
}
-
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::DumpData(int gain) const
{
}
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::DumpChannelData(Double_t *data) const
{
cout << endl;
}
-
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::Reset()
{
} // end Reset
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::ResetDataPtr(int startindex, int sampleCnt)
{
}
}
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::SetEquippmentID(AliHLTUInt16_t id)
{
- ///Changing the value of the constant fEquippmentID
+ ///Changing the value of the constant fkEquippmentID
///by virue of const_cast as it should only be set once
///and then remain constant. It caannot be set in the class constructor
///because it should be set in the DoInit fucntion.
- AliHLTUInt16_t &ref = const_cast<AliHLTUInt16_t&>(fEquippmentID);
+ AliHLTUInt16_t &ref = const_cast<AliHLTUInt16_t&>(fkEquippmentID);
ref = id;
}
+//_________________________________________________________________________________________________
const AliHLTUInt16_t
AliHLTPHOSRawAnalyzerComponent::GetEquippmentID() const
{
//shutting up the code checker
- return fEquippmentID;
+ return fkEquippmentID;
}
+//_________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerComponent::SetCoordinates(AliHLTUInt16_t equippmentID)
{
//shutting up the code checker
- int rcuIndex = (fEquippmentID - 1792)%N_RCUS_PER_MODULE;
- fModuleID = (fEquippmentID -1792 -rcuIndex)/N_RCUS_PER_MODULE;
+ int rcuIndex = (fkEquippmentID - 1792)%N_RCUS_PER_MODULE;
+ fModuleID = (fkEquippmentID -1792 -rcuIndex)/N_RCUS_PER_MODULE;
if(rcuIndex == 0)
{
cout <<"********InitInfo************"<< endl;
cout <<"AliHLTPHOSRawAnalyzerComponent::SetCoordinate casted"<< endl;
- cout <<"Equpippment ID =\t"<< fEquippmentID <<endl;
+ cout <<"Equpippment ID =\t"<< fkEquippmentID <<endl;
cout <<"Module ID =\t"<< (int)fModuleID<<endl;
cout <<"RCUX =\t\t" << (int)fRcuX << endl;
cout <<"RCUZ =\t\t" << (int)fRcuZ << endl;
const AliHLTUInt16_t GetEquippmentID() const;
void SetCoordinates(AliHLTUInt16_t equippmentID =0);
virtual const char* GetComponentID() = 0;
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ // virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>& list);
+
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> >& );
-
protected:
AliHLTPHOSRawAnalyzer *fAnalyzerPtr; /**<Pointer to an analyzer object used for raw data anlysis*/
private:
+ virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
void Reset();
void ResetDataPtr(int startindex = 0, int sampleCnt = 0);
static int fgEventCount; /**<Global event counter for this component*/
- const AliHLTUInt16_t fEquippmentID; /**<Equippment ID as defined by ALICE*/
+ const AliHLTUInt16_t fkEquippmentID; /**<Equippment ID as defined by ALICE*/
AliHLTUInt8_t fModuleID; /**<ID of the module this component read data from (0-4)*/
AliHLTUInt8_t fRcuX; /**<X position of RCU the data from this Equippment comes from (0 or 1)*/
AliHLTUInt8_t fRcuZ; /**<Z position of RCU the data from this Equippment comes from (0 or 1)*/
* provided "as is" without express or implied warranty. *
**************************************************************************/
+
#include "AliHLTPHOSRawAnalyzerCrude.h"
#include <iostream>
ClassImp(AliHLTPHOSRawAnalyzerCrude)
+//____________________________________________________________________________
AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude(const AliHLTPHOSRawAnalyzerCrude&):AliHLTPHOSRawAnalyzer()
{
* a sequense of ADC digitized 10 bit integer values, however for performance reasons all values used in
* calculation is of type double.
**/
+//____________________________________________________________________________
AliHLTPHOSRawAnalyzerCrude::AliHLTPHOSRawAnalyzerCrude():AliHLTPHOSRawAnalyzer()
{
}
-
+//____________________________________________________________________________
AliHLTPHOSRawAnalyzerCrude::~AliHLTPHOSRawAnalyzerCrude()
{
* "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
-* @param tVector the peakfinder vector for timing
-* @param aVector the peakfinder vector for amplitude (energy)
**/
+//____________________________________________________________________________
void
AliHLTPHOSRawAnalyzerCrude::Evaluate(int start, int length)
{
#ifndef ALIHLTPHOSRAWANALYZERCRUDE_H
#define ALIHLTPHOSRAWANALYZERCRUDE_H
-#include <Rtypes.h>
-#include "TObject.h"
+//#include <Rtypes.h>
+//#include "TObject.h"
#include "AliHLTPHOSRawAnalyzer.h"
+
/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
* provided "as is" without express or implied warranty. *
**************************************************************************/
+
#include "AliHLTPHOSRawAnalyzerCrudeComponent.h"
#include "AliHLTPHOSRawAnalyzerCrude.h"
AliHLTPHOSRawAnalyzerCrudeComponent gAliHLTPHOSRawAnalyzerCrudeComponent;
+//___________________________________________________________________________
AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent()
{
fAnalyzerPtr = new AliHLTPHOSRawAnalyzerCrude();
}
+//___________________________________________________________________________
AliHLTPHOSRawAnalyzerCrudeComponent::~AliHLTPHOSRawAnalyzerCrudeComponent()
{
}
-
+//___________________________________________________________________________
AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent(const AliHLTPHOSRawAnalyzerCrudeComponent & ):AliHLTPHOSRawAnalyzerComponent()
{
}
+//___________________________________________________________________________
const char*
AliHLTPHOSRawAnalyzerCrudeComponent::GetComponentID()
{
return "PhosRawCrude";
}
+//___________________________________________________________________________
AliHLTComponent*
AliHLTPHOSRawAnalyzerCrudeComponent::Spawn()
{
* See cxx source for full Copyright notice */
+
class AliHLTPHOSRawAnalyzerCrudeComponent: public AliHLTPHOSRawAnalyzerComponent
{
public:
ClassImp(AliHLTPHOSRawAnalyzerKLevel)
-
-AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel(const AliHLTPHOSRawAnalyzerKLevel&):AliHLTPHOSRawAnalyzer(), tKLevel(0)
+//________________________________________________________________________________________________________
+AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel(const AliHLTPHOSRawAnalyzerKLevel&):AliHLTPHOSRawAnalyzer(), fTKLevel(0)
{
-
+
}
* a sequense of ADC digitized 10 bit integer values, however for performance reasons all values used in
* calculation is of type double.
**/
-AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel():AliHLTPHOSRawAnalyzer(), tKLevel(0)
+//________________________________________________________________________________________________________
+AliHLTPHOSRawAnalyzerKLevel::AliHLTPHOSRawAnalyzerKLevel():AliHLTPHOSRawAnalyzer(), fTKLevel(0)
{
cout <<"You cannot invoke the Fitter without arguments"<<endl;;
}
+//________________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerKLevel::~AliHLTPHOSRawAnalyzerKLevel()
{
/**
-* Extraction of timing and energy using the Peakfinde Algorithm.
+* Extraction of timing and energy using the K-Level method.
* 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.
* @param start the start index of the subarray of the data array.
* @param length the number of samples to use starting from index
**/
+//________________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerKLevel::Evaluate(int start, int length)
{
virtual ~AliHLTPHOSRawAnalyzerKLevel();
virtual void Evaluate(int start = 0, int lenght = 100);
private:
- double tKLevel;
+ double fTKLevel; /**<K-Level*/
ClassDef(AliHLTPHOSRawAnalyzerKLevel, 2)
};
ClassImp(AliHLTPHOSRawAnalyzerLMS)
-
+//_____________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerLMS::AliHLTPHOSRawAnalyzerLMS(const AliHLTPHOSRawAnalyzerLMS&):AliHLTPHOSRawAnalyzer()
{
}
-
+//_____________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerLMS::AliHLTPHOSRawAnalyzerLMS():AliHLTPHOSRawAnalyzer()
{
cout <<"You cannot invoke the Fitter without arguments"<<endl;;
/**
* Main constructor
-* @param dataPtr Data array for wich a subarray will be taken to perform the fit
+* @param dtaPtr Data array for wich a subarray will be taken to perform the fit
* @param fs the sampling frequency in entities of MHz. Needed in order to calculate physical time
**/
+//_____________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerLMS::AliHLTPHOSRawAnalyzerLMS(double *dtaPtr, double fs):AliHLTPHOSRawAnalyzer()
{
fFloatDataPtr = dtaPtr;
} //end AliHLTPHOSRawAnalyzerLMS
+//_____________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerLMS::~AliHLTPHOSRawAnalyzerLMS()
{
} //end AliHLTPHOSRawAnalyzerLMS
-
+//_____________________________________________________________________________________________________
void
AliHLTPHOSRawAnalyzerLMS::Evaluate(int start, int length)
{
virtual void Evaluate(int start = 0, int lenght = 100);
private:
- double kfMCovarPtrPtr[1008][1008]; /**<Covariance matrix of the measurements*/
+ double fMCovarPtrPtr[1008][1008]; /**<Covariance matrix of the measurements*/
double fPCovarPtrPtr[1008][1008]; /**<Covariance matrix of the estimated parameters*/
ClassDef(AliHLTPHOSRawAnalyzerLMS, 2)
}
-
+//___________________________________________________________________
AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder()
{
}
+//___________________________________________________________________
void
AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(Double_t *aVec, Int_t size)
{
}
}
-/**
-* 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
-* @param tVector the peakfinder vector for timing
-* @param aVector the peakfinder vector for amplitude (energy)
-**/
+
+//___________________________________________________________________
void
-AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(int start, int length)
+AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t start, Int_t length)
{
fDTof = 0;
fDAmpl = 0;
if(fTVectorPtr == 0 || fAVectorPtr == 0)
{
- // printf("\nError: the peakfinder vectors are not specified, aborting !!!\n");
+
}
else
{
-
+
+
if(length < fTVectorSize)
{
tmpLength = length;
public:
AliHLTPHOSRawAnalyzerPeakFinder();
AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder & );
- AliHLTPHOSRawAnalyzerPeakFinder & operator = (const AliHLTPHOSRawAnalyzerPeakFinder)
+ AliHLTPHOSRawAnalyzerPeakFinder & operator = (const AliHLTPHOSRawAnalyzerPeakFinder &)
{
return *this;
}
virtual ~AliHLTPHOSRawAnalyzerPeakFinder();
- virtual void SetTVector(Double_t *tVect, Int_t size);
- virtual void SetAVector(Double_t *aVect, Int_t size);
- virtual void Evaluate(Int_t start = 0, Int_t lenght = 100);
+
+
+/**
+* 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 tVectPtr the peakfinder vector for timing
+* @param size size in number of values of the time vector
+*/
+ virtual void SetTVector(Double_t *tVectPtr =0, Int_t size = 0);
+
+
+
+/**
+* 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 aVectPtr the peakfinder vector for timing
+* @param size size in number of values of the time vector
+*/
+ virtual void SetAVector(Double_t *aVectPtr =0, Int_t size =0);
+
+
+/**
+* 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
+**/
+ virtual void Evaluate(Int_t start = 0, Int_t length = 100);
private:
Double_t *fTVectorPtr; //[1008] /**<Peakfinder vector for TOF reconstruction*/
Double_t *fAVectorPtr; //[1008] /**<Peakfinder vector for Energy reconstruction*/
#include "AliHLTPHOSCommonDefs.h"
+
+
AliHLTPHOSRawAnalyzerPeakFinderComponent gAliHLTPHOSRawAnalyzerPeakFinderComponent;
+//___________________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponent()
{
fAnalyzerPtr = new AliHLTPHOSRawAnalyzerPeakFinder();
}
+//___________________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerPeakFinderComponent::~AliHLTPHOSRawAnalyzerPeakFinderComponent()
{
}
+//___________________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent(const AliHLTPHOSRawAnalyzerPeakFinderComponent & ) : AliHLTPHOSRawAnalyzerComponent()
{
}
+//___________________________________________________________________________________________________________
const char*
AliHLTPHOSRawAnalyzerPeakFinderComponent::GetComponentID()
{
return "PhosRawPeakFinder";
}
+//___________________________________________________________________________________________________________
Bool_t
AliHLTPHOSRawAnalyzerPeakFinderComponent::LoadPFVector()
{
}
+//___________________________________________________________________________________________________________
Bool_t
AliHLTPHOSRawAnalyzerPeakFinderComponent::LoadPFVector(int startIndex, int nSamples, int tau, int fs)
{
}
+//___________________________________________________________________________________________________________
AliHLTComponent*
AliHLTPHOSRawAnalyzerPeakFinderComponent::Spawn()
{
/* Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+
#include "AliHLTPHOSRawAnalyzerComponent.h"
class AliHLTPHOSRawAnalyzerPeakFinderComponent: public AliHLTPHOSRawAnalyzerComponent
{
public:
AliHLTPHOSRawAnalyzerPeakFinderComponent();
- ~AliHLTPHOSRawAnalyzerPeakFinderComponent();
+ virtual ~AliHLTPHOSRawAnalyzerPeakFinderComponent();
virtual const char* GetComponentID();
virtual AliHLTComponent* Spawn();
- //static AliHLTPHOSRawAnalyzerPeakFinderComponent gAliHLTPHOSRawAnalyzerPeakFinderComponent;
private:
Bool_t LoadPFVector();
Bool_t LoadPFVector(int startindex, int Nsamples, int tau, int fs);
AliHLTComponentDataType
AliHLTPHOSRcuHistogramProducerComponent::GetOutputDataType()
{
- return AliHLTPHOSDefinitions::gkCellEnergyDataType;
+ return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
}
FillBlockData( bd );
bd.fOffset = offset;
bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::gkCellAccumulatedEnergyDataType;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkCellAccumulatedEnergyDataType;
bd.fSpecification = 0xFFFFFFFF;
outputBlocks.push_back( bd );
tSize += mysize;
virtual int DoInit( int argc, const char** argv );
virtual int Deinit();
virtual int DoDeinit();
- virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*,
- AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
- virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ // virtual int DoEvent(const AliHLTComponentEventData&, const AliHLTComponentBlockData*, AliHLTComponentTriggerData&, AliHLTUInt8_t*,
+ // AliHLTUInt32_t&, std::vector<AliHLTComponentBlockData, std::allocator<AliHLTComponentBlockData> >&);
+ virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+
+ // virtual void GetInputDataTypes(std::vector<AliHLTComponentDataType, std::allocator<AliHLTComponentDataType> >&);
+ virtual void GetInputDataTypes( std::vector <AliHLTComponentDataType>&);
+
virtual AliHLTComponentDataType GetOutputDataType();
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
virtual AliHLTComponent* Spawn();