From 9d9ffd373ce36d78e8e847741be1f921feaaf3cb Mon Sep 17 00:00:00 2001 From: richterm Date: Fri, 27 Jul 2007 14:08:06 +0000 Subject: [PATCH] Calibration Processor and TPC calibration components (Jochen) --- HLT/BASE/AliHLTCalibrationProcessor.cxx | 401 ++++++++++++++++++ HLT/BASE/AliHLTCalibrationProcessor.h | 285 +++++++++++++ HLT/BASE/AliHLTComponent.cxx | 10 +- HLT/BASE/AliHLTComponent.h | 10 +- HLT/BASE/AliHLTDataTypes.cxx | 7 + HLT/BASE/AliHLTDataTypes.h | 30 ++ HLT/ChangeLog | 4 + .../AliHLTTPCCalibPedestalComponent.cxx | 157 ++++--- HLT/TPCLib/AliHLTTPCCalibPedestalComponent.h | 66 ++- HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx | 307 ++++++++++++++ HLT/TPCLib/AliHLTTPCCalibPulserComponent.h | 109 +++++ HLT/TPCLib/AliHLTTPCCalibSignalComponent.cxx | 275 ------------ HLT/TPCLib/AliHLTTPCCalibSignalComponent.h | 87 ---- HLT/TPCLib/AliHLTTPCDefinitions.cxx | 2 +- HLT/TPCLib/AliHLTTPCDefinitions.h | 2 +- HLT/configure.ac | 1 + HLT/libAliHLTTPC.pkg | 18 +- HLT/libHLTbase.pkg | 2 + 18 files changed, 1306 insertions(+), 467 deletions(-) create mode 100644 HLT/BASE/AliHLTCalibrationProcessor.cxx create mode 100644 HLT/BASE/AliHLTCalibrationProcessor.h create mode 100644 HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx create mode 100644 HLT/TPCLib/AliHLTTPCCalibPulserComponent.h delete mode 100644 HLT/TPCLib/AliHLTTPCCalibSignalComponent.cxx delete mode 100644 HLT/TPCLib/AliHLTTPCCalibSignalComponent.h diff --git a/HLT/BASE/AliHLTCalibrationProcessor.cxx b/HLT/BASE/AliHLTCalibrationProcessor.cxx new file mode 100644 index 00000000000..42a1af3a222 --- /dev/null +++ b/HLT/BASE/AliHLTCalibrationProcessor.cxx @@ -0,0 +1,401 @@ +/************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * ALICE Experiment at CERN, All rights reserved. * + * * + * Primary Authors: Jochen Thaeder * + * Sebastian Bablok * + * for The ALICE HLT Project. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/** + * @file AliHLTCalibrationProcessor.cxx + * @author Jochen Thaeder, Sebastian Bablok + * @date + * @brief Base class of HLT calibration components. */ + +#if __GNUC__ >= 3 +using namespace std; +#endif + +#include "AliHLTCalibrationProcessor.h" +#include "AliHLTMemoryFile.h" + +#include +#include +#include +#include +#include + +ClassImp(AliHLTCalibrationProcessor) + + +const AliHLTUInt32_t AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize = 204; +const AliHLTUInt32_t AliHLTCalibrationProcessor::fgkFXSProtocolHeaderVersion = 1; + +/* + * ################ Constructor / Destructor #################### + */ + +AliHLTCalibrationProcessor::AliHLTCalibrationProcessor() : + fEventModulo(0), + fUseCorruptEvents(kFALSE), + fEventCounter(0), + fDDLNumber(), + fDummy(0) { + + // see header file for class documentation + // or + // refer to README to build package + // or + // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +} + +AliHLTCalibrationProcessor::~AliHLTCalibrationProcessor() { + // see header file for class documentation +} + +/* + * ######################## InitCalibration ##################### + */ + +Int_t AliHLTCalibrationProcessor::DoInit( Int_t argc, const Char_t** argv ) { + // see header file for class documentation + + Int_t iResult = 0; + TString argument = ""; + TString parameter = ""; + Int_t bMissingParam=0; + + for ( Int_t ii=0; ii=0; ii++ ) { + argument = argv[ii]; + + if ( argument.IsNull() ) continue; + + // -eventmodulo + if ( argument.CompareTo("-eventmodulo") == 0 ) { + if ( ( bMissingParam=( ++ii >= argc ) ) ) break; + parameter = argv[ii]; + parameter.Remove(TString::kLeading, ' '); // remove all blanks + if (parameter.IsDigit()) { + fEventModulo = parameter.Atoi(); + HLTInfo("EventModulo is set to %d.", fEventModulo); + } + else { + HLTError("Cannot convert EventModulo specifier '%s'.", argv[ii]); + iResult = -EINVAL; + break; + } + } + // -usecorruptevents + else if ( argument.CompareTo( "-usecorruptevents" ) == 0 ) { + HLTInfo( "Passing through of corrupted events enabled." ); + fUseCorruptEvents = kTRUE; + } + // not known by calibration processor + else { + if ( ( iResult = ScanArgument( argc-ii, &argv[ii] ) ) == -EINVAL ) { + HLTError( "unknown argument %s", argument.Data() ); + break; + } + else if ( iResult == -EPROTO ) { + bMissingParam = 1; + break; + } + else if ( iResult >= 0 ) { + ii += iResult; + iResult = 0; + } + } + } + + if ( bMissingParam ) { + HLTError( "missing parameter for argument %s", argument.Data() ); + iResult = -EPROTO; + } + + if ( iResult >= 0 ) { + iResult = InitCalibration(); + } + + return iResult; +} + +Int_t AliHLTCalibrationProcessor::InitCalibration() { + // see header file for class documentation + + // fDummy is just touched here to avoid coding convention violation RC11. + // The function can not be declared const since it is just the default implementation, + // overloaded virtual function might not be const. + fDummy = 0; + + return 0; +} + + +Int_t AliHLTCalibrationProcessor::ScanArgument(Int_t argc, const Char_t** argv) { + // see header file for class documentation + + // there are no other arguments than the standard ones + if ( argc == 0 && argv == NULL) { + // this is just to get rid of the warning "unused parameter" + } + + // fDummy is just touched here to avoid coding convention violation RC11. + // The function can not be declared const since it is just the default implementation, + // overloaded virtual function might not be const. + fDummy = 0; + + return -EINVAL; +} + +/* + * ######################## DeinitCalibration ##################### + */ + +Int_t AliHLTCalibrationProcessor::DoDeinit() { + // see header file for class documentation + + int iResult = DeinitCalibration(); + + return iResult; +} + +Int_t AliHLTCalibrationProcessor::DeinitCalibration() { + // see header file for class documentation + + // fDummy is just touched here to avoid coding convention violation RC11. + // The function can not be declared const since it is just the default implementation, + // overloaded virtual function might not be const. + fDummy = 0; + + return 0; +} + +/* + * ######################## DoEvent ##################### + */ + +Int_t AliHLTCalibrationProcessor::DoEvent( const AliHLTComponentEventData& evtData, + const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, + AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks ) +{ + // see header file for class documentation + + Int_t iResult = 0; + const AliHLTComponentBlockData* iter = NULL; + + const AliHLTComponentBlockData* blkSOR = NULL; + const AliHLTComponentBlockData* blkEOR = NULL; + const AliHLTComponentBlockData* blkDDL = NULL; + + HLTInfo( "Event ID: %lu", evtData.fEventID ); + + // --------------- START OF RUN ----------------- + blkSOR = GetFirstInputBlock( kAliHLTDataTypeSOR ); + + // ---------------- END OF RUN ------------------ + blkEOR = GetFirstInputBlock( kAliHLTDataTypeEOR ); + + // -------------- GET DDLNumber ----------------- + blkDDL = GetFirstInputBlock( kAliHLTDataTypeDDL ); + + if ( blkDDL ) { + HLTInfo("DDLLIST block received, size: %u", iter->fSize ); + //AliHLTEventDDL ddlList = ( AliHLTEventDDL* ) iter->fPtr; + } + + // ------------ decide which event type ---------- + + // - if event Type is not SOR or EOR -> process data + if ( ! blkEOR && !blkSOR ) { + iResult = ProcessCalibration( evtData, blocks, trigData, outputPtr, size, outputBlocks ); + fEventCounter++; + } + + // - if event Type is EOR or event modulo is set -> ship data to FXS + // - use event modulo ship data also during the run + if ( ( fEventModulo > 0 && fEventCounter == fEventModulo ) || blkEOR ){ + HLTDebug ( "Ship Data to FXS!" ); + iResult = ShipDataToFXS( evtData, blocks, trigData, outputPtr, size, outputBlocks ); + fEventCounter = 0; + } + + return iResult; +} + +/* + * ######################## ProcessCalibration ##################### + */ + +Int_t AliHLTCalibrationProcessor::ProcessCalibration( const AliHLTComponentEventData& evtData, + const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, + AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks ) { + // see header file for class documentation + + // we just forward to the high level method, all other parameters already + // have been stored internally + return ProcessCalibration( evtData, trigData ); +} + +Int_t AliHLTCalibrationProcessor::ProcessCalibration( const AliHLTComponentEventData& evtData, + AliHLTComponentTriggerData& trigData) { + // see header file for class documentation + + HLTFatal( "no processing method implemented" ); + return -ENOSYS; +} + +/* + * ######################## ShipDataToFXS ##################### + */ + +Int_t AliHLTCalibrationProcessor::ShipDataToFXS( const AliHLTComponentEventData& evtData, + const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, + AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks ) { + // see header file for class documentation + + // we just forward to the high level method, all other parameters already + // have been stored internally + return ShipDataToFXS( evtData, trigData ); +} + + +Int_t AliHLTCalibrationProcessor::ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData) { + // see header file for class documentation + + HLTFatal( "no processing method implemented" ); + return -ENOSYS; +} + +/* + * ######################## CreateFXSHeader ##################### + */ + +Int_t AliHLTCalibrationProcessor::CreateFXSHeader( AliHLTFXSHeader &pHeader, const char* pDetector, const char* pFileID, const char* pDDLNumber ) { + // see header file for class documentation + + Int_t iResult = 0; + + AliHLTUInt32_t runNumber = GetRunNo(); // debug : 2176; + + HLTDebug( "RunNumber = %d", runNumber ); + + /* STILL TO BE DONE .. but interface fixed */ + + // if ( pDDLNumber != "" ) { + char ddltmp[5] = "4444"; + strncpy ( fDDLNumber, ddltmp, gkAliHLTFXSHeaderfDDLNumberSize ); + //} + //else { + //strncpy ( fDDLNumber, pDDLNumber, gkAliHLTFXSHeaderfDDLNumberSize ); + //} + + fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize] = 0; + + // -- Fill Header + + // Fill header version + pHeader.fHeaderVersion = AliHLTCalibrationProcessor::fgkFXSProtocolHeaderVersion; + + // Fill run number + pHeader.fRunNumber = runNumber; + + // Fill origin + HLTDebug( "FXS Header Detector size max %i - actual %i .",gkAliHLTFXSHeaderfOriginSize, strlen( pDetector ) ); + strncpy ( pHeader.fOrigin, pDetector, gkAliHLTFXSHeaderfOriginSize ) ; + + // To take care if fileIDs which are longer than gkAliHLTFXSHeaderfOriginSize, write one 0 is cheaper than an if. + pHeader.fOrigin[gkAliHLTFXSHeaderfOriginSize] = 0; + + // Fill file ID + HLTInfo( "FXS Header FileID size max %i - actual %i .",gkAliHLTFXSHeaderfFileIDSize, strlen( pFileID ) ); + strncpy ( pHeader.fFileID, pFileID, gkAliHLTFXSHeaderfFileIDSize ) ; + + // To take care if fileIDs which are longer than gkAliHLTFXSHeaderfFileIDSize, write one 0 is cheaper than an if. + pHeader.fFileID[gkAliHLTFXSHeaderfFileIDSize] = 0; + + // Fill DDL number + HLTInfo( "FXS Header DDLNumber size max %i - actual %i .", gkAliHLTFXSHeaderfDDLNumberSize, strlen( pDDLNumber ) ); + strncpy ( pHeader.fDDLNumber, fDDLNumber, gkAliHLTFXSHeaderfDDLNumberSize) ; + + // To take care if DDLNumber which are longer than gkAliHLTFXSHeaderfDDLNumberSize, write one 0 is cheaper than an if. + pHeader.fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize] = 0; + +} // Int_t AliHLTCalibrationProcessor::CreateFXSHeader( AliHLTXSHeader &pHeader, const char* pDetector, const char* pFileID, const char* pDDLNumber ) { + +/* + * ######################## PushToFXS ##################### + */ + +Int_t AliHLTCalibrationProcessor::PushToFXS(TObject* pObject, const char* pDetector, const char* pFileID, const char* pDDLNumber ) { + // see header file for class documentation + + Int_t iResult = 0; + + AliHLTFXSHeader pHeader; + + CreateFXSHeader( pHeader, pDetector, pFileID, pDDLNumber ); + + if ( pObject ) { + + AliHLTMemoryFile* pMemFile = CreateMemoryFile( kAliHLTDataTypeFXSCalib, kAliHLTVoidDataSpec ); + if ( pMemFile ) { + + iResult = pMemFile->WriteHeader( (const char*) &pHeader, AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize ); + + if ( iResult ) { + HLTError( "Buffer size to small - for header!" ); + } + else { + iResult = Write( pMemFile, pObject ); + if ( !iResult ) { + HLTError( "Buffer size to small - for data!" ); + } + else { + iResult = CloseMemoryFile( pMemFile ); + } + } + } + else { + iResult = -ENOMEM; + } + } + else { + iResult=-EINVAL; + } + + return iResult; + +} // Int_t AliHLTCalibrationProcessor::PushToFXS(TObject* pObject, const char* detector, const char* pFileID, const char* pDDLNumber ) { + +Int_t AliHLTCalibrationProcessor::PushToFXS( void* pBuffer, int iSize, const char* pDetector, const char* pFileID, const char* pDDLNumber ) { + + Int_t iResult = 0; + + AliHLTFXSHeader pHeader; + + CreateFXSHeader( pHeader, pDetector, pFileID, pDDLNumber ); + + iResult = PushBack( pBuffer, iSize, kAliHLTDataTypeFXSCalib, kAliHLTVoidDataSpec, (void*) (&pHeader), AliHLTCalibrationProcessor::fgkFXSProtocolHeaderSize ); + + return iResult; + +} // Int_t AliHLTCalibrationProcessor::PushToFXS(void* pBuffer, int iSize, const char* pDdetector, const char* pFileID, const char* pDDLNumber = "") { + diff --git a/HLT/BASE/AliHLTCalibrationProcessor.h b/HLT/BASE/AliHLTCalibrationProcessor.h new file mode 100644 index 00000000000..f018bd55755 --- /dev/null +++ b/HLT/BASE/AliHLTCalibrationProcessor.h @@ -0,0 +1,285 @@ +//-*- Mode: C++ -*- +#ifndef ALIHLTCALIBRATIONPROCESSOR_H +#define ALIHLTCALIBRATIONPROCESSOR_H +/* This file is property of and copyright by the ALICE HLT Project * + * ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + + +/** + * Class takes care of handling and shipping of freshly produced calibration + * data. this data will be shipped to the FXS of the HLT + * + * @file AliHLTCalibrationProcessor.h + * @author Jochen Thaeder, Sebastian Bablok + * @date + * @brief Base class of HLT calibration components. + */ + +#include "AliHLTProcessor.h" +#include "AliHLTMessage.h" +#include "AliHLTDataTypes.h" + +/** + * @class AliHLTCalibrationProcessor + * Base class of HLT calibration components. + * The class provides a common interface for the implementation of HLT + * calibration components. It takes care of handling and shipping of + * produced calibration data to the FXS of the HLT. The child class must + * implement the functions: + * - @ref InitCalibration (optional) + * - @ref ScanArgument (optional) + * - @ref DeinitCalibration (optional) + * - @ref ProcessCalibration + * - @ref ShipDataToFXS + * - @ref GetComponentID + * - @ref GetInputDataTypes + * - @ref GetOutputDataType + * - @ref GetOutputDataSize + * - @ref Spawn + + * @ingroup alihlt_component + */ +class AliHLTCalibrationProcessor : public AliHLTProcessor { + + public: + /** standard constructor */ + AliHLTCalibrationProcessor(); + + /** standard destructor */ + virtual ~AliHLTCalibrationProcessor(); + + /** Constants */ + static const AliHLTUInt32_t fgkFXSProtocolHeaderSize; + static const AliHLTUInt32_t fgkFXSProtocolHeaderVersion; + + protected: + + /* + * ######################## PushToFXS ##################### + */ + + /** + * Insert an object into the output. FXS header will be inserted before the root object. + * @param pObject pointer to root object + * @param pDetector 4 byte Detector identifier + * @param pFileID name of the file to which the data shall be stored + * @param pDDLNumber number of DDLs participating in the processing/ + * creation of this calibration data, will be filled + * automatically if not supplied by the componenet. + * @return neg. error code if failed + */ + Int_t PushToFXS(TObject* pObject, const char* pDetector, const char* pFileID, const char* pDDLNumber = ""); + + /** + * Insert an object into the output. FXS header will be inserted before the root object. + * @param pBuffer pointer to buffer + * @param iSize size of the buffer + * @param pDetector 4 byte Detector identifier + * @param pFileID name of the file to which the data shall be stored + * @param pDDLNumber number of DDLs participating in the processing/ + * creation of this calibration data, will be filled + * automatically if not supplied by the componenet. + * @return neg. error code if failed + */ + Int_t PushToFXS(void* pBuffer, int iSize, const char* pDdetector, const char* pFileID, const char* pDDLNumber = ""); + + private: + + /* + * ######################## InitCalibration ##################### + */ + + /** + * Internal initialization method, which is not available for child classes. InitCalibration is the + * corresponding function for classes derived from AliHLTCalibrationProcessor. + */ + Int_t DoInit( int argc, const char** argv ); + + /** + * Default method for the internal initialization. + * The method is called by @ref DoInit. + * This class can be overridden by the child class. + */ + virtual Int_t InitCalibration(); + + /** + * Scan one argument and adjacent parameters. + * Can be overloaded by child classes in order to add additional arguments + * beyond the standard arguments of the calibration processor. The method is called + * whenever a non-standard argument is recognized. Make sure to return + * -EPROTO if the argument is not recognized be the child. + * @param argc size of the argument array + * @param argv agument array for component initialization + * @return number of processed members of the argv
+ * -EINVAL unknown argument
+ * -EPROTO parameter for argument missing
+ */ + virtual Int_t ScanArgument(Int_t argc, const char** argv); + + + /* + * ######################## DeinitCalibration ##################### + */ + + /** + * Internal deinitialization method, which is not available for child classes. DeinitCalibration is the + * corresponding function for classes derived from AliHLTCalibrationProcessor. + */ + Int_t DoDeinit(); + + /** + * Default method for the internal clean-up. + * The method is called by @ref DoDeinit. + * This class can be overridden by the child class. + */ + virtual Int_t DeinitCalibration(); + + /* + * ######################## DoEvent ##################### + */ + + /** + * The low-level data processing method for the component. + * It decides wether to call @ref ProcessCalibration or @ref ShipDataToFXS + * according to the event type - END_OF_RUN / DATA / CALIBRATION + * If commandline paramater "-eventmodulo x"is given and x > 0, data will + * be also shipped to the FXS with this modulo. + * @param evtData event data structure + * @param blocks input data block descriptors + * @param trigData trigger data structure + * @param outputPtr pointer to target buffer + * @param size input: size of target buffer + * output:size of produced data + * @param outputBlocks list to receive output block descriptors + * @return neg. error code if failed + */ + Int_t DoEvent( const AliHLTComponentEventData& evtData, + const AliHLTComponentBlockData* blocks, + AliHLTComponentTriggerData& trigData, + AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks ); + + /* + * ######################## ProcessCalibaration ##################### + */ + + /** + * The low-level data processing method for the component, + * called for every data event. This is the custom processing + * method and can be overloaded by the component. + * @param evtData event data structure + * @param blocks input data block descriptors + * @param trigData trigger data structure + * @param outputPtr pointer to target buffer + * @param size input: size of target buffer + * output:size of produced data + * @param outputBlocks list to receive output block descriptors + * @return neg. error code if failed + */ + virtual Int_t ProcessCalibration(const AliHLTComponent_EventData& evtData, + const AliHLTComponent_BlockData* blocks, + AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks); + + /** + * The high-level data processing method for the component, + * called for every data event. This is the custom processing + * method and can be overloaded by the component. + * This is the default processing method; the method is called + * if no low level @ref ProcessCalibration method is overloaded by the component. + * @param evtData event data structure + * @param trigData trigger data structure + * @return neg. error code if failed + */ + virtual Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); + + /* + * ######################## ShipDataToFXS ##################### + */ + + /** + * The low-level data processing method for the component, + * called for the END_OF_RUN event. This is the custom processing + * method and can be overloaded by the component. + * @param evtData event data structure + * @param blocks input data block descriptors + * @param trigData trigger data structure + * @param outputPtr pointer to target buffer + * @param size input: size of target buffer + * output:size of produced data + * @param outputBlocks list to receive output block descriptors + * @return neg. error code if failed + */ + virtual Int_t ShipDataToFXS(const AliHLTComponent_EventData& evtData, + const AliHLTComponent_BlockData* blocks, + AliHLTComponent_TriggerData& trigData, AliHLTUInt8_t* outputPtr, + AliHLTUInt32_t& size, + vector& outputBlocks); + + /** + * The high-level data processing method for the component, + * called for the END_OF_RUN event. This is the custom processing + * method and can be overloaded by the component. + * This is the default processing method; the method is called + * if no low level @ref ShipDataToFXS method is overloaded by the component. + * @param evtData event data structure + * @param trigData trigger data structure + * @return neg. error code if failed + */ + virtual Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); + + /* + * ######################## CreateFXSHeader ##################### + */ + + /** + * Insert an object into the output. FXS header will be inserted before the root object. + * @param pHeader pointer to AliHLTFXSHeader + * @param pDetector 4 byte Detector identifier + * @param pFileID name of the file to which the data shall be stored + * @param pDDLNumber number of DDLs participating in the processing/ + * creation of this calibration data, will be filled + * automatically if not supplied by the componenet. + * @return neg. error code if failed + */ + Int_t CreateFXSHeader( AliHLTFXSHeader &pHeader, const char* pDetector, const char* pFileID, const char* pDDLNumber ); + + + /* + * ######################## Members ##################### + */ + + /** + * Event modulo, when Data should shipped to FXS additionally. + * Default is 0, eventmodulo is deactivated. + */ + Int_t fEventModulo; // see above + + /** + * if kTrue corrupt events will be passed through, + * if kFalse (default) they will be filtered + */ + Bool_t fUseCorruptEvents; // see above + + /** Event counter */ + Int_t fEventCounter; // see above + + /** + * Bit Array of participating DDL Numbers. + * Scheme: lower 4 Bits of each Byte convert to + * digit (0 - F) + */ + //Char_t fDDLNumber[gkAliHLTFXSHeaderfDDLNumberSize]; // see above + Char_t fDDLNumber[64]; // see above + + /** Dummy in order to cope with RC 11 */ + Int_t fDummy; // see above + + ClassDef(AliHLTCalibrationProcessor, 0) + +}; + +#endif // ALIHLTCALIBRATIONPROCESSOR_H diff --git a/HLT/BASE/AliHLTComponent.cxx b/HLT/BASE/AliHLTComponent.cxx index 60016fb0b1f..08fb995e8e0 100644 --- a/HLT/BASE/AliHLTComponent.cxx +++ b/HLT/BASE/AliHLTComponent.cxx @@ -766,20 +766,22 @@ int AliHLTComponent::PushBack(TObject* pObject, const char* dtID, const char* dt return PushBack(pObject, dt, spec, pHeader, headerSize); } -int AliHLTComponent::PushBack(void* pBuffer, int iSize, const AliHLTComponentDataType& dt, AliHLTUInt32_t spec) +int AliHLTComponent::PushBack(void* pBuffer, int iSize, const AliHLTComponentDataType& dt, AliHLTUInt32_t spec, + void* pHeader, int headerSize) { // see header file for function documentation ALIHLTCOMPONENT_BASE_STOPWATCH(); - return InsertOutputBlock(pBuffer, iSize, dt, spec); + return InsertOutputBlock(pBuffer, iSize, dt, spec, pHeader, headerSize); } -int AliHLTComponent::PushBack(void* pBuffer, int iSize, const char* dtID, const char* dtOrigin, AliHLTUInt32_t spec) +int AliHLTComponent::PushBack(void* pBuffer, int iSize, const char* dtID, const char* dtOrigin, AliHLTUInt32_t spec, + void* pHeader, int headerSize) { // see header file for function documentation ALIHLTCOMPONENT_BASE_STOPWATCH(); AliHLTComponentDataType dt; SetDataType(dt, dtID, dtOrigin); - return PushBack(pBuffer, iSize, dt, spec); + return PushBack(pBuffer, iSize, dt, spec, pHeader, headerSize); } int AliHLTComponent::InsertOutputBlock(void* pBuffer, int iBufferSize, const AliHLTComponentDataType& dt, AliHLTUInt32_t spec, diff --git a/HLT/BASE/AliHLTComponent.h b/HLT/BASE/AliHLTComponent.h index 013f341b383..478d84d861c 100644 --- a/HLT/BASE/AliHLTComponent.h +++ b/HLT/BASE/AliHLTComponent.h @@ -736,10 +736,13 @@ class AliHLTComponent : public AliHLTLogging { * @param iSize size of the buffer * @param dt data type of the object * @param spec data specification + * @param pHeader pointer to header + * @param iHeaderSize size of Header * @return neg. error code if failed */ int PushBack(void* pBuffer, int iSize, const AliHLTComponentDataType& dt, - AliHLTUInt32_t spec=kAliHLTVoidDataSpec); + AliHLTUInt32_t spec=kAliHLTVoidDataSpec, + void* pHeader=NULL, int headerSize=0); /** * Insert an object into the output. @@ -748,10 +751,13 @@ class AliHLTComponent : public AliHLTLogging { * @param dtID data type ID of the object * @param dtOrigin data type origin of the object * @param spec data specification + * @param pHeader pointer to header + * @param iHeaderSize size of Header * @return neg. error code if failed */ int PushBack(void* pBuffer, int iSize, const char* dtID, const char* dtOrigin, - AliHLTUInt32_t spec=kAliHLTVoidDataSpec); + AliHLTUInt32_t spec=kAliHLTVoidDataSpec, + void* pHeader=NULL, int headerSize=0); /** * Estimate size of a TObject diff --git a/HLT/BASE/AliHLTDataTypes.cxx b/HLT/BASE/AliHLTDataTypes.cxx index 97f27a02e03..e5678c38375 100644 --- a/HLT/BASE/AliHLTDataTypes.cxx +++ b/HLT/BASE/AliHLTDataTypes.cxx @@ -55,3 +55,10 @@ const AliHLTComponentDataType kAliHLTDataTypeEOR = { kAliHLTEORDataTypeID, kAliHLTDataOriginPrivate }; + +/** Event type specification */ +const AliHLTComponentDataType kAliHLTDataTypeEvent = { + sizeof(AliHLTComponentDataType), + kAliHLTEventDataTypeID, + kAliHLTDataOriginPrivate +}; diff --git a/HLT/BASE/AliHLTDataTypes.h b/HLT/BASE/AliHLTDataTypes.h index 5a419b8e431..5b8b00dd330 100644 --- a/HLT/BASE/AliHLTDataTypes.h +++ b/HLT/BASE/AliHLTDataTypes.h @@ -95,6 +95,11 @@ const int kAliHLTComponentDataTypefIDsize=8; */ # define kAliHLTDDLDataTypeID {'D','D','L','L','I','S','T',' '} +/** EventType event + * - empty payload, specification gives eventType + */ +# define kAliHLTEventDataTypeID {'E','V','E','N','T','T','Y','P'} + using namespace std; extern "C" { @@ -238,6 +243,31 @@ extern "C" { AliHLTUInt32_t fList[gkAliHLTDDLListSize]; }; + ////////////////////////////////////////////////////////////////////////// + // + // HLT Event Type Specification + // + ////////////////////////////////////////////////////////////////////////// + + /** Unknown eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeUnknown = ~(AliHLTUInt32_t)0; + /** SOR eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeStartOfRun=1; + /** Data eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeData=2; + /** EOR eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeEndOfRun=4; + /** Corrupt eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeCorruptID=8; + /** Calibration eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeCalibration=16; + /** DataReplay eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeDataReplay=32; + /** Tick eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeTick=64; + /** Max eventType specification */ + static const AliHLTUInt32_t gkAliEventTypeMax=64; + ////////////////////////////////////////////////////////////////////////// // // HLT defines and defaults diff --git a/HLT/ChangeLog b/HLT/ChangeLog index 013685b9711..2c44c8a5821 100644 --- a/HLT/ChangeLog +++ b/HLT/ChangeLog @@ -1,3 +1,7 @@ +2007-07-27 Calibration Processor and TPC calibration components (Jochen) + - calibration processor base class added + - TPC pulser and pedestal calibration components adapted + 2007-07-18 HLT base - analysis framework handles SOR and EOR events, GetRunNo/Type added to AliHLTComponent diff --git a/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx b/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx index f89c7c6db68..940e342653c 100755 --- a/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx @@ -1,5 +1,3 @@ - - /************************************************************************** * This file is property of and copyright by the ALICE HLT Project * * ALICE Experiment at CERN, All rights reserved. * @@ -51,8 +49,11 @@ AliHLTTPCCalibPedestalComponent::AliHLTTPCCalibPedestalComponent() fRawReader(NULL), fRawStream(NULL), fCalibPedestal(NULL), - fRCUFormat(kFALSE) -{ + fRCUFormat(kFALSE), + fMinPatch(5), + fMaxPatch(0), + fSpecification(0) , + fEnableAnalysis(kFALSE) { // see header file for class documentation // or // refer to README to build package @@ -65,97 +66,115 @@ AliHLTTPCCalibPedestalComponent::AliHLTTPCCalibPedestalComponent(const AliHLTTPC fRawReader(NULL), fRawStream(NULL), fCalibPedestal(NULL), - fRCUFormat(kFALSE) -{ + fRCUFormat(kFALSE), + fMinPatch(5), + fMaxPatch(0), + fSpecification(0), + fEnableAnalysis(kFALSE) { // see header file for class documentation + HLTFatal("copy constructor untested"); } -AliHLTTPCCalibPedestalComponent& AliHLTTPCCalibPedestalComponent::operator=(const AliHLTTPCCalibPedestalComponent&) -{ +AliHLTTPCCalibPedestalComponent& AliHLTTPCCalibPedestalComponent::operator=(const AliHLTTPCCalibPedestalComponent&) { // see header file for class documentation + HLTFatal("assignment operator untested"); return *this; } -AliHLTTPCCalibPedestalComponent::~AliHLTTPCCalibPedestalComponent() -{ +AliHLTTPCCalibPedestalComponent::~AliHLTTPCCalibPedestalComponent() { // see header file for class documentation } // Public functions to implement AliHLTComponent's interface. // These functions are required for the registration process -const char* AliHLTTPCCalibPedestalComponent::GetComponentID() -{ +const char* AliHLTTPCCalibPedestalComponent::GetComponentID() { // see header file for class documentation + return "TPCCalibPedestal"; } -void AliHLTTPCCalibPedestalComponent::GetInputDataTypes( vector& list) -{ +void AliHLTTPCCalibPedestalComponent::GetInputDataTypes( vector& list) { // see header file for class documentation + list.clear(); list.push_back( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); } -AliHLTComponentDataType AliHLTTPCCalibPedestalComponent::GetOutputDataType() -{ +AliHLTComponentDataType AliHLTTPCCalibPedestalComponent::GetOutputDataType() { // see header file for class documentation + return AliHLTTPCDefinitions::fgkCalibPedestalDataType; } -void AliHLTTPCCalibPedestalComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) -{ +void AliHLTTPCCalibPedestalComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { // see header file for class documentation + // XXX TODO: Find more realistic values. constBase = 0; inputMultiplier = (2.0); } -AliHLTComponent* AliHLTTPCCalibPedestalComponent::Spawn() -{ +AliHLTComponent* AliHLTTPCCalibPedestalComponent::Spawn() { // see header file for class documentation + return new AliHLTTPCCalibPedestalComponent(); } -Int_t AliHLTTPCCalibPedestalComponent::DoInit( int argc, const char** argv ) { + +Int_t AliHLTTPCCalibPedestalComponent::ScanArgument( Int_t argc, const char** argv ) { // see header file for class documentation + + Int_t iResult = 0; + TString argument = ""; + TString parameter = ""; + + if ( !argc ) + return -EINVAL; + + argument = argv[iResult]; - // ** Interprete commandline arguments - Int_t i = 0; - Char_t* cpErr; + if ( argument.IsNull() ) + return -EINVAL; - while ( i < argc ) { - - // -- rcu format option -- default in constructor: kFALSE => use new data format - if ( !strcmp( argv[i], "rcuformat" ) ) { - if ( argc <= i+1 ) { - HLTError( "Missing RCU format - RCU format not specified" ); - return ENOTSUP; - } - - // Decodes the rcu format -- options: "old" or "new" - if ( !strcmp( argv[i+1], "old" ) ) { + // -rcuformat + if ( argument.CompareTo("-rcuformat") == 0 ) { + + if ( ++iResult >= argc ) { + iResult = -EPROTO; + } + else { + parameter = argv[1]; + if ( parameter.CompareTo("old") == 0 ) { fRCUFormat = kTRUE; + HLTInfo( "RCU Format is set to old." ); } - else if ( !strcmp( argv[i+1], "new" ) ) { + else if ( parameter.CompareTo("new") == 0 ) { fRCUFormat = kFALSE; + HLTInfo( "RCU Format is set to new." ); } else { - HLTError( "Missing RCU format - Cannot convert rcu format specifier '%s'.", argv[i+1] ); - return EINVAL; + HLTError( "Cannot convert rcu format specifier '%s'.", argv[1] ); + iResult = -EPROTO; } + } + } + else if ( argument.CompareTo("-enableanalysis") == 0 ) { + HLTInfo( "Analysis before shipping data to FXS enabled." ); + fEnableAnalysis = kTRUE; + } + else { + iResult = -EINVAL; + } - i += 2; - continue; - } + return iResult; +} - HLTError( "Unknown Option - Unknown option '%s'", argv[i] ); - return EINVAL; +Int_t AliHLTTPCCalibPedestalComponent::InitCalibration() { + // see header file for class documentation - } - // ** Create pedestal calibration if ( fCalibPedestal ) return EINPROGRESS; @@ -176,8 +195,7 @@ Int_t AliHLTTPCCalibPedestalComponent::DoInit( int argc, const char** argv ) { return 0; } -Int_t AliHLTTPCCalibPedestalComponent::DoDeinit() -{ +Int_t AliHLTTPCCalibPedestalComponent::DeinitCalibration() { // see header file for class documentation if ( fRawReader ) @@ -192,20 +210,14 @@ Int_t AliHLTTPCCalibPedestalComponent::DoDeinit() } /* - * --- will be changing with the Calibration Processor, -> Split DoEvent into 2 functions: - * --- > Process event - * --- > Ship Data to FXS * --- setter for rcuformat need in AliTPCCalibPedestal class */ -Int_t AliHLTTPCCalibPedestalComponent::DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { +Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { // see header file for class documentation const AliHLTComponentBlockData* iter = NULL; - AliHLTUInt32_t spec = 0; - Int_t slice, patch; - Int_t minPatch = 5; - Int_t maxPatch = 0; + AliHLTUInt8_t slice, patch; Int_t DDLid = 0; // ** Loop over all input blocks and specify which data format should be read - only select Raw Data @@ -218,7 +230,8 @@ Int_t AliHLTTPCCalibPedestalComponent::DoEvent( const AliHLTComponentEventData& DataType2Text( iter->fDataType, tmp1 ); DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 ); - HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); + HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", + evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); // ** Get DDL ID in order to tell the memory reader which slice/patch to use slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter ); @@ -230,8 +243,8 @@ Int_t AliHLTTPCCalibPedestalComponent::DoEvent( const AliHLTComponentEventData& HLTDebug ( "Input Raw Data - Slice/Patch: %d/%d - EquipmentID : %d.", slice, patch, DDLid ); // ** Get min and max patch, used for output specification - if ( patch < minPatch ) minPatch = patch; - if ( patch > maxPatch ) maxPatch = patch; + if ( patch < fMinPatch ) fMinPatch = patch; + if ( patch > fMaxPatch ) fMaxPatch = patch; // ** Init TPCRawStream fRawReader->SetMemory( reinterpret_cast( iter->fPtr ), iter->fSize ); @@ -252,17 +265,27 @@ Int_t AliHLTTPCCalibPedestalComponent::DoEvent( const AliHLTComponentEventData& iter = GetNextInputBlock(); } // while ( iter != NULL ) { + + // ** Get output specification + fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, fMinPatch, fMaxPatch ); + + // ** PushBack data to shared memory ... + PushBack( (TObject*) fCalibPedestal, AliHLTTPCDefinitions::fgkCalibPedestalDataType, fSpecification); - // !!! HIGHLY DEBUG !!! - // fCalibPedestal->DumpToFile("Pedestal.root"); - // !!! HIGHLY DEBUG !!! + return 0; +} // Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { - // ** Call only at "END OF RUN" event - // fCalibPedestal->Analyse(); + +Int_t AliHLTTPCCalibPedestalComponent::ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { + // see header file for class documentation + + if ( fEnableAnalysis ) + fCalibPedestal->Analyse(); - // ** PushBack data to shared memory ... - spec = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, minPatch, maxPatch ); - PushBack( (TObject*) fCalibPedestal, AliHLTTPCDefinitions::fgkCalibPedestalDataType, spec); + // ** PushBack data to FXS ... + PushToFXS( (TObject*) fCalibPedestal, "TPC", "Pedestal" ) ; return 0; -} // Int_t AliHLTTPCCalibPedestalComponent::DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { +} // Int_t AliHLTTPCCalibPedestalComponent::ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { + + diff --git a/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.h b/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.h index c3dd068d082..cf9583a051e 100755 --- a/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.h +++ b/HLT/TPCLib/AliHLTTPCCalibPedestalComponent.h @@ -1,8 +1,9 @@ - +//-*- Mode: C++ -*- #ifndef ALIHLTTPCCALIBPEDESTALCOMPONENT_H #define ALIHLTTPCCALIBPEDESTALCOMPONENT_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * +/* This file is property of and copyright by the ALICE HLT Project * + * ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /** @file AliHLTTPCCalibPedestalComponent.h @@ -11,7 +12,7 @@ @brief A pedestal calibration component for the TPC. */ -#include "AliHLTProcessor.h" +#include "AliHLTCalibrationProcessor.h" #include "AliHLTTPCDefinitions.h" class AliTPCRawStream; @@ -21,24 +22,22 @@ class AliTPCCalibPedestal; /** * @class AliHLTTPCCalibPedestalComponent * - * This class is the component for the AliTPCCalibPedestal class used for - * pedestal calibration of the TPC. It uses the high-level interface and - * the output is the TObject of AliTPCCalibPedestal. + * This class is the calibration component for the AliTPCCalibPedestal class + * used for pedestal calibration of the TPC. + * + * It inherits from the @ref AliHLTCalibrationProcessor and uses the high-level + * interface. The output is the class @ref AliTPCCalibPedestal as a TObject. * * The component has the following component arguments: - * - The RCU format: rcuformat - * which can be either - * - old ( used in the TPC Commissioning ) - * - new + * -rcuformat : Wether to use old or new rcuformat ( default is new ) + * -enableanalysis : Wether to enable analyis before shipping data to FXS * * @ingroup alihlt_tpc */ -class AliHLTTPCCalibPedestalComponent : public AliHLTProcessor +class AliHLTTPCCalibPedestalComponent : public AliHLTCalibrationProcessor { public: - /** - * constructor - */ + /** constructor */ AliHLTTPCCalibPedestalComponent(); /** not a valid copy constructor, defined according to effective C++ style */ AliHLTTPCCalibPedestalComponent(const AliHLTTPCCalibPedestalComponent&); @@ -62,25 +61,48 @@ class AliHLTTPCCalibPedestalComponent : public AliHLTProcessor // These functions provide initialization as well as the actual processing // capabilities of the component. - Int_t DoInit( int argc, const char** argv ); - Int_t DoDeinit(); - Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); - + /** Initialize the calibration component. */ + Int_t InitCalibration(); + + /** Scan commandline arguments of the calibration component. */ + Int_t ScanArgument( Int_t argc, const char** argv ); + + /** DeInitialize the calibration component. */ + Int_t DeinitCalibration(); + + /** Process the data in the calibration component. */ + Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); + + /** Ship the data to the FXS at end of run or eventmodulo. */ + Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); + private: - /** the reader object for reading from memory */ + /** The reader object for reading from memory */ AliRawReaderMemory* fRawReader; //!transient - /** the reader object for reading TPC raw data */ + /** The reader object for reading TPC raw data */ AliTPCRawStream* fRawStream; //!transient /** Pedestal Calibration class */ AliTPCCalibPedestal * fCalibPedestal; //!transient - /** if use old RCU format */ + /** Wether to use old RCU format */ Bool_t fRCUFormat; // see above - ClassDef(AliHLTTPCCalibPedestalComponent, 0) + /** Minimum patch specifcation for this component */ + AliHLTUInt8_t fMinPatch; // see above + + /** Minimum patch specifcation for this component */ + AliHLTUInt8_t fMaxPatch; // see above + + /** The Specification for this component */ + AliHLTUInt32_t fSpecification; // see above + + /** Analysze calibration data before shipping to FXS */ + Bool_t fEnableAnalysis; // see above + + ClassDef(AliHLTTPCCalibPedestalComponent, 1) }; #endif diff --git a/HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx b/HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx new file mode 100644 index 00000000000..119308a0c6f --- /dev/null +++ b/HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx @@ -0,0 +1,307 @@ +/************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * ALICE Experiment at CERN, All rights reserved. * + * * + * Primary Authors: Jochen Thaeder * + * for The ALICE HLT Project. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/** @file AliHLTTPCCalibPulserComponent.cxx + @author Jochen Thaeder + @date + @brief A pulser calibration component for the TPC. +*/ + +#if __GNUC__>= 3 +using namespace std; +#endif + +#include "AliHLTTPCLogging.h" +#include "AliHLTTPCTransform.h" + +#include "AliHLTTPCCalibPulserComponent.h" + +#include "AliRawDataHeader.h" +#include "AliRawReaderMemory.h" +#include "AliTPCRawStream.h" + +#ifdef HAVE_ALITPCCALIBPULSER +#include "AliTPCCalibPulser.h" +#endif // HAVE_ALITPCCALIBPULSER + +#include +#include +#include "TString.h" + +// this is a global object used for automatic component registration, do not use this +AliHLTTPCCalibPulserComponent gAliHLTTPCCalibPulserComponent; + +ClassImp(AliHLTTPCCalibPulserComponent) + +AliHLTTPCCalibPulserComponent::AliHLTTPCCalibPulserComponent() + : + fRawReader(NULL), + fRawStream(NULL), + fCalibPulser(NULL), + fRCUFormat(kFALSE), + fMinPatch(5), + fMaxPatch(0), + fSpecification(0) , + fEnableAnalysis(kFALSE) { + // see header file for class documentation + // or + // refer to README to build package + // or + // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +} + +AliHLTTPCCalibPulserComponent::AliHLTTPCCalibPulserComponent(const AliHLTTPCCalibPulserComponent&) + : + fRawReader(NULL), + fRawStream(NULL), + fCalibPulser(NULL), + fRCUFormat(kFALSE), + fMinPatch(5), + fMaxPatch(0), + fSpecification(0), + fEnableAnalysis(kFALSE) { + // see header file for class documentation + + HLTFatal("copy constructor untested"); +} + +AliHLTTPCCalibPulserComponent& AliHLTTPCCalibPulserComponent::operator=(const AliHLTTPCCalibPulserComponent&) { + // see header file for class documentation + + HLTFatal("assignment operator untested"); + return *this; +} + +AliHLTTPCCalibPulserComponent::~AliHLTTPCCalibPulserComponent() { + // see header file for class documentation +} + +// Public functions to implement AliHLTComponent's interface. +// These functions are required for the registration process + +const char* AliHLTTPCCalibPulserComponent::GetComponentID() { + // see header file for class documentation + + return "TPCCalibPulser"; +} + +void AliHLTTPCCalibPulserComponent::GetInputDataTypes( vector& list) { + // see header file for class documentation + + list.clear(); + list.push_back( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); +} + +AliHLTComponentDataType AliHLTTPCCalibPulserComponent::GetOutputDataType() { + // see header file for class documentation + + return AliHLTTPCDefinitions::fgkCalibPulserDataType; +} + +void AliHLTTPCCalibPulserComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) { + // see header file for class documentation + + // XXX TODO: Find more realistic values. + constBase = 0; + inputMultiplier = (2.0); +} + +AliHLTComponent* AliHLTTPCCalibPulserComponent::Spawn() { + // see header file for class documentation + + return new AliHLTTPCCalibPulserComponent(); +} + + +Int_t AliHLTTPCCalibPulserComponent::ScanArgument( Int_t argc, const char** argv ) { + // see header file for class documentation + + Int_t iResult = 0; + TString argument = ""; + TString parameter = ""; + + if ( !argc ) + return -EINVAL; + + argument = argv[iResult]; + + if ( argument.IsNull() ) + return -EINVAL; + + // -rcuformat + if ( argument.CompareTo("-rcuformat") == 0 ) { + + if ( ++iResult >= argc ) { + iResult = -EPROTO; + } + else { + parameter = argv[1]; + if ( parameter.CompareTo("old") == 0 ) { + fRCUFormat = kTRUE; + HLTInfo( "RCU Format is set to old." ); + } + else if ( parameter.CompareTo("new") == 0 ) { + fRCUFormat = kFALSE; + HLTInfo( "RCU Format is set to new." ); + } + else { + HLTError( "Cannot convert rcu format specifier '%s'.", argv[1] ); + iResult = -EPROTO; + } + } + } + else if ( argument.CompareTo("-enableanalysis") == 0 ) { + HLTInfo( "Analysis before shipping data to FXS enabled." ); + fEnableAnalysis = kTRUE; + } + else { + iResult = -EINVAL; + } + + return iResult; +} + +Int_t AliHLTTPCCalibPulserComponent::InitCalibration() { + // see header file for class documentation + +#ifdef HAVE_ALITPCCALIBPULSER + // ** Create pulser calibration + if ( fCalibPulser ) + return EINPROGRESS; + + fCalibPulser = new AliTPCCalibPulser(); + + // ** Create AliRoot Memory Reader + if (fRawReader) + return EINPROGRESS; + +#if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H) + fRawReader = new AliRawReaderMemory(); +#else + HLTFatal("AliRawReader not available - check your build"); + return -ENODEV; +#endif + + return 0; +#else //!HAVE_ALITPCCALIBPULSER +#warning AliTPCCalibPulser not available in this AliRoot version - AliHLTTPCCalibPulserComponent not functional + HLTFatal("AliTPCCalibPulser not available - check your build"); + return -ENODEV; +#endif //HAVE_ALITPCCALIBPULSER +} + +Int_t AliHLTTPCCalibPulserComponent::DeinitCalibration() { + // see header file for class documentation + + if ( fRawReader ) + delete fRawReader; + fRawReader = NULL; + + if ( fCalibPulser ) + delete fCalibPulser; + fCalibPulser = NULL; + + return 0; +} + +/* + * --- setter for rcuformat need in AliTPCCalibPulser class + */ +Int_t AliHLTTPCCalibPulserComponent::ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { + // see header file for class documentation + + const AliHLTComponentBlockData* iter = NULL; + + AliHLTUInt8_t slice, patch; + Int_t DDLid = 0; + + // ** Loop over all input blocks and specify which data format should be read - only select Raw Data + iter = GetFirstInputBlock( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); + + while ( iter != NULL ) { + + // ** Print Debug output which data format was received + char tmp1[14], tmp2[14]; + DataType2Text( iter->fDataType, tmp1 ); + DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 ); + + HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", + evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); + + // ** Get DDL ID in order to tell the memory reader which slice/patch to use + slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter ); + patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); + + if (patch < 2) DDLid = 768 + (2 * slice) + patch; + else DDLid = 838 + (4*slice) + patch; + + HLTDebug ( "Input Raw Data - Slice/Patch: %d/%d - EquipmentID : %d.", slice, patch, DDLid ); + + // ** Get min and max patch, used for output specification + if ( patch < fMinPatch ) fMinPatch = patch; + if ( patch > fMaxPatch ) fMaxPatch = patch; + + // ** Init TPCRawStream + fRawReader->SetMemory( reinterpret_cast( iter->fPtr ), iter->fSize ); + fRawReader->SetEquipmentID(DDLid); + + fRawStream = new AliTPCRawStream( fRawReader ); + fRawStream->SetOldRCUFormat( fRCUFormat ); + +#ifdef HAVE_ALITPCCALIBPULSER + // ** Process actual Pulser Calibration - Fill histograms + fCalibPulser->ProcessEvent( fRawStream ); +#else //!HAVE_ALITPCCALIBPULSER + HLTFatal("AliTPCCalibPulser not available - check your build"); + return -ENODEV; +#endif //HAVE_ALITPCCALIBPULSER + + // ** Delete TPCRawStream + if ( fRawStream ) + delete fRawStream; + fRawStream = NULL; + + // ** Get next input block, with the same specification as defined in GetFirstInputBlock() + iter = GetNextInputBlock(); + + } // while ( iter != NULL ) { + + // ** Get output specification + fSpecification = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, fMinPatch, fMaxPatch ); + + // ** PushBack data to shared memory ... + PushBack( (TObject*) fCalibPulser, AliHLTTPCDefinitions::fgkCalibPulserDataType, fSpecification); + + return 0; +} // Int_t AliHLTTPCCalibPulserComponent::ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { + + +Int_t AliHLTTPCCalibPulserComponent::ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { + // see header file for class documentation + +#ifdef HAVE_ALITPCCALIBPULSER + if ( fEnableAnalysis ) + fCalibPulser->Analyse(); +#else //!HAVE_ALITPCCALIBPULSER + HLTFatal("AliTPCCalibPulser not available - check your build"); + return -ENODEV; +#endif //HAVE_ALITPCCALIBPULSER + + // ** PushBack data to FXS ... + PushToFXS( (TObject*) fCalibPulser, "TPC", "Pulser" ) ; + + return 0; +} // Int_t AliHLTTPCCalibPulserComponent::ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { diff --git a/HLT/TPCLib/AliHLTTPCCalibPulserComponent.h b/HLT/TPCLib/AliHLTTPCCalibPulserComponent.h new file mode 100644 index 00000000000..d3955bb5d23 --- /dev/null +++ b/HLT/TPCLib/AliHLTTPCCalibPulserComponent.h @@ -0,0 +1,109 @@ +//-*- Mode: C++ -*- +#ifndef ALIHLTTPCCALIBPULSERCOMPONENT_H +#define ALIHLTTPCCALIBPULSERCOMPONENT_H + +/* This file is property of and copyright by the ALICE HLT Project * + * ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/** @file AliHLTTPCCalibPulserComponent.h + @author Jochen Thaeder + @date + @brief A pulser calibration component for the TPC. +*/ + +#include "AliHLTCalibrationProcessor.h" +#include "AliHLTTPCDefinitions.h" + +class AliTPCRawStream; +class AliRawReaderMemory; +class AliTPCCalibPulser; + +/** + * @class AliHLTTPCCalibPulserComponent + * + * This class is the calibration component for the AliTPCCalibPulser class + * used for pulser calibration of the TPC. + * + * It inherits from the @ref AliHLTCalibrationProcessor and uses the high-level + * interface. The output is the class @ref AliTPCCalibPulser as a TObject. + * + * The component has the following component arguments: + * -rcuformat : Wether to use old or new rcuformat ( default is new ) + * -enableanalysis : Wether to enable analyis before shipping data to FXS + * + * @ingroup alihlt_tpc + */ +class AliHLTTPCCalibPulserComponent : public AliHLTCalibrationProcessor + { + public: + /** constructor */ + AliHLTTPCCalibPulserComponent(); + /** not a valid copy constructor, defined according to effective C++ style */ + AliHLTTPCCalibPulserComponent(const AliHLTTPCCalibPulserComponent&); + /** not a valid assignment op, but defined according to effective C++ style */ + AliHLTTPCCalibPulserComponent& operator=(const AliHLTTPCCalibPulserComponent&); + /** destructor */ + virtual ~AliHLTTPCCalibPulserComponent(); + + // Public functions to implement AliHLTComponent's interface. + // These functions are required for the registration process + + const char* GetComponentID(); + void GetInputDataTypes( vector& list); + AliHLTComponentDataType GetOutputDataType(); + virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); + AliHLTComponent* Spawn(); + + protected: + + // Protected functions to implement AliHLTComponent's interface. + // These functions provide initialization as well as the actual processing + // capabilities of the component. + + /** Initialize the calibration component. */ + Int_t InitCalibration(); + + /** Scan commandline arguments of the calibration component. */ + Int_t ScanArgument( Int_t argc, const char** argv ); + + /** DeInitialize the calibration component. */ + Int_t DeinitCalibration(); + + /** Process the data in the calibration component. */ + Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); + + /** Ship the data to the FXS at end of run or eventmodulo. */ + Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); + + private: + + /** The reader object for reading from memory */ + AliRawReaderMemory* fRawReader; //!transient + + /** The reader object for reading TPC raw data */ + AliTPCRawStream* fRawStream; //!transient + + /** Pulser Calibration class */ + AliTPCCalibPulser * fCalibPulser; //!transient + + /** Wether to use old RCU format */ + Bool_t fRCUFormat; // see above + + /** Minimum patch specifcation for this component */ + AliHLTUInt8_t fMinPatch; // see above + + /** Minimum patch specifcation for this component */ + AliHLTUInt8_t fMaxPatch; // see above + + /** The Specification for this component */ + AliHLTUInt32_t fSpecification; // see above + + /** Analysze calibration data before shipping to FXS */ + Bool_t fEnableAnalysis; // see above + + ClassDef(AliHLTTPCCalibPulserComponent, 0) + + }; + +#endif diff --git a/HLT/TPCLib/AliHLTTPCCalibSignalComponent.cxx b/HLT/TPCLib/AliHLTTPCCalibSignalComponent.cxx deleted file mode 100644 index 4520f990bd6..00000000000 --- a/HLT/TPCLib/AliHLTTPCCalibSignalComponent.cxx +++ /dev/null @@ -1,275 +0,0 @@ - - -/************************************************************************** - * This file is property of and copyright by the ALICE HLT Project * - * ALICE Experiment at CERN, All rights reserved. * - * * - * Primary Authors: Jochen Thaeder * - * Sorina Popescu = 3 -using namespace std; -#endif - -#include "AliHLTTPCLogging.h" -#include "AliHLTTPCTransform.h" - -#include "AliHLTTPCCalibSignalComponent.h" - -#include "AliRawDataHeader.h" -#include "AliRawReaderMemory.h" -#include "AliTPCRawStream.h" - -#include "AliTPCCalibSignal.h" - -#include -#include -#include "TString.h" - -// this is a global object used for automatic component registration, do not use this -AliHLTTPCCalibSignalComponent gAliHLTTPCCalibSignalComponent; - -ClassImp(AliHLTTPCCalibSignalComponent) - -AliHLTTPCCalibSignalComponent::AliHLTTPCCalibSignalComponent() - : - fRawReader(NULL), - fRawStream(NULL), - fCalibSignal(NULL), - fRCUFormat(kFALSE) -{ - // see header file for class documentation - // or - // refer to README to build package - // or - // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt -} - -AliHLTTPCCalibSignalComponent::AliHLTTPCCalibSignalComponent(const AliHLTTPCCalibSignalComponent&) - : - fRawReader(NULL), - fRawStream(NULL), - fCalibSignal(NULL), - fRCUFormat(kFALSE) -{ - // see header file for class documentation - HLTFatal("copy constructor to be tested"); -} - -AliHLTTPCCalibSignalComponent& AliHLTTPCCalibSignalComponent::operator=(const AliHLTTPCCalibSignalComponent&) -{ - // see header file for class documentation - HLTFatal("assignment operator to be tested"); - return *this; -} - -AliHLTTPCCalibSignalComponent::~AliHLTTPCCalibSignalComponent() -{ - // see header file for class documentation -} - -// Public functions to implement AliHLTComponent's interface. -// These functions are required for the registration process - -const char* AliHLTTPCCalibSignalComponent::GetComponentID() -{ - // see header file for class documentation - return "TPCCalibSignal"; -} - -void AliHLTTPCCalibSignalComponent::GetInputDataTypes( vector& list) -{ - // see header file for class documentation - list.clear(); - list.push_back( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); -} - -AliHLTComponentDataType AliHLTTPCCalibSignalComponent::GetOutputDataType() -{ - // see header file for class documentation - return AliHLTTPCDefinitions::fgkCalibSignalDataType; -} - -void AliHLTTPCCalibSignalComponent::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) -{ - // see header file for class documentation - // XXX TODO: Find more realistic values. - constBase = 0; - inputMultiplier = (2.0); -} - -AliHLTComponent* AliHLTTPCCalibSignalComponent::Spawn() -{ - // see header file for class documentation - return new AliHLTTPCCalibSignalComponent(); -} - -Int_t AliHLTTPCCalibSignalComponent::DoInit( int argc, const char** argv ) -{ - // see header file for class documentation - - // ** Interprete commandline arguments - Int_t i = 0; - Char_t* cpErr; - - while ( i < argc ) { - - // -- rcu format option-- default in constructor: kFALSE => use new data format - if ( !strcmp( argv[i], "rcuformat" ) ) { - if ( argc <= i+1 ) { - HLTError( "Missing RCU format - RCU format not specified" ); - return ENOTSUP; - } - - // Decodes the rcu format -- options: "old" or "new" - if ( !strcmp( argv[i+1], "old" ) ) { - fRCUFormat = kTRUE; - } - else if ( !strcmp( argv[i+1], "new" ) ) { - fRCUFormat = kFALSE; - } - else { - HLTError( "Missing RCU format - Cannot convert rcu format specifier '%s'.", argv[i+1] ); - return EINVAL; - } - - i += 2; - continue; - } - - HLTError( "Unknown Option - Unknown option '%s'", argv[i] ); - return EINVAL; - - } - - // ** Create Signal calibration - if ( fCalibSignal ) - return EINPROGRESS; - - fCalibSignal = new AliTPCCalibSignal(); - - // ** Create AliRoot Memory Reader - if (fRawReader) - return EINPROGRESS; - -#if defined(HAVE_ALIRAWDATA) && defined(HAVE_ALITPCRAWSTREAM_H) - fRawReader = new AliRawReaderMemory(); -#else - HLTFatal("AliRawReader not available - check your build"); - return -ENODEV; -#endif - - return 0; -} - -Int_t AliHLTTPCCalibSignalComponent::DoDeinit() -{ - // see header file for class documentation - - if ( fRawReader ) - delete fRawReader; - fRawReader = NULL; - - if ( fCalibSignal ) - delete fCalibSignal; - fCalibSignal = NULL; - - return 0; -} - -/* - * --- will be changing with the Calibration Processor, -> Split DoEvent into 2 functions: - * --- > Process event - * --- > Ship Data to FXS - * --- setter for rcuformat need in AliTPCCalibSignal class - */ -Int_t AliHLTTPCCalibSignalComponent::DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { - // see header file for class documentation - - const AliHLTComponentBlockData* iter = NULL; - AliHLTUInt32_t spec = 0; - - Int_t slice, patch; - Int_t minPatch = 5; - Int_t maxPatch = 0; - Int_t DDLid = 0; - - //--------same as for pedestal - - // ** Loop over all input blocks and specify which data format should be read - iter = GetFirstInputBlock( AliHLTTPCDefinitions::fgkDDLPackedRawDataType ); - - while ( iter != NULL ) { - - // ** Print Debug output which data format was received - char tmp1[14], tmp2[14]; - DataType2Text( iter->fDataType, tmp1 ); - DataType2Text( AliHLTTPCDefinitions::fgkDDLPackedRawDataType, tmp2 ); - - HLTDebug ( "Event received - Event 0x%08LX (%Lu) received datatype: %s - required datatype: %s", evtData.fEventID, evtData.fEventID, tmp1, tmp2 ); - - // ** Get DDL ID in order to tell the memory reader which slice/patch to use - slice = AliHLTTPCDefinitions::GetMinSliceNr( *iter ); - patch = AliHLTTPCDefinitions::GetMinPatchNr( *iter ); - - if (patch < 2) DDLid = 768 + (2 * slice) + patch; - else DDLid = 838 + (4*slice) + patch; - - // --------- - - HLTDebug ( "Input Raw Data - Slice/Patch: %d/%d - EquipmentID : %d.", slice, patch, DDLid ); - - // ** Get the min and max patch, used in the output specfication - if ( patch < minPatch ) minPatch = patch; - if ( patch > maxPatch ) maxPatch = patch; - - // ** Init TPCRawStream - fRawReader->SetMemory( reinterpret_cast( iter->fPtr ), iter->fSize ); - fRawReader->SetEquipmentID(DDLid); - - fRawStream = new AliTPCRawStream( fRawReader ); - fRawStream->SetOldRCUFormat( fRCUFormat ); - - fCalibSignal->ProcessEvent( fRawStream ); - - if ( fRawStream ) - delete fRawStream; - fRawStream = NULL; - - //----------- - // ** Get next input block, with the same specification as defined in GetFirstInputBlock() - iter = GetNextInputBlock(); - - } // while ( iter != NULL ) { - - // !!! HIGHLY DEBUG !!! - // fCalibSignal->DumpToFile("Signal.root"); - // !!! HIGHLY DEBUG !!! - - // ** Call only at END of RUN event - // fCalibSignal->Analyse(); - - // ** PushBack data to shared memory ... - - spec = AliHLTTPCDefinitions::EncodeDataSpecification( slice, slice, minPatch, maxPatch ); - PushBack( (TObject*) fCalibSignal, AliHLTTPCDefinitions::fgkCalibSignalDataType, spec); - - return 0; -} // Int_t AliHLTTPCCalibSignalComponent::DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ) { -//------------- diff --git a/HLT/TPCLib/AliHLTTPCCalibSignalComponent.h b/HLT/TPCLib/AliHLTTPCCalibSignalComponent.h deleted file mode 100644 index efa6e2bb90c..00000000000 --- a/HLT/TPCLib/AliHLTTPCCalibSignalComponent.h +++ /dev/null @@ -1,87 +0,0 @@ - - -#ifndef ALIHLTTPCCALIBSIGNAlCOMPONENT_H -#define ALIHLTTPCCALIBSIGNALCOMPONENT_H - -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/** @file AliHLTTPCCalibSignalComponent.h - @author Jochen Thaeder, Sorina Popescu - @date - @brief HLT Pulser calibration component for the TPC. -*/ - -#include "AliHLTProcessor.h" -#include "AliHLTTPCDefinitions.h" - -class AliTPCRawStream; -class AliRawReaderMemory; -class AliTPCCalibSignal; - -/** - * @class AliHLTTPCCalibSignalComponent - * - * This class is the component for the AliTPCCalibSignal class used for - * pedestal calibration of the TPC. It uses the high-level interface and - * the output is the TObject of AliTPCCalibSignal. - * - * The component has the following component arguments: - * - The RCU format: rcuformat - * which can be either - * - old ( used in the TPC Commissioning ) - * - new - * - * @ingroup alihlt_tpc - */ -class AliHLTTPCCalibSignalComponent : public AliHLTProcessor - { - public: - /** - * constructor - */ - AliHLTTPCCalibSignalComponent(); - /** not a valid copy constructor, defined according to effective C++ style */ - AliHLTTPCCalibSignalComponent(const AliHLTTPCCalibSignalComponent&); - /** not a valid assignment op, but defined according to effective C++ style */ - AliHLTTPCCalibSignalComponent& operator=(const AliHLTTPCCalibSignalComponent&); - /** destructor */ - virtual ~AliHLTTPCCalibSignalComponent(); - - // Public functions to implement AliHLTComponent's interface. - // These functions are required for the registration process - - const char* GetComponentID(); - void GetInputDataTypes( vector& list); - AliHLTComponentDataType GetOutputDataType(); - virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); - AliHLTComponent* Spawn(); - - protected: - - // Protected functions to implement AliHLTComponent's interface. - // These functions provide initialization as well as the actual processing - // capabilities of the component. - - Int_t DoInit( int argc, const char** argv ); - Int_t DoDeinit(); - Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); - - private: - - /** the reader object for reading from memory */ - AliRawReaderMemory* fRawReader; //!transient - - /** the reader object for reading TPC raw data */ - AliTPCRawStream* fRawStream; //!transient - - /** Signal Calibration class */ - AliTPCCalibSignal * fCalibSignal; //!transient - - /** if use old RCU format */ - Bool_t fRCUFormat; // see description - - ClassDef(AliHLTTPCCalibSignalComponent, 0) - - }; -#endif diff --git a/HLT/TPCLib/AliHLTTPCDefinitions.cxx b/HLT/TPCLib/AliHLTTPCDefinitions.cxx index 3d3effa5878..74367286703 100644 --- a/HLT/TPCLib/AliHLTTPCDefinitions.cxx +++ b/HLT/TPCLib/AliHLTTPCDefinitions.cxx @@ -40,7 +40,7 @@ const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTrackSegmentsDataType = { const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTracksDataType = { sizeof(AliHLTComponentDataType), {'T','R','A','C','K','S',' ',' '},kAliHLTDataOriginTPC};; const AliHLTComponentDataType AliHLTTPCDefinitions::fgkCalibPedestalDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','_','P','E','D',' '},kAliHLTDataOriginTPC};; -const AliHLTComponentDataType AliHLTTPCDefinitions::fgkCalibSignalDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','_','S','I','G',' '},kAliHLTDataOriginTPC};; +const AliHLTComponentDataType AliHLTTPCDefinitions::fgkCalibPulserDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','_','P','U','L','S'},kAliHLTDataOriginTPC};; AliHLTTPCDefinitions::AliHLTTPCDefinitions() diff --git a/HLT/TPCLib/AliHLTTPCDefinitions.h b/HLT/TPCLib/AliHLTTPCDefinitions.h index d10e1e5381e..02c2110ae02 100644 --- a/HLT/TPCLib/AliHLTTPCDefinitions.h +++ b/HLT/TPCLib/AliHLTTPCDefinitions.h @@ -79,7 +79,7 @@ public: /** pedestal calibration data */ static const AliHLTComponentDataType fgkCalibPedestalDataType; // see above /** signal calibration data */ - static const AliHLTComponentDataType fgkCalibSignalDataType; // see above + static const AliHLTComponentDataType fgkCalibPulserDataType; // see above ClassDef(AliHLTTPCDefinitions, 0); diff --git a/HLT/configure.ac b/HLT/configure.ac index 982b9e27e32..6363554c751 100644 --- a/HLT/configure.ac +++ b/HLT/configure.ac @@ -238,6 +238,7 @@ if test ! "x$have_aliroot" = "xno" ; then fi AC_MSG_RESULT($have_alitpc) fi + AC_CHECK_HEADERS([AliTPCCalibPulser.h AliTPCCalibPedestal.h]) LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS" CHECKLIB=STEER diff --git a/HLT/libAliHLTTPC.pkg b/HLT/libAliHLTTPC.pkg index 80e799f5b64..c86a6e77554 100644 --- a/HLT/libAliHLTTPC.pkg +++ b/HLT/libAliHLTTPC.pkg @@ -51,11 +51,11 @@ MODULE_SRCS= AliHLTTPCLog.cxx \ AliHLTTPCSliceTrackerComponent.cxx \ AliHLTTPCGlobalMergerComponent.cxx \ AliHLTTPCCATrackerComponent.cxx \ - AliHLTTPCEsdWriterComponent.cxx + AliHLTTPCEsdWriterComponent.cxx \ + AliHLTTPCCalibPedestalComponent.cxx \ + AliHLTTPCCalibPulserComponent.cxx -# AliHLTTPCDDLDataFileHandler.cxx \ -# AliHLTTPCCalibPedestalComponent.cxx \ -# AliHLTTPCCalibSignalComponent.cxx +# AliHLTTPCDDLDataFileHandler.cxx CLASS_HDRS:= AliHLTTPCTransform.h \ AliHLTTPCMemHandler.h \ @@ -105,11 +105,13 @@ CLASS_HDRS:= AliHLTTPCTransform.h \ AliHLTTPCSliceTrackerComponent.h \ AliHLTTPCGlobalMergerComponent.h \ AliHLTTPCCATrackerComponent.h \ - AliHLTTPCEsdWriterComponent.h + AliHLTTPCEsdWriterComponent.h \ + AliHLTTPCCalibPedestalComponent.h \ + AliHLTTPCCalibPulserComponent.h -# AliHLTTPCDDLDataFileHandler.h \ -# AliHLTTPCCalibPedestalComponent.h \ -# AliHLTTPCCalibSignalComponent.h + + +# AliHLTTPCDDLDataFileHandler.h MODULE_HDRS:= $(CLASS_HDRS) \ AliHLTTPCLog.h \ diff --git a/HLT/libHLTbase.pkg b/HLT/libHLTbase.pkg index ac4c634d72c..47f60283efb 100644 --- a/HLT/libHLTbase.pkg +++ b/HLT/libHLTbase.pkg @@ -8,6 +8,7 @@ MODULE_SRCS= AliHLTComponent.cxx \ AliHLTSystem.cxx \ AliHLT_C_Component_WrapperInterface.cxx \ AliHLTProcessor.cxx \ + AliHLTCalibrationProcessor.cxx \ AliHLTConfiguration.cxx \ AliHLTLogging.cxx \ AliHLTDataBuffer.cxx \ @@ -26,6 +27,7 @@ CLASS_HDRS:= AliHLTComponent.h \ AliHLTComponentHandler.h \ AliHLTSystem.h \ AliHLTProcessor.h \ + AliHLTCalibrationProcessor.h \ AliHLTConfiguration.h \ AliHLTConfigurationHandler.h \ AliHLTTask.h \ -- 2.43.0