From b6f9f0f8a58af5f721f8fd91fe9b2dd75ef73c51 Mon Sep 17 00:00:00 2001 From: phille Date: Wed, 30 Sep 2009 00:09:13 +0000 Subject: [PATCH] Removing obsolete code + refactoring --- HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h | 230 --------------- HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx | 4 +- ...HOSModuleCalibrationProcessorComponent.cxx | 276 ------------------ ...TPHOSModuleCalibrationProcessorComponent.h | 103 ------- .../AliHLTPHOSModuleCellEnergyDataStruct.h | 34 --- HLT/PHOS/AliHLTPHOSProcessor.cxx | 2 +- HLT/PHOS/AliHLTPHOSProcessor.h | 3 +- HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx | 47 ++- HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx | 6 +- .../AliHLTPHOSRcuCalibrationProcessor.cxx | 19 +- HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.h | 3 +- .../AliHLTPHOSOnlineDisplayEventTab.cxx | 2 +- HLT/libAliHLTPHOS.pkg | 2 - 13 files changed, 33 insertions(+), 698 deletions(-) delete mode 100644 HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h delete mode 100644 HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.cxx delete mode 100644 HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.h delete mode 100644 HLT/PHOS/AliHLTPHOSModuleCellEnergyDataStruct.h diff --git a/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h b/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h deleted file mode 100644 index c68db740867..00000000000 --- a/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.h +++ /dev/null @@ -1,230 +0,0 @@ -//-*- Mode: C++ -*- -// $Id$ - -/************************************************************************** - * This file is property of and copyright by the ALICE HLT Project * - * All rights reserved. * - * * - * Primary Authors: Oystein Djuvsland * - * * - * 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. * - **************************************************************************/ - -#ifndef ALIHLTPHOSBASELINEANALYZER_H -#define ALIHLTPHOSBASELINEANALYZER_H - -/** - * Measures the baselines and calculates relevant values - * - * @file AliHLTPHOSBaselineAnalyzer.h - * @author Oystein Djuvsland - * @date - * @brief Baseline analyzer for PHOS HLT - */ - -// see below for class documentation -// or -// refer to README to build package -// or -// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt - -#include "AliHLTPHOSConstants.h" -#include "AliHLTPHOSBase.h" - -class AliHLTPHOSRcuCellEnergyDataStruct; -class AliHLTPHOSValidCellDataStruct; -class AliHLTPHOSSanityInspector; -class TTree; -class TClonesArray; -class TH1F; -class TH2F; - -using namespace PhosHLTConst; - - -/** - * @class AliHLTPHOSBaselineAnalyzer - * Measures the baseline in a baseline run. It also calculates - * RMS of the signal noise in each channel. It takes as input raw signals, - * and outputs an object of AliHLTPHOSBaseline class for each channel. - * It also creates several histograms for each channel. - * - * @ingroup alihlt_phos - */ - -class AliHLTPHOSBaselineAnalyzer : public AliHLTPHOSBase -{ - -public: - - /** Constructor */ - AliHLTPHOSBaselineAnalyzer(); - - /** Destructor */ - virtual ~AliHLTPHOSBaselineAnalyzer(); - - /** Copy constructor */ - AliHLTPHOSBaselineAnalyzer(const AliHLTPHOSBaselineAnalyzer &) : - AliHLTPHOSBase(), - fSampleStart(5), - fMaxCrazyDifference(0), - fMaxSignal(0), - fChannelCount(0), - fTreePtr(0), - fBaselineArrayPtr(0), - fRMSHistogramPtr(0), - fRMSMapHighGainHistogramPtr(0), - fRMSMapLowGainHistogramPtr(0), - fFixedRMSHistogramPtr(0), - fFixedRMSMapHighGainHistogramPtr(0), - fFixedRMSMapLowGainHistogramPtr(0), - fSanityInspector(0) - { - //Copy constructor not implemented - } - - /** Assignment */ - AliHLTPHOSBaselineAnalyzer & operator = (const AliHLTPHOSBaselineAnalyzer) - { - //Assignment - return *this; - } - - /** - * Calculate baselines for an RCU - * @param rcuData is a pointer to energy and timing data from an RCU - */ - void CalculateRcuBaselines(AliHLTPHOSRcuCellEnergyDataStruct* rcuData); - - /** - * Calculate the baseline of channels - * @param cellData is a pointer to a valid channel - * @param rawDataPtr is a pointer to the raw data - * @param xOff is the offset in the x position given by the RCU number - * @param zOff is the offset in the z position given by the RCU number - * @return the baseline - */ - Float_t CalculateChannelBaseline(AliHLTPHOSValidCellDataStruct *cellData, Int_t* rawDataPtr, Int_t xOff, Int_t zOff); - - /** - * Calculate the accumulated baseline of a channel - * @param x is the x coord of the channel - * @param z is the z coord of the channel - * @param gain is the gain of the channel - * @param baseline is the most recent measured baseline - */ - void CalculateAccumulatedChannelBaseline(Int_t x, Int_t z, Int_t gain, Float_t baseline); - - /** - * Calculate the channels baseline RMS - */ - void CalculateChannelsBaselineRMS(); - - - // void CalculateAccumulatedBaselines(); - - /** Set the ROOT objects to be filled */ - void SetRootObjects(TTree *tree, TClonesArray *array); - - /** Fill the tree */ - void FillTree(); - - /** Write the accumulated baselines */ - void WriteAccumulatedBaselines(const Char_t* filename); - - /** Write the channel histograms */ - void WriteChannelHistograms(const Char_t* filename); - - /** Write the RMS histograms */ - void WriteRMSHistogram(const Char_t* filename); - - /** Reset the baseline array */ - void ResetBaselines(); - - /** Reset the channel count */ - void ResetChannelCount(); - - /** Reset the accumulated baseline array */ - void ResetAccumulatedBaselines(); - - /** Set the number of samples to be used for the baseline calculation */ - void SetNumberOfSamples(Int_t nSamples) { fNSamples = nSamples; } - - /** Set the max difference between 2 samples before flagging crazy */ - void SetMaxCrazyDifference(Int_t diff); - - /** Set the maximum signal before flagging that a real signal is in the samples */ - void SetMaxSignal(Int_t max) { fMaxSignal = max; } - - // void SetChannelsHistograms(TH1F *channelLowGainHistArray[N_XCOLUMNS_MOD][N_ZROWS_MOD], TH1F *channelLowGainHistArray[N_XCOLUMNS_MOD][N_ZROWS_MOD]); - - -private: - - /** At which time index to start the measuring of the baseline */ - Int_t fSampleStart; // Shutting up rule checker - - /** Not used anymore */ - Int_t fMaxCrazyDifference; // Shutting up rule checker - - /** Maximum signal level, used to not count channels with signals for baseline measurement */ - Int_t fMaxSignal; // Shutting up rule checker - - /** Count of channels, not used anymore */ - Int_t fChannelCount; // Shutting up rule checker - - /** Array containing the baselines of all channels */ - Float_t fBaselines[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; // Shutting up rule checker - - /** Array containing the accumulated baselines for all channels */ - Float_t fAccumulatedBaselines[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS][2]; // Shutting up rule checker - - /** Pointer to a tree containing TClonesArray of AliHLTPHOSBaseline objects */ - TTree *fTreePtr; //! transient - - /** Pointer to an array of AliHLTPHOSBaseline objects */ - TClonesArray *fBaselineArrayPtr; //! transient - - - // TH1F *fChannelLowGainHistogramsPtr[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //comment - // TH1F *fChannelHighGainHistogramsPtr[N_XCOLUMNS_MOD][N_ZROWS_MOD]; //comment - - - /** Pointer to an array of histograms containg the baselines */ - TH1F *fChannelHistogramsPtr[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //! transient - - /** Pointer to an array of histograms containg the "fixed" baselines */ - TH1F *fFixedChannelHistogramsPtr[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //! transient - - /** Pointer to a histograms containing the RMS values for all channels */ - TH1F *fRMSHistogramPtr; //! transient - - /** Pointer to a 2D histogram of the high gain RMS */ - TH2F *fRMSMapHighGainHistogramPtr; //! transient - - /** Pointer to a 2D histogram of the low gain RMS */ - TH2F *fRMSMapLowGainHistogramPtr; //! transient - - /** Pointer to a histogram containing the "fixed" RMS values for all channels */ - TH1F *fFixedRMSHistogramPtr; //! transient - - /** Pointer to a 2D histogram of the "fixed" high gain channels */ - TH2F *fFixedRMSMapHighGainHistogramPtr; //! transient - - /** Pointer to a 2D histogram of the "fixed" low gain channels */ - TH2F *fFixedRMSMapLowGainHistogramPtr; //! transient - - /** Pointer to a sanity inspector */ - AliHLTPHOSSanityInspector *fSanityInspector; //! transient - - ClassDef(AliHLTPHOSBaselineAnalyzer, 1); -}; - -#endif - diff --git a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx index 67315c35c36..a98c2d765a0 100644 --- a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx @@ -18,8 +18,8 @@ #include "AliHLTPHOSDigitMakerComponent.h" #include "AliHLTPHOSDigitMaker.h" #include "TTree.h" -#include "AliHLTPHOSProcessor.h" -#include "AliHLTPHOSRcuCellEnergyDataStruct.h" +// #include "AliHLTPHOSProcessor.h" +// #include "AliHLTPHOSRcuCellEnergyDataStruct.h" #include "AliHLTPHOSDigitDataStruct.h" #include "AliHLTPHOSChannelDataHeaderStruct.h" #include "AliHLTPHOSChannelDataStruct.h" diff --git a/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.cxx b/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.cxx deleted file mode 100644 index 3cd00c73497..00000000000 --- a/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.cxx +++ /dev/null @@ -1,276 +0,0 @@ -// $Id$ - -/************************************************************************** - * This file is property of and copyright by the ALICE HLT Project * - * All rights reserved. * - * * - * Primary Authors: Oystein Djuvsland * - * * - * 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. * - **************************************************************************/ - - -#include "AliPHOSRcuDA1.h" -#include "AliHLTPHOSSharedMemoryInterface.h" -#include "AliHLTPHOSModuleCalibrationProcessorComponent.h" -#include "AliHLTPHOSDefinitions.h" -#include "AliHLTPHOSConstants.h" -#include "AliHLTPHOSRcuCellEnergyDataStruct.h" - -//#include - -/** @file AliHLTPHOSModuleCalibrationProcessorComponent.cxx - @author Oystein Djuvsland - @date - @brief A module calibration component for PHOS HLT, using the PHOS DA's -*/ - -// see header file for class documentation -// or -// refer to README to build package -// or -// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt - -using namespace PhosHLTConst; - -AliHLTPHOSModuleCalibrationProcessorComponent gAliHLTPHOSModuleCalibrationProcessorComponent; - -AliHLTPHOSModuleCalibrationProcessorComponent::AliHLTPHOSModuleCalibrationProcessorComponent() : - AliHLTCalibrationProcessor(), - fCnt(0), - fPHOSDAPtr(0), - fShmPtr(0) -{ - //See header file for documentation -} - - -AliHLTPHOSModuleCalibrationProcessorComponent::~AliHLTPHOSModuleCalibrationProcessorComponent() -{ - //See header file for documentation - if(fShmPtr) - { - delete fShmPtr; - fShmPtr = 0; - } - if(fPHOSDAPtr) - { - delete fPHOSDAPtr; - fPHOSDAPtr = 0; - } -} - -void AliHLTPHOSModuleCalibrationProcessorComponent::GetInputDataTypes(vector& list) -{ - //See header file for documentation - list.clear(); - list.push_back(AliHLTPHOSDefinitions::fgkCellEnergyDataType); -} - - -AliHLTComponentDataType AliHLTPHOSModuleCalibrationProcessorComponent::GetOutputDataType() -{ - //See header file for documentation - return AliHLTPHOSDefinitions::fgkEmcCalibDataType; -} - -void AliHLTPHOSModuleCalibrationProcessorComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) -{ - //See header file for documentation - constBase = 0; - inputMultiplier = 2; -} - -AliHLTComponent* -AliHLTPHOSModuleCalibrationProcessorComponent::Spawn() -{ - //See header file for documentation - return new AliHLTPHOSModuleCalibrationProcessorComponent(); -} - -const char* -AliHLTPHOSModuleCalibrationProcessorComponent::GetComponentID() -{ - //See header file for documentation - return "PhosModuleCalibrationProcessor"; -} - -Int_t -AliHLTPHOSModuleCalibrationProcessorComponent::ScanArgument( Int_t /*argc*/, const char** /*argv*/) -{ - //See header file for documentation - return 0; -} - -Int_t AliHLTPHOSModuleCalibrationProcessorComponent::InitCalibration() -{ - //See header file for documentation - fShmPtr = new AliHLTPHOSSharedMemoryInterface(); - return 0; -} - - -Int_t AliHLTPHOSModuleCalibrationProcessorComponent::DeinitCalibration() -{ - //See header file for documentation - - //AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) { - - AliHLTComponentEventData dummyEvtData; - AliHLTComponentTriggerData dummyTrgData; - - ShipDataToFXS(dummyEvtData, dummyTrgData); - - //See header file for documentation - if(fShmPtr) - { - delete fShmPtr; - fShmPtr = 0; - } - if(fPHOSDAPtr) - { - delete fPHOSDAPtr; - fPHOSDAPtr = 0; - } - return 0; -} - -Int_t AliHLTPHOSModuleCalibrationProcessorComponent::ProcessCalibration(const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData) -{ - - // fCnt ++; - - fCnt ++; - - //See header file for documentation - const AliHLTComponentEventData eDta = evtData; - AliHLTComponentTriggerData tDta = trigData; - - - AliHLTPHOSValidCellDataStruct *currentChannel =0; - - UInt_t specification = 0; - const AliHLTComponentBlockData* iter = 0; - iter = GetFirstInputBlock( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC); - AliHLTPHOSRcuCellEnergyDataStruct* cellDataPtr = 0; - Int_t xOffset = 0; - Int_t zOffset = 0; - Int_t module = -1; - - Float_t energyArray[NXCOLUMNSMOD][NZROWSMOD][NGAINS]; - Float_t timeArray[NXCOLUMNSMOD][NZROWSMOD][NGAINS]; - - while(iter != 0) - { - - specification = specification|iter->fSpecification; - - cellDataPtr = (AliHLTPHOSRcuCellEnergyDataStruct*)( iter->fPtr); - - // Only necessary until the specification gives the module number - module = cellDataPtr->fModuleID; - if(!fPHOSDAPtr) - { - // fPHOSDAPtr = new AliPHOSDA1(module,0); - fPHOSDAPtr = new AliPHOSRcuDA1(module,0); - } - - xOffset = cellDataPtr->fRcuX*NXCOLUMNSRCU; - zOffset = cellDataPtr->fRcuZ*NZROWSRCU; - - fShmPtr->SetMemory(cellDataPtr); - currentChannel = fShmPtr->NextChannel(); - - while(currentChannel != 0) - { - Int_t tmpZ = currentChannel->fZ; - Int_t tmpX = currentChannel->fX; - Int_t tmpGain = currentChannel->fGain; - - energyArray[tmpX+xOffset][tmpZ+zOffset][tmpGain] = currentChannel->fEnergy; - timeArray[tmpX+xOffset][tmpZ+zOffset][tmpGain] = currentChannel->fTime; - } -// for(Int_t x = 0; x < NXCOLUMNSRCU; x++) -// { -// for(Int_t z = 0; z < NZROWSRCU; z++) -// { -// for(Int_t gain = 0; gain < NGAINS; gain++) -// { -// energyArray[x+xOffset][z+zOffset][gain] = cellDataPtr->fValidData[x][z][gain].fEnergy; -// timeArray[x+xOffset][z+zOffset][gain] = cellDataPtr->fValidData[x][z][gain].fTime; -// } -// } -// } - iter = GetNextInputBlock(); - } - - if(fPHOSDAPtr) - { - // fPHOSDAPtr->FillHistograms(energyArray, timeArray); - } - - ResetArrays(energyArray, timeArray); - - //PushBack((TObject*) fCalibDataPtr, AliHLTPHOSDefinitions::fgkEmcCalibDataType, specification); - - return 0; -} - - -Int_t -AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) -{ - - - - //://:ShipDataToFXS( - - // see header file for class documentation - - // ** PushBack data to FXS ... - Char_t filename[200]; - - for(int i=0; i < 200; i++) - { - filename[i] = 0; - } - - fPHOSDAPtr->GetModule(); - - sprintf(filename, "PHOS_Module%d_Calib_HLT.root", fPHOSDAPtr->GetModule() ); - - for(Int_t x = 0; x < NXCOLUMNSRCU; x++) - { - for(Int_t z = 0; z < NZROWSRCU; z++) - { - PushToFXS( (TObject*) fPHOSDAPtr->GetHgLgRatioHistogram(x, z), "PHOS", filename); - for(Int_t gain = 0; gain < NGAINS; gain++) - { - PushToFXS( (TObject*) fPHOSDAPtr->GetTimeEnergyHistogram(x, z, gain), "PHOS", filename); - } - } - } - return 0; -} - -void -AliHLTPHOSModuleCalibrationProcessorComponent::ResetArrays(Float_t e[NXCOLUMNSMOD][NZROWSMOD][NGAINS], Float_t t[NXCOLUMNSMOD][NZROWSMOD][NGAINS]) -{ - for(Int_t x = 0; x < NXCOLUMNSRCU; x++) - { - for(Int_t z = 0; z < NZROWSRCU; z++) - { - for(Int_t gain = 0; gain < NGAINS; gain++) - { - e[x][z][gain] = 0; - t[x][z][gain] = 0; - } - } - } -} diff --git a/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.h b/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.h deleted file mode 100644 index 8ce40161a27..00000000000 --- a/HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.h +++ /dev/null @@ -1,103 +0,0 @@ -//-*- Mode: C++ -*- -// $Id$ - -/************************************************************************** - * This file is property of and copyright by the ALICE HLT Project * - * All rights reserved. * - * * - * Primary Authors: Oystein Djuvsland * - * * - * 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. * - **************************************************************************/ - -#ifndef ALIHLTPHOSMODULECALIBRATIONPROCESSORCOMPONENT_H -#define ALIHLTPHOSMODULECALIBRATIONPROCESSORCOMPONENT_H - -/** - * Module calibration processor component for PHOS HLT - * - * @file AliHLTPHOSModuleCalibrationProcessorComponent.h - * @author Oystein Djuvsland - * @date - * @brief Module calibration processor component for PHOS HLT -*/ - -// see below for class documentation -// or -// refer to README to build package -// or -// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt - -#include "AliHLTCalibrationProcessor.h" -#include "AliHLTPHOSConstants.h" - -using namespace PhosHLTConst; - -class AliPHOSRcuDA1; -class AliHLTPHOSSharedMemoryInterface; -class TObjArray; - -class AliHLTPHOSModuleCalibrationProcessorComponent: public AliHLTCalibrationProcessor -{ -public: - - /** constructor */ - AliHLTPHOSModuleCalibrationProcessorComponent(); - - - /** destructor */ - virtual ~AliHLTPHOSModuleCalibrationProcessorComponent(); - - - // 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: - /** 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. */ - using AliHLTCalibrationProcessor::ProcessCalibration; - Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); - - /** Ship the data to the FXS at end of run or eventmodulo. */ - using AliHLTCalibrationProcessor::ShipDataToFXS; - Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); - - /** Reset the energy and timing arrays */ - void ResetArrays(Float_t e[NXCOLUMNSMOD][NZROWSMOD][NGAINS], Float_t t[NXCOLUMNSMOD][NZROWSMOD][NGAINS]); - int fCnt; ///TODO, remove this - -private: - /** not a valid copy constructor, defined according to effective C++ style */ - AliHLTPHOSModuleCalibrationProcessorComponent(const AliHLTPHOSModuleCalibrationProcessorComponent&); - /** not a valid assignment op, but defined according to effective C++ style */ - AliHLTPHOSModuleCalibrationProcessorComponent& operator=(const AliHLTPHOSModuleCalibrationProcessorComponent&); - /** Pointer to the DA */ - AliPHOSRcuDA1* fPHOSDAPtr; //! transient - - /** Interface to read altro channel data from shared memory */ - AliHLTPHOSSharedMemoryInterface *fShmPtr; //! transient - -}; - -#endif - diff --git a/HLT/PHOS/AliHLTPHOSModuleCellEnergyDataStruct.h b/HLT/PHOS/AliHLTPHOSModuleCellEnergyDataStruct.h deleted file mode 100644 index 6a9214492e7..00000000000 --- a/HLT/PHOS/AliHLTPHOSModuleCellEnergyDataStruct.h +++ /dev/null @@ -1,34 +0,0 @@ -//-*- Mode: C++ -*- -// $Id$ - -#ifndef ALIHLTPHOSNODULECELLENERGYDATASTRUCT_H -#define ALIHLTPHOSNODULECELLENERGYDATASTRUCT_H - -/*************************************************************************** - * Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. * - * * - * Author: Per Thomas Hille for the ALICE HLT Project. * - * Contributors are mentioned in the code where appropriate. * - * * - * 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. * - **************************************************************************/ - -#include "AliHLTPHOSCommonDefs.h" -#include "AliHLTPHOSValidCellDataStruct.h" - -struct AliHLTPHOSModuleCellEnergyDataStruct -{ - AliHLTUInt8_t fModuleID; - AliHLTUInt16_t fCnt; - AliHLTPHOSValidCellDataStruct fValidData[N_MODULES*N_ROWS_MOD*N_COLUMNS_MOD*N_GAINS]; - unsigned long cellEnergies[N_ROWS_MOD][N_COLUMNS_MOD][N_GAINS]; -}; - - -#endif diff --git a/HLT/PHOS/AliHLTPHOSProcessor.cxx b/HLT/PHOS/AliHLTPHOSProcessor.cxx index c178290c6b9..2513c81001d 100644 --- a/HLT/PHOS/AliHLTPHOSProcessor.cxx +++ b/HLT/PHOS/AliHLTPHOSProcessor.cxx @@ -24,7 +24,7 @@ const AliHLTComponentDataType AliHLTPHOSProcessor::fgkInputDataTypes[]={kAliHLTV AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), - AliHLTPHOSBase(), + // AliHLTPHOSBase(), fPhosEventCount(0), fModuleID(2), fPrintInfoModule(0), diff --git a/HLT/PHOS/AliHLTPHOSProcessor.h b/HLT/PHOS/AliHLTPHOSProcessor.h index c1c43b2c436..8fb888163c1 100644 --- a/HLT/PHOS/AliHLTPHOSProcessor.h +++ b/HLT/PHOS/AliHLTPHOSProcessor.h @@ -13,7 +13,8 @@ using namespace PhosHLTConst; -class AliHLTPHOSProcessor:public AliHLTProcessor, public AliHLTPHOSBase +//class AliHLTPHOSProcessor:public AliHLTProcessor, public AliHLTPHOSBase +class AliHLTPHOSProcessor:public AliHLTProcessor { public: diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx index 0e38f4765a6..deef0e3d7c6 100644 --- a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx +++ b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx @@ -177,9 +177,7 @@ Int_t AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr, const AliHLTUInt32_t size, UInt_t& totSize) { //comment - // bool shiprawdata = false; int tmpsize= 0; - Int_t crazyness = 0; Int_t nSamples = 0; Short_t channelCount = 0; @@ -193,25 +191,24 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali totSize += sizeof( AliHLTPHOSChannelDataHeaderStruct ); fRawReaderMemoryPtr->SetMemory(reinterpret_cast(iter->fPtr), static_cast(iter->fSize)); - fRawReaderMemoryPtr->SetEquipmentID(fMapperPtr->GetDDLFromSpec(iter->fSpecification) + 1792); + fRawReaderMemoryPtr->SetEquipmentID(fMapperPtr->GetDDLFromSpec( iter->fSpecification) + 1792 ); fRawReaderMemoryPtr->Reset(); fRawReaderMemoryPtr->NextEvent(); - if( fkDoPushRawData == true) { fRawDataWriter->NewEvent( ); } - - if(fAltroRawStreamPtr != NULL) { delete fAltroRawStreamPtr; fAltroRawStreamPtr=NULL; } + fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("PHOS")); - + // fAltroRawStreamPtr = new AliCaloRawStreamV3(fRawReaderMemoryPtr, TString("EMCAL")); + while( fAltroRawStreamPtr->NextDDL() ) { int cnt = 0; @@ -252,15 +249,21 @@ AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, Ali fAnalyzerPtr->SetData( firstBunchPtr, nSamples); fAnalyzerPtr->Evaluate(0, nSamples); - if(fAnalyzerPtr->GetTiming() > fMinPeakPosition && fAnalyzerPtr->GetTiming() < fMaxPeakPosition) - { - channelDataPtr->fChannelID = chId; - channelDataPtr->fEnergy = static_cast(fAnalyzerPtr->GetEnergy()) - fOffset; - channelDataPtr->fTime = static_cast(fAnalyzerPtr->GetTiming()); - channelDataPtr->fCrazyness = static_cast(crazyness); - channelCount++; - channelDataPtr++; // Updating position of the free output. - } + // if(fAnalyzerPtr->GetTiming() > fMinPeakPosition && fAnalyzerPtr->GetTiming() < fMaxPeakPosition) + { + channelDataPtr->fChannelID = chId; + channelDataPtr->fEnergy = static_cast(fAnalyzerPtr->GetEnergy()) - fOffset; + + if( channelDataPtr->fEnergy > 70 ) + { + cout << __FILE__ << __LINE__ << "The energy is of channel "<< chId << " is " << channelDataPtr->fEnergy << endl; + } + + channelDataPtr->fTime = static_cast(fAnalyzerPtr->GetTiming()); + channelDataPtr->fCrazyness = static_cast(crazyness); + channelCount++; + channelDataPtr++; // Updating position of the free output. + } } fRawDataWriter->NewChannel(); } @@ -431,31 +434,19 @@ AliHLTPHOSRawAnalyzerComponentv3::RawDataWriter::ResetBuffer() int AliHLTPHOSRawAnalyzerComponentv3::RawDataWriter::CopyBufferToSharedMemory(UShort_t *memPtr, const int sizetotal, const int sizeused ) { - // cout << __FILE__ << __LINE__ << endl; int sizerequested = (sizeof(int)*fTotalSize + sizeused); if( sizerequested > sizetotal ) { return 0; - // cout << __FILE__ << ":"<<__FUNCTION__<< ":"<< __LINE__ << ": ERROR request tu use buffer of size " << sizerequested << " byets, but only " << sizetotal << "Is available " << endl; - // HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.",sizerequested, sizetotal); - - // HLTError("Buffer overflow"); - } else { - // HLTError("INFO this is just a test"); - // cout << __FILE__ << ":"<<__FUNCTION__<< ":"<< __LINE__ << ": INFO, copying buffer...." << endl; for(int i=0; i < fTotalSize; i++) { memPtr[i] = fRawDataBuffer[i]; } - // cout << __FILE__ << ":"<<__FUNCTION__<< ":"<< __LINE__ << ": Done" << endl; - return fTotalSize; - } } -//HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.", totSize, size); diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx index 55c06f5dce8..91d5c827fae 100644 --- a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx +++ b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx @@ -95,7 +95,8 @@ AliHLTPHOSRawAnalyzerCrude::Evaluate(int start, int length) for(int i=start; i tmpAmplitudeMax && i > 5) - if(fIntDataPtr[i] > tmpAmplitudeMax && i > 5) + // if(fIntDataPtr[i] > tmpAmplitudeMax && i > 5) + if(fIntDataPtr[i] > tmpAmplitudeMax ) { // tmpAmplitudeMax = fDoubleDataPtr[i]; tmpAmplitudeMax = fIntDataPtr[i]; @@ -126,7 +127,8 @@ AliHLTPHOSRawAnalyzerCrude::EvaluateShort(int start, int length) { // cout << "sample index: " << i << endl; // if(fDoubleDataPtr[i] > tmpAmplitudeMax && i > 5) - if(fShortDataPtr[i] > tmpAmplitudeMax && i > 5) + // if(fShortDataPtr[i] > tmpAmplitudeMax && i > 5) + if(fShortDataPtr[i] > tmpAmplitudeMax ) { // tmpAmplitudeMax = fDoubleDataPtr[i]; tmpAmplitudeMax = fShortDataPtr[i]; diff --git a/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.cxx b/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.cxx index 8c6658b0f18..12d3a93b4e9 100644 --- a/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.cxx +++ b/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.cxx @@ -38,24 +38,9 @@ using namespace std; * Usage example see in PHOS/macros/Shuttle/AliPHOSCalibHistoProducer.C * **************************************************************************/ -/* -AliHLTPHOSRcuCalibrationProcessor:: AliHLTPHOSRcuCalibrationProcessor(): AliHLTPHOSBase(), - fCellAccEnergy(), - fModuleID(0), - fRcuX(0), - fRcuZ(0) - // fUtilitiesPtr(0) - */ -//{ - - // fUtilitiesPtr = new AliHLTPHOSUtilities(); - //Default constructor - // cout << "WARNING: You cannot invoke the AliHLTPHOSRcuCalibrationProcessor without arguments" << endl; - // cout << "Usage AliHLTPHOSRcuCalibrationProcessor(ModuleID, X. Z)" << endl; -//} -//AliHLTPHOSRcuCalibrationProcessor::AliHLTPHOSRcuCalibrationProcessor(AliHLTUInt8_t moduleID, AliHLTUInt8_t rcuX, AliHLTUInt8_t rcuZ) -AliHLTPHOSRcuCalibrationProcessor::AliHLTPHOSRcuCalibrationProcessor(AliHLTUInt8_t moduleID, AliHLTUInt8_t rcuX, AliHLTUInt8_t rcuZ):AliHLTPHOSBase(), +AliHLTPHOSRcuCalibrationProcessor::AliHLTPHOSRcuCalibrationProcessor(AliHLTUInt8_t moduleID, AliHLTUInt8_t rcuX, AliHLTUInt8_t rcuZ): + //AliHLTPHOSBase(), fCellAccEnergy(), fModuleID(moduleID), fRcuX(rcuX), diff --git a/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.h b/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.h index cfa2d05eb5a..be3681bd805 100644 --- a/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.h +++ b/HLT/PHOS/AliHLTPHOSRcuCalibrationProcessor.h @@ -29,7 +29,8 @@ class AliHLTPHOSRcuCellAccumulatedEnergyDataStruct; #define XBINUP 1023 #define NBINS 1023 -class AliHLTPHOSRcuCalibrationProcessor : public AliHLTPHOSBase +class AliHLTPHOSRcuCalibrationProcessor +//class AliHLTPHOSRcuCalibrationProcessor : public AliHLTPHOSBase //class AliHLTPHOSRcuCalibrationProcessor : public AliHLTPHOSRcuProcessor { public: diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx index 7b6998db488..b969749838c 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx @@ -284,7 +284,7 @@ AliHLTPHOSOnlineDisplayEventTab::InitDisplay(TGTab * tabPtr, int runnumber) fgLegoPlotPtr[gain]->SetRunNumber(runnumber); fgLegoPlotPtr[gain]->SetMaximum(1023); fgLegoPlotPtr[gain]->Reset(); - fgLegoPlotPtr[gain]->GetXaxis()->SetRange(XRANGESTART, XRANGEEND); + // fgLegoPlotPtr[gain]->GetXaxis()->SetRange(XRANGESTART, XRANGEEND); } diff --git a/HLT/libAliHLTPHOS.pkg b/HLT/libAliHLTPHOS.pkg index 2b782333a34..49a61ef13b1 100644 --- a/HLT/libAliHLTPHOS.pkg +++ b/HLT/libAliHLTPHOS.pkg @@ -41,7 +41,6 @@ CLASS_HDRS:= AliHLTPHOSBase.h \ AliHLTPHOSESDMakerComponent.h \ AliHLTPHOSRcuCalibrationProcessorComponent.h \ AliHLTPHOSRcuCalibrationProcessor.h \ - AliHLTPHOSModuleCalibrationProcessorComponent.h \ AliHLTPHOSRcuDAComponent.h \ AliHLTPHOSRcuProperties.h \ AliHLTPHOSUtilities.h \ @@ -66,7 +65,6 @@ MODULE_HDRS:= $(CLASS_HDRS) \ AliHLTPHOSConstants.h \ AliHLTPHOSRawAnalyzer.h \ AliHLTPHOSDefinitions.h \ - AliHLTPHOSModuleCellEnergyDataStruct.h\ AliHLTPHOSRcuCellEnergyDataStruct.h \ AliHLTPHOSValidCellDataStruct.h\ AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h \ -- 2.43.0