From: phille Date: Thu, 22 Nov 2007 23:16:38 +0000 (+0000) Subject: Coding conventions and minor fixes X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=939c67e7819d85dce766e5e0a1051c0537f35e79;p=u%2Fmrichter%2FAliRoot.git Coding conventions and minor fixes --- diff --git a/HLT/PHOS/AliHLTPHOSBase.cxx b/HLT/PHOS/AliHLTPHOSBase.cxx index a50d1b41a50..1d6cdf4cc85 100644 --- a/HLT/PHOS/AliHLTPHOSBase.cxx +++ b/HLT/PHOS/AliHLTPHOSBase.cxx @@ -24,8 +24,7 @@ AliHLTPHOSBase::AliHLTPHOSBase(): AliHLTPHOSConfig(), AliHLTPHOSAltroConfig() { - // fConfigPtr = new AliHLTPHOSConfig(); - // fAltroConfigPtr = new AliHLTPHOSAltroConfig(); + } @@ -34,3 +33,20 @@ AliHLTPHOSBase::~AliHLTPHOSBase() } + +bool +AliHLTPHOSBase::CheckFile(const char *fileName, const char *opt) const +{ + FILE *fp = fopen(fileName, opt); + + if(fp == 0) + { + cout <<"Error: from" << typeid(*this).name() <<"could not open file: "<< fileName < @@ -53,7 +51,6 @@ public: } cout << array[i]<< "\t"; - } } @@ -69,8 +66,6 @@ public: template T MaxValue(T *array, int N) { - // Double_t tmpMax = 0; - T tmpMax = 0; for(int i = 0; i < N; i++) diff --git a/HLT/PHOS/AliHLTPHOSConfig.h b/HLT/PHOS/AliHLTPHOSConfig.h index 00f438d640e..b43ef9db26e 100644 --- a/HLT/PHOS/AliHLTPHOSConfig.h +++ b/HLT/PHOS/AliHLTPHOSConfig.h @@ -28,9 +28,14 @@ public: virtual ~AliHLTPHOSConfig(); void SetSoftwareBaselineSubtraction(bool isSoftwareBaselineSubtraction); void PrintDefaultValues(); + protected: bool fIsSoftwareBaselineSubtraction; + // int fRunNumber; + + private: + // void ScanRunNumberFromFile(); }; #endif diff --git a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx index e31eb599179..5c7a7d0f8bb 100644 --- a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx @@ -30,8 +30,8 @@ AliHLTPHOSDigitMakerComponent gAliHLTPHOSDigitMakerComponent; AliHLTPHOSDigitMakerComponent::AliHLTPHOSDigitMakerComponent() : AliHLTPHOSProcessor(), - fDigitMakerPtr(0), - fEvtCnt(0) + fDigitMakerPtr(0) + // fEvtCnt(0) { //comment } @@ -94,17 +94,11 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, std::vector& outputBlocks) { //Do event - UInt_t tSize = 0; UInt_t offset = 0; UInt_t mysize = 0; - //Int_t nRecPoints = 0; - //Int_t index = 0; - - //Int_t fileCount = 0; Int_t digitCount = 0; - //char filename [50]; - + // cout << " AliHLTPHOSDigitMakerComponent::DoEven fEvtCnt = " << fEvtCnt <MakeDigits(reinterpret_cast(iter->fPtr)); } - fEvtCnt++; + + fPhosEventCount++; mysize = 0; offset = tSize; @@ -154,9 +149,9 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, fDigitMakerPtr->Reset(); - if(fEvtCnt % 10 == 0) + if(fPhosEventCount % 10 == 0) { - cout << "Event #: " << fEvtCnt << endl; + cout << "Event #: " << fPhosEventCount << endl; cout << " - Number of digits found: " << digitCount << endl; } diff --git a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.h b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.h index 7143e5b9301..d5679785ea1 100644 --- a/HLT/PHOS/AliHLTPHOSDigitMakerComponent.h +++ b/HLT/PHOS/AliHLTPHOSDigitMakerComponent.h @@ -16,9 +16,6 @@ #define ALIHLTPHOSDIGITMAKERCOMPONENT_H #include "AliHLTPHOSProcessor.h" -//#include "AliHLTPHOSDigitMaker.h" -//#include "TTree.h" -//#include "TClonesArray.h" class AliHLTPHOSDigitMaker; @@ -56,8 +53,8 @@ protected: private: AliHLTPHOSDigitMaker *fDigitMakerPtr; //comment AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //comment - UInt_t fEvtCnt; //comment - Int_t fRunNb; //comment + // UInt_t fEvtCnt; //comment + // Int_t fRunNb; //comment static const AliHLTComponentDataType fgkInputDataTypes[]; //HLT input data type diff --git a/HLT/PHOS/AliHLTPHOSProcessor.cxx b/HLT/PHOS/AliHLTPHOSProcessor.cxx index fe274204c17..99844eef431 100644 --- a/HLT/PHOS/AliHLTPHOSProcessor.cxx +++ b/HLT/PHOS/AliHLTPHOSProcessor.cxx @@ -14,14 +14,15 @@ **************************************************************************/ #include "AliHLTPHOSProcessor.h" +#include "unistd.h" const AliHLTComponentDataType AliHLTPHOSProcessor::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array -AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fModuleID(0), fPrintInfoFrequncy(1000) +AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fModuleID(0), fPrintInfoFrequncy(1000), fRunNumber(0) { - + ScanRunNumberFromFile(); } @@ -32,3 +33,23 @@ AliHLTPHOSProcessor::~AliHLTPHOSProcessor() } +void +AliHLTPHOSProcessor::ScanRunNumberFromFile() +{ + char tmpDirectory[512]; + char tmpFileName[512]; + sprintf(tmpDirectory, "%s", getenv("HOME")); + sprintf(tmpFileName, "%s%s", tmpDirectory, "/rundir/runNumber.txt"); + + if(CheckFile(tmpFileName, "r") == true) + { + FILE *fp = fopen(tmpFileName, "r"); + fscanf(fp, "%d", &fRunNumber); + fclose(fp); + } + + else + { + cout << "ERROR, could not find file " << tmpFileName <& outputBlocks ) + int AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector& outputBlocks ) @@ -108,47 +118,25 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData UInt_t tSize = 0; Float_t baseline = 0; AliHLTUInt8_t* outBPtr; - //AliHLTAltroBunch *bunchPtr; outBPtr = outputPtr; const AliHLTComponentBlockData* iter = NULL; unsigned long ndx; - - // printf("\n% \n", ndx); - // cout << "evtData block count = " << evtData.fBlockCnt << endl; - - - fDebugCnt++; - + // fDebugCnt++; for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { - // cout <<"TP0"<< endl; - - Int_t tmpChannelCnt = 0; + Int_t tmpChannelCnt = 0; iter = blocks+ndx; mysize = 0; offset = tSize; - // cout <<"TP1"<< endl; - //Int_t *dt = (Int_t*)(reinterpret_cast( iter->fPtr )); - // cout <<"TP2"<< endl; Int_t crazyness = 0; if ( iter->fDataType != AliHLTPHOSDefinitions::fgkDDLPackedRawDataType ) { - // cout <<"WARNING: not AliHLTPHOSDefinitions::fgkDDLPackedRawDataType " << endl; - // cout << "equippment "<< fkEquippmentID << " Event count =" << fDebugCnt <<" AliHLTPHOSRawAnalyzerComponent::DoEvent , ERROR"<< endl; continue; - - // if(fPhosEventCount < 10) - // { - // continue; //!!!!! Commented out to read TPC data, remember to put back - // } - } - else - { - // cout << "equippment " << fkEquippmentID << " Event count =" << fDebugCnt << " Dat type is: AliHLTPHOSDefinitions::fgkDDLPackedRawDataType" << endl; } + if( fPhosEventCount%100 == 0) { @@ -157,23 +145,8 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData } - /* - printf("\Common data header for equippment %d\n", fkEquippmentID); - printf("Event#: %d -- RCU X: %d - RCU Z: %d\n\n", fPhosEventCount, fRcuX, fRcuZ); - - for(Int_t n = 0; n < 8; n++) - { - printf("CDH(%d): 0x%X\n", n, dt[n]); - } - - printf("\n"); - */ - - fDecoderPtr->SetMemory(reinterpret_cast( iter->fPtr ), iter->fSize); - // fDecoderPtr->SetMemory2(reinterpret_cast( iter->fPtr ), iter->fSize); fDecoderPtr->Decode(); - fOutPtr = (AliHLTPHOSRcuCellEnergyDataStruct*)outBPtr; fOutPtr->fRcuX = fRcuX; fOutPtr->fRcuZ = fRcuZ; @@ -181,38 +154,45 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData while( fDecoderPtr->NextChannel(fAltroDataPtr) == true ) { - - // if(fAltroDataPtr->fDataSize != 72) - // if(fAltroDataPtr->fDataSize != 142) - if(fAltroDataPtr->fDataSize != (fNTotalSamples +2)) + if(fAltroDataPtr->GetDataSize() != (fNTotalSamples +2)) { - cout << "Error, fDataSize = " << fAltroDataPtr->fDataSize << endl; + cout << "Error, fDataSize = " << fAltroDataPtr->GetDataSize() << endl; continue; } - crazyness = fSanityInspectorPtr->CheckInsanity(fAltroDataPtr->fData, fAltroDataPtr->fDataSize - 2); - fAnalyzerPtr->SetData(fAltroDataPtr->fData); // AliHLTPHOSRcuCellEnergyDebugDataStruct* fOutPtr; - fAnalyzerPtr->Evaluate(0, fAltroDataPtr->fDataSize -2); + crazyness = fSanityInspectorPtr->CheckInsanity(fAltroDataPtr->GetData(), fAltroDataPtr->GetDataSize() - 2); + + fAnalyzerPtr->SetData(fAltroDataPtr->GetData()); + fAnalyzerPtr->Evaluate(0, fAltroDataPtr->GetDataSize() -2); + fOutPtr->fValidData[tmpChannelCnt].fZ = fMapperPtr->hw2geomapPtr[fAltroDataPtr->GetHadd()].zRow; + fOutPtr->fValidData[tmpChannelCnt].fX = fMapperPtr->hw2geomapPtr[fAltroDataPtr->GetHadd()].xCol; + fOutPtr->fValidData[tmpChannelCnt].fGain = fMapperPtr->hw2geomapPtr[fAltroDataPtr->GetHadd()].gain; + - fOutPtr->fValidData[tmpChannelCnt].fZ = fMapperPtr->hw2geomapPtr[fAltroDataPtr->fHadd].zRow; - fOutPtr->fValidData[tmpChannelCnt].fX = fMapperPtr->hw2geomapPtr[fAltroDataPtr->fHadd].xCol; - fOutPtr->fValidData[tmpChannelCnt].fGain = fMapperPtr->hw2geomapPtr[fAltroDataPtr->fHadd].gain; if(fUseBaselineSubtraction) - { - baseline = fBaselines[fOutPtr->fValidData[tmpChannelCnt].fX][fOutPtr->fValidData[tmpChannelCnt].fZ][ fOutPtr->fValidData[tmpChannelCnt].fGain]; - } + { + baseline = fBaselines[fOutPtr->fValidData[tmpChannelCnt].fX][fOutPtr->fValidData[tmpChannelCnt].fZ][ fOutPtr->fValidData[tmpChannelCnt].fGain]; + } + + fOutPtr->fValidData[tmpChannelCnt].fEnergy = (float)fAnalyzerPtr->GetEnergy() - baseline; + + fOutPtr->fValidData[tmpChannelCnt].fTime = (float)fAnalyzerPtr->GetTiming(); + + fOutPtr->fValidData[tmpChannelCnt].fCrazyness = (int)crazyness; + + const UInt_t *tmpData = fAltroDataPtr->GetData(); + for(Int_t sample = 0; sample < fNTotalSamples; sample++) { - //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - (fOutPtr->fValidData[tmpChannelCnt].fData)[sample] = fAltroDataPtr->fData[sample] - (int)baseline; + (fOutPtr->fValidData[tmpChannelCnt].fData)[sample] = tmpData[sample] - (int)baseline; } tmpChannelCnt ++; - } + fOutPtr->fCnt = tmpChannelCnt; mysize += sizeof(AliHLTPHOSRcuCellEnergyDataStruct); @@ -220,11 +200,11 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData FillBlockData( bd ); bd.fOffset = offset; bd.fSize = mysize; - + bd.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType; bd.fSpecification = 0xFFFFFFFF; outputBlocks.push_back( bd ); - + tSize += mysize; outBPtr += mysize; @@ -238,15 +218,11 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData return EMSGSIZE; } - // fDecoderPtr->GetFailureRate(); - } - + fPhosEventCount++; - // cout << "event cunt =" << fPhosEventCount << endl; - if(fPrintInfo == kTRUE) { if(fPhosEventCount%fPrintInfoFrequncy == 0) @@ -262,12 +238,9 @@ AliHLTPHOSRawAnalyzerComponent::DoEvent( const AliHLTComponentEventData& evtData int AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) { - //comment + //See base class for documentation cout <<"AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) "<< endl; - fAltroDataPtr = new AliHLTAltroData(); - fAltroBunchPtr = new AliHLTAltroBunch(); - fDecoderPtr = new AliHLTDDLDecoder(); - fSanityInspectorPtr = new AliHLTPHOSSanityInspector(); + fSendChannelData = kFALSE; fPrintInfo = kFALSE; Reset(); @@ -297,9 +270,7 @@ AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) iResult = 0; // fRawMemoryReader->SetEquipmentID(fkEquippmentID); } - - // return iResult; - // return 0; + return iResult; } diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h index f6831950df3..e6e8750ad5a 100644 --- a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h +++ b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponent.h @@ -9,10 +9,11 @@ class AliHLTPHOSRawAnalyzer; class AliHLTPHOSRcuCellEnergyDataStruct; class AliHLTPHOSRcuChannelDataStruct; class AliHLTPHOSMapper; -class AliHLTDDLDecoder; -class AliHLTAltroData; -class AliHLTAltroBunch; class AliHLTPHOSSanityInspector; +class AliAltroDecoder; // decoder for altro payload +class AliAltroData; // container for altro payload +class AliAltroBunch; // container for altro bunches + class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor { @@ -41,18 +42,16 @@ class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor Bool_t fSendChannelData; /** 900) { - // Double_t tmpMax = GetMaxValue(fFloatDataPtr, tmpLength); - // Double_t tmpMax = GetMaxValue(fIntDataPtr, tmpLength); - - Double_t tmpMax = MaxValue(fIntDataPtr, tmpLength); + + Double_t tmpMax = MaxValue(const_cast(fIntDataPtr), tmpLength); + if(tmpMax == 1023) { diff --git a/HLT/PHOS/AliHLTPHOSRcuDigitMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSRcuDigitMakerComponent.cxx index 84f99e2b4ec..2c3e1f14851 100644 --- a/HLT/PHOS/AliHLTPHOSRcuDigitMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSRcuDigitMakerComponent.cxx @@ -93,6 +93,8 @@ AliHLTPHOSRcuDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtDat AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, std::vector& outputBlocks) { + cout << "AliHLTPHOSRcuDigitMakerComponent::DoEven TP1" << endl; + //Do event UInt_t tSize = 0; @@ -110,10 +112,12 @@ AliHLTPHOSRcuDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtDat outBPtr = outputPtr; const AliHLTComponentBlockData* iter = 0; unsigned long ndx; + + cout << "AliHLTPHOSRcuDigitMakerComponent::DoEven TP2" << endl; fDigitContainerPtr = (AliHLTPHOSRcuDigitContainerDataStruct*)outBPtr; //fDigitMakerPtr->SetDigitContainerStruct(fDigitContainerPtr); fDigitMakerPtr->SetDigitContainerStruct((AliHLTPHOSRcuDigitContainerDataStruct*)outBPtr); - + cout << "AliHLTPHOSRcuDigitMakerComponent::DoEven TP3" << endl; for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks+ndx; @@ -124,6 +128,9 @@ AliHLTPHOSRcuDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtDat continue; } + + + digitCount = fDigitMakerPtr->MakeDigits(reinterpret_cast(iter->fPtr)); } fEvtCnt++; diff --git a/HLT/PHOS/AliHLTPHOSRcuProcessor.cxx b/HLT/PHOS/AliHLTPHOSRcuProcessor.cxx index 633582d8a5a..3023781ffbf 100644 --- a/HLT/PHOS/AliHLTPHOSRcuProcessor.cxx +++ b/HLT/PHOS/AliHLTPHOSRcuProcessor.cxx @@ -17,9 +17,10 @@ **************************************************************************/ #include "AliHLTPHOSRcuProcessor.h" -AliHLTPHOSRcuProcessor::AliHLTPHOSRcuProcessor(): fkEquippmentID(0) +AliHLTPHOSRcuProcessor::AliHLTPHOSRcuProcessor():AliHLTPHOSProcessor(), + fkEquippmentID(0) { - + // cout << "AliHLTPHOSRcuProcessor::AliHLTPHOSRcuProcessor() "<< endl; } AliHLTPHOSRcuProcessor::~AliHLTPHOSRcuProcessor() diff --git a/HLT/PHOS/AliHLTPHOSRcuTreeMaker.cxx b/HLT/PHOS/AliHLTPHOSRcuTreeMaker.cxx index e6f917998bc..11dae5e0f46 100644 --- a/HLT/PHOS/AliHLTPHOSRcuTreeMaker.cxx +++ b/HLT/PHOS/AliHLTPHOSRcuTreeMaker.cxx @@ -25,6 +25,12 @@ ClassImp(AliHLTPHOSRcuTreeMaker); +void +AliHLTPHOSRcuTreeMaker::FUCK() +{ + cout << "AliHLTPHOSTreeMaker::FUCK" << endl; +} + AliHLTPHOSRcuTreeMaker::AliHLTPHOSRcuTreeMaker() : AliHLTPHOSBase(), fDigitArrayPtr(0), diff --git a/HLT/PHOS/AliHLTPHOSRcuTreeMaker.h b/HLT/PHOS/AliHLTPHOSRcuTreeMaker.h index 0e663bc41f1..fa76e7292f3 100644 --- a/HLT/PHOS/AliHLTPHOSRcuTreeMaker.h +++ b/HLT/PHOS/AliHLTPHOSRcuTreeMaker.h @@ -25,6 +25,8 @@ class AliHLTPHOSRcuDigitContainerDataStruct; class TClonesArray; //class TTree; + + class AliHLTPHOSRcuTreeMaker : public AliHLTPHOSBase { public: @@ -33,7 +35,7 @@ public: ~AliHLTPHOSRcuTreeMaker(); Int_t MakeDigitArray(AliHLTPHOSRcuDigitContainerDataStruct* digitContainer, Int_t nDigits); - + void FUCK(); void FillDigitTree(); void ResetDigitTree() { fDigitTreePtr->Reset(); } diff --git a/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.cxx index 13edabecdcc..abda344e86c 100644 --- a/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.cxx @@ -16,6 +16,9 @@ #include "AliHLTPHOSRcuTreeMakerComponent.h" + +#include "AliHLTPHOSRcuDigitContainerDataStruct.h" + #include "AliHLTPHOSRcuTreeMaker.h" #include "AliHLTPHOSRcuProcessor.h" #include "AliHLTPHOSDigitDataStruct.h" @@ -34,7 +37,8 @@ AliHLTPHOSRcuTreeMakerComponent gAliHLTPHOSRcuTreeMakerComponent; AliHLTPHOSRcuTreeMakerComponent::AliHLTPHOSRcuTreeMakerComponent() : AliHLTPHOSRcuProcessor(), fDigitTreePtr(0), - fEventCount(0), + fTreeMakerPtr(0), + // fEventCount(0), fWriteInterval(1000) { //comment @@ -114,6 +118,8 @@ AliHLTPHOSRcuTreeMakerComponent::DoEvent(const AliHLTComponentEventData& evtData std::vector& /*outputBlocks*/) { + + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0 " << endl; //Do event Bool_t digitEvent; @@ -122,34 +128,86 @@ AliHLTPHOSRcuTreeMakerComponent::DoEvent(const AliHLTComponentEventData& evtData const AliHLTComponentBlockData* iter = 0; unsigned long ndx; - + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.1 " << endl; for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks + ndx; - + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.2 " << endl; if ( iter->fDataType == AliHLTPHOSDefinitions::fgkAliHLTDigitDataType ) { - digitEvent = true; - nDigits = fTreeMakerPtr->MakeDigitArray ( reinterpret_cast ( iter->fPtr ), totalDigits ); - totalDigits += nDigits; - //cout << totalDigits << endl; - continue; + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.2 " << endl; + digitEvent = true; + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3 " << endl; + + // fTreeMakerPtr = new AliHLTPHOSRcuTreeMaker(); + + if( iter->fPtr == 0) + { + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3.1 " << endl; + cout << "ERROR" << endl; + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3.2 " << endl; + } + else + { + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3.3 " << endl; + + // fTreeMakerPtr = new AliHLTPHOSRcuTreeMaker(); + + if(fTreeMakerPtr == 0 ) + { + // cout << "FUCK" << endl; + } + else + { + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3.4, -1 " << endl; + // nDigits = fTreeMakerPtr->MakeDigitArray ( reinterpret_cast ( iter->fPtr ), totalDigits ); + // + + nDigits = fTreeMakerPtr->MakeDigitArray ( reinterpret_cast ( iter->fPtr ), totalDigits ); + + // AliHLTPHOSRcuDigitContainerDataStruct *tmp = new AliHLTPHOSRcuDigitContainerDataStruct(); + + // nDigits = fTreeMakerPtr->MakeDigitArray(tmp, totalDigits ); + + // nDigits = fTreeMakerPtr->MakeDigitArray ( (AliHLTPHOSRcuDigitContainerDataStruct*) ( iter->fPtr ), totalDigits ); + + fTreeMakerPtr->FUCK(); + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.3.4 " << endl; + + } + } + + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.4 " << endl; + totalDigits += nDigits; + //cout << totalDigits << endl; + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.5 " << endl; + continue; } + if ( iter->fDataType == AliHLTPHOSDefinitions::fgkAliHLTClusterDataType ) { - // + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP0.6 " << endl; + // } } - fEventCount++; + + // fEventCount++; + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP1 " << endl; + fPhosEventCount++; + fTreeMakerPtr->FillDigitTree(); - - if(fEventCount%fWriteInterval == 0) + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP2 " << endl; + // if(fEventCount%fWriteInterval == 0) + if(fPhosEventCount%fWriteInterval == 0) { + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP3 " << endl; Write(); + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP4 " << endl; ResetTrees(); + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP5 " << endl; } - + cout << "AliHLTPHOSRcuTreeMakerComponent::DoEvent TP6 " << endl; return 0; } @@ -176,17 +234,17 @@ AliHLTPHOSRcuTreeMakerComponent::DoInit ( int argc, const char** argv ) fTreeMakerPtr->SetDigitTree(fDigitTreePtr); - fstream runNbFile; + // fstream runNbFile; //Int_t newRunNb; - runNbFile.open("/opt/HLT-public/rundir/runNumber.txt"); - runNbFile >> fRunNb; - runNbFile.close(); + // runNbFile.open("/opt/HLT-public/rundir/runNumber.txt"); + // runNbFile >> fRunNb; + // runNbFile.close(); /* newRunNb = fRunNb + 1; runNbFile.open("/opt/HLT-public/rundir/runNumber.txt"); runNbFile << newRunNb; runNbFile.close();*/ - cout << endl << "Run number is: " << fRunNb << " -- Check that this is correct!!!\n"; + cout << endl << "Run number is: " << fRunNumber << " -- Check that this is correct!!!\n" << endl; return 0; @@ -207,7 +265,8 @@ AliHLTPHOSRcuTreeMakerComponent::Write() cout << "Writing file..."; char filename [256]; - sprintf(filename, "%s/run%d_%d_digitTree_mod%d_rcuX%d_rcuZ%d_.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1), fModuleID, fRcuX, fRcuZ); + // sprintf(filename, "%s/run%d_%d_digitTree_mod%d_rcuX%d_rcuZ%d_.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1), fModuleID, fRcuX, fRcuZ); + sprintf(filename, "%s/run%d_%d_digitTree_mod%d_rcuX%d_rcuZ%d_.root", fDirectory, fRunNumber,(fPhosEventCount/fWriteInterval - 1), fModuleID, fRcuX, fRcuZ); TFile *outfile = new TFile(filename,"recreate"); fDigitTreePtr->Write(); delete outfile; @@ -225,9 +284,7 @@ AliHLTPHOSRcuTreeMakerComponent::ResetTrees() fTreeMakerPtr->SetDigitTree(fDigitTreePtr); } - - - + diff --git a/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.h b/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.h index 3396f6181a2..639ef55759e 100644 --- a/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.h +++ b/HLT/PHOS/AliHLTPHOSRcuTreeMakerComponent.h @@ -49,6 +49,8 @@ class AliHLTPHOSRcuTreeMakerComponent : public AliHLTPHOSRcuProcessor AliHLTComponent* Spawn(); + + void FUCK(); void Write(); void ResetTrees(); @@ -63,9 +65,11 @@ class AliHLTPHOSRcuTreeMakerComponent : public AliHLTPHOSRcuProcessor private: AliHLTPHOSRcuTreeMaker *fTreeMakerPtr; //comment TTree *fDigitTreePtr; //comment - UInt_t fEventCount; //comment + + + // UInt_t fEventCount; //comment UInt_t fWriteInterval; //comment - UInt_t fRunNb; //comment + // UInt_t fRunNb; //comment char *fDirectory; //comment static const AliHLTComponentDataType fgkInputDataTypes[]; //HLT input data type diff --git a/HLT/PHOS/AliHLTPHOSSanityInspector.cxx b/HLT/PHOS/AliHLTPHOSSanityInspector.cxx index 53e2de5520d..e5b4c2e6ee4 100644 --- a/HLT/PHOS/AliHLTPHOSSanityInspector.cxx +++ b/HLT/PHOS/AliHLTPHOSSanityInspector.cxx @@ -14,7 +14,6 @@ **************************************************************************/ #include "AliHLTPHOSSanityInspector.h" -#include "AliHLTAltroData.h" #include "Rtypes.h" ClassImp(AliHLTPHOSSanityInspector); @@ -34,10 +33,11 @@ AliHLTPHOSSanityInspector::~AliHLTPHOSSanityInspector() } -Int_t -AliHLTPHOSSanityInspector::CheckInsanity(UInt_t* data, Int_t N) + +const Int_t +AliHLTPHOSSanityInspector::CheckInsanity(const UInt_t* data, const Int_t N) const { - //comment + //comment for(Int_t i = 1; i < N; i++) { if((((Int_t)data[i] - (Int_t)data[i-1]) > fMaxDifference) || (((Int_t)data[i-1] - (Int_t)data[i]) > fMaxDifference)) @@ -46,39 +46,15 @@ AliHLTPHOSSanityInspector::CheckInsanity(UInt_t* data, Int_t N) return 0; } -Int_t -AliHLTPHOSSanityInspector::CheckInsanity(Int_t* data, Int_t N) -{ - //comment - for(Int_t i = 1; i < N; i++) - { - if((((Int_t)data[i] - (Int_t)data[i-1]) > fMaxDifference) || (((Int_t)data[i-1] - (Int_t)data[i]) > fMaxDifference)) - return 1; - } - return 0; -} Int_t AliHLTPHOSSanityInspector::CheckAndHealInsanity(UInt_t* data, Int_t N) -// + // { - //comment + //comment Int_t crazyness = 0; - - /* if(((data[0] - data[1]) > fMaxDifference) || ((data[1] - data[0]) > fMaxDifference)) - { - if(((data[1] - data[2]) > fMaxDifference) || ((data[2] - data[1]) > fMaxDifference)) - { - if(((data[2] - data[3]) > fMaxDifference) || ((data[3] - data[2]) > fMaxDifference)) - { - return false; //To much crazyness! - } - data[1] = (data[2] + data[0])/2; - crazyness++; - } - } - */ + if(N > 3) { //Require a stable start @@ -86,25 +62,8 @@ AliHLTPHOSSanityInspector::CheckAndHealInsanity(UInt_t* data, Int_t N) return -1; if((((Int_t)data[1] - (Int_t)data[2]) > fMaxDifference) || (((Int_t)data[2] - (Int_t)data[1]) > fMaxDifference)) return -1; - /* - for(Int_t i = 2; i < altroData->fDataSize - 3; i++) - { - if(((data[i] - data[i+1]) > fMaxDifference) || ((data[i+1] - data[i]) > fMaxDifference)) - { - if(((data[i+1] - data[i+2]) > fMaxDifference) || ((data[i+2] - data[i+1]) > fMaxDifference)) - { - if(((data[i+2] - data[i+3]) > fMaxDifference) || ((data[i+3] - data[i+2]) > fMaxDifference)) - { - return false; //To0 crazy - } - data[i+1] = (data[i+2] + data[i])/2; - crazyness++; - } - else - return false; - } - } - */ + + for(Int_t i = 2; i < N - 3; i++) { if((((Int_t)data[i] - (Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) @@ -154,96 +113,66 @@ AliHLTPHOSSanityInspector::CheckAndHealInsanity(UInt_t* data, Int_t N) } + + Int_t AliHLTPHOSSanityInspector::CheckAndHealInsanity(Int_t* data, Int_t N) - // { - //comment + //comment Int_t crazyness = 0; - - /* if(((data[0] - data[1]) > fMaxDifference) || ((data[1] - data[0]) > fMaxDifference)) - { - if(((data[1] - data[2]) > fMaxDifference) || ((data[2] - data[1]) > fMaxDifference)) - { - if(((data[2] - data[3]) > fMaxDifference) || ((data[3] - data[2]) > fMaxDifference)) - { - return false; //To much crazyness! -} - data[1] = (data[2] + data[0])/2; - crazyness++; -} -} - */ + if(N > 3) - { - //Require a stable start - if((((Int_t)data[0] - (Int_t)data[1]) > fMaxDifference) || (((Int_t)data[1] - (Int_t)data[0]) > fMaxDifference)) - return -1; - if((((Int_t)data[1] - (Int_t)data[2]) > fMaxDifference) || (((Int_t)data[2] - (Int_t)data[1]) > fMaxDifference)) - return -1; - /* - for(Int_t i = 2; i < altroData->fDataSize - 3; i++) - { - if(((data[i] - data[i+1]) > fMaxDifference) || ((data[i+1] - data[i]) > fMaxDifference)) - { - if(((data[i+1] - data[i+2]) > fMaxDifference) || ((data[i+2] - data[i+1]) > fMaxDifference)) - { - if(((data[i+2] - data[i+3]) > fMaxDifference) || ((data[i+3] - data[i+2]) > fMaxDifference)) { - return false; //To0 crazy - } - data[i+1] = (data[i+2] + data[i])/2; - crazyness++; - } - else - return false; - } - } - */ - for(Int_t i = 2; i < N - 3; i++) - { - if((((Int_t)data[i] - (Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) - { - i++; - if((((Int_t)data[i] -(Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) + if((((Int_t)data[0] - (Int_t)data[1]) > fMaxDifference) || (((Int_t)data[1] - (Int_t)data[0]) > fMaxDifference)) + return -1; + if((((Int_t)data[1] - (Int_t)data[2]) > fMaxDifference) || (((Int_t)data[2] - (Int_t)data[1]) > fMaxDifference)) + return -1; + + + for(Int_t i = 2; i < N - 3; i++) { - i++; if((((Int_t)data[i] - (Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) - { - return -2; //Too crazy - } - data[i-1] = ((Int_t)data[i] + (Int_t)data[i-2])/2; - crazyness++; + { + i++; + if((((Int_t)data[i] -(Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) + { + i++; + if((((Int_t)data[i] - (Int_t)data[i+1]) > fMaxDifference) || (((Int_t)data[i+1] - (Int_t)data[i]) > fMaxDifference)) + { + return -2; //Too crazy + } + data[i-1] = ((Int_t)data[i] + (Int_t)data[i-2])/2; + crazyness++; + } + else + return -3; //Two spikes in a row? + } } - else - return -3; //Two spikes in a row? - } - } - if((((Int_t)data[N - 3] -(Int_t) data[N - 2]) > fMaxDifference) || - (((Int_t)data[N - 2] - (Int_t)data[N - 3]) > fMaxDifference)) - { - if((((Int_t)data[N - 2] - (Int_t)data[N - 1]) > fMaxDifference) || - (((Int_t)data[N - 1] - (Int_t)data[N - 2]) > fMaxDifference)) - { - data[N - 2] = ((Int_t)data[N - 3] + (Int_t)data[N - 1])/2; - return crazyness++; - } - return -4; + if((((Int_t)data[N - 3] -(Int_t) data[N - 2]) > fMaxDifference) || + (((Int_t)data[N - 2] - (Int_t)data[N - 3]) > fMaxDifference)) + { + if((((Int_t)data[N - 2] - (Int_t)data[N - 1]) > fMaxDifference) || + (((Int_t)data[N - 1] - (Int_t)data[N - 2]) > fMaxDifference)) + { + data[N - 2] = ((Int_t)data[N - 3] + (Int_t)data[N - 1])/2; + return crazyness++; + } + return -4; - } + } - if((((Int_t)data[N - 2] - (Int_t)data[N - 1]) > fMaxDifference) || - (((Int_t)data[N - 1] - (Int_t)data[N - 2]) > fMaxDifference)) - { + if((((Int_t)data[N - 2] - (Int_t)data[N - 1]) > fMaxDifference) || + (((Int_t)data[N - 1] - (Int_t)data[N - 2]) > fMaxDifference)) + { // (Int_t)data[N - 3] = (Int_t)data[N - 4] -(Int_t) data[N - 5] + (Int_t)data[N-4]; - data[N - 1] = data[N - 2]; - return crazyness++; - } + data[N - 1] = data[N - 2]; + return crazyness++; + } - } + } return crazyness; diff --git a/HLT/PHOS/AliHLTPHOSSanityInspector.h b/HLT/PHOS/AliHLTPHOSSanityInspector.h index cad2037fdd4..3f8eb8b5929 100644 --- a/HLT/PHOS/AliHLTPHOSSanityInspector.h +++ b/HLT/PHOS/AliHLTPHOSSanityInspector.h @@ -17,25 +17,17 @@ #define ALIHLTPHOSSANITYINSPECTOR_H #include "AliHLTPHOSBase.h" -//#include "AliHLTAltroData.h" #include "Rtypes.h" -class AliHLTAltroData; - class AliHLTPHOSSanityInspector : public AliHLTPHOSBase { public: AliHLTPHOSSanityInspector(); - virtual ~AliHLTPHOSSanityInspector(); - - Int_t CheckInsanity(UInt_t* data, Int_t nSamples); - Int_t CheckInsanity(Int_t* data, Int_t nSamples); - + const Int_t CheckInsanity(const UInt_t* data, const Int_t nSamples) const; Int_t CheckAndHealInsanity(UInt_t* data, Int_t nSamples); //Not completely reliable Int_t CheckAndHealInsanity(Int_t* data, Int_t nSamples); //Not completely reliable - void SetMaxDifference(Int_t maxDiff) { fMaxDifference = maxDiff; } private: diff --git a/HLT/PHOS/AliHLTPHOSTreeMaker.cxx b/HLT/PHOS/AliHLTPHOSTreeMaker.cxx index fd99f42c1d8..384591d8b22 100644 --- a/HLT/PHOS/AliHLTPHOSTreeMaker.cxx +++ b/HLT/PHOS/AliHLTPHOSTreeMaker.cxx @@ -25,6 +25,8 @@ ClassImp(AliHLTPHOSTreeMaker); + + AliHLTPHOSTreeMaker::AliHLTPHOSTreeMaker() : AliHLTPHOSBase(), fDigitArrayPtr(0), @@ -38,8 +40,10 @@ AliHLTPHOSTreeMaker::AliHLTPHOSTreeMaker() : } + AliHLTPHOSTreeMaker::~AliHLTPHOSTreeMaker() { + } Int_t diff --git a/HLT/PHOS/AliHLTPHOSTreeMaker.h b/HLT/PHOS/AliHLTPHOSTreeMaker.h index 4ed127ab9a9..37e11fa0eb7 100644 --- a/HLT/PHOS/AliHLTPHOSTreeMaker.h +++ b/HLT/PHOS/AliHLTPHOSTreeMaker.h @@ -34,6 +34,7 @@ public: Int_t MakeDigitArray(AliHLTPHOSDigitContainerDataStruct* digitContainer, Int_t nDigits); + void FillDigitTree(); void ResetDigitTree() { fDigitTreePtr->Reset(); } diff --git a/HLT/PHOS/AliHLTPHOSTreeMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSTreeMakerComponent.cxx index 1abbf6b4f2b..29851332fbb 100644 --- a/HLT/PHOS/AliHLTPHOSTreeMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSTreeMakerComponent.cxx @@ -34,7 +34,7 @@ AliHLTPHOSTreeMakerComponent gAliHLTPHOSTreeMakerComponent; AliHLTPHOSTreeMakerComponent::AliHLTPHOSTreeMakerComponent() : AliHLTPHOSProcessor(), fDigitTreePtr(0), - fEventCount(0), + // fEventCount(0), fWriteInterval(1000) { //comment @@ -51,7 +51,13 @@ AliHLTPHOSTreeMakerComponent::Deinit() //comment cout << "Printing file..."; char filename [50]; - sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval)); + + // sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval)); + + // sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNumber,(fEventCount/fWriteInterval)); + sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNumber,(fPhosEventCount/fWriteInterval)); + + TFile *outfile = new TFile(filename,"recreate"); fDigitTreePtr->Write(); delete outfile; @@ -134,10 +140,12 @@ AliHLTPHOSTreeMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, c // } } - fEventCount++; + + fPhosEventCount++; + fTreeMakerPtr->FillDigitTree(); - if(fEventCount%fWriteInterval == 0) + if( (fPhosEventCount%fWriteInterval == 0 ) && (fPhosEventCount != 0)) { Write(); ResetTrees(); @@ -168,18 +176,9 @@ AliHLTPHOSTreeMakerComponent::DoInit ( int argc, const char** argv ) } fTreeMakerPtr->SetDigitTree(fDigitTreePtr); - - fstream runNbFile; - //Int_t newRunNb; - runNbFile.open("/opt/HLT-public/rundir/runNumber.txt"); - runNbFile >> fRunNb; - runNbFile.close(); - /* newRunNb = fRunNb + 1; - runNbFile.open("/opt/HLT-public/rundir/runNumber.txt"); - runNbFile << newRunNb; - runNbFile.close();*/ - - cout << endl << "Run number is: " << fRunNb << " -- Check that this is correct!!!\n"; + cout << endl << "Run number is: " << fRunNumber << " -- Check that this is correct!!!\n" << endl; + + // fRunNumber return 0; @@ -199,7 +198,9 @@ AliHLTPHOSTreeMakerComponent::Write() //comment cout << "Writing file..."; char filename [256]; - sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1)); + // sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNb,(fEventCount/fWriteInterval - 1)); + sprintf(filename, "%s/run%d_digitTree_%d.root", fDirectory, fRunNumber,(fPhosEventCount/fWriteInterval - 1)); + TFile *outfile = new TFile(filename,"recreate"); fDigitTreePtr->Write(); delete outfile; diff --git a/HLT/PHOS/AliHLTPHOSTreeMakerComponent.h b/HLT/PHOS/AliHLTPHOSTreeMakerComponent.h index 66a655a599b..2b1878e1a88 100644 --- a/HLT/PHOS/AliHLTPHOSTreeMakerComponent.h +++ b/HLT/PHOS/AliHLTPHOSTreeMakerComponent.h @@ -62,9 +62,9 @@ class AliHLTPHOSTreeMakerComponent : public AliHLTPHOSProcessor private: AliHLTPHOSTreeMaker *fTreeMakerPtr; //comment TTree *fDigitTreePtr; //comment - UInt_t fEventCount; //comment + // UInt_t fEventCount; //comment UInt_t fWriteInterval; //comment - UInt_t fRunNb; //comment + // UInt_t fRunNb; //comment char *fDirectory; //comment static const AliHLTComponentDataType fgkInputDataTypes[]; //HLT input data type diff --git a/HLT/PHOS/Makefile b/HLT/PHOS/Makefile index bba70913178..2ed03d37891 100755 --- a/HLT/PHOS/Makefile +++ b/HLT/PHOS/Makefile @@ -1,9 +1,22 @@ include Makefile.arch +ROOTLIBS = `root-config --libs` -lVMC -lGeom -lEG +ALIROOTLIBS = -L$(ALICE_ROOT)/lib/tgt_linux -lESD -lRAWDatarec -lRAWDatabase -lSTEERBase -MAINO = testDecoder.$(ObjSuf) AliHLTAltroData.$(ObjSuf) AliHLTAltroBunch.$(ObjSuf) AliHLTDDLDecoder.$(ObjSuf) -MAINS = testDecoder.$(SrcSuf) AliHLTAltroData.$(SrcSuf) AliHLTAltroBunch.$(SrcSuf) AliHLTDDLDecoder.$(SrcSuf) +#LIBS = $(LIBS) $(ROOTLIBS) $(ALIROOTLIBS) +LIBS = $(ROOTLIBS) $(ALIROOTLIBS) + +ROOTINCLUDE = -I$(ROOTSYS)/include +ALIROOTINCLUDE = -I$(ALICE_ROOT)/include -I$(ALICE_ROOT)/RAW +INCLUDES = $(ROOTINCLUDE) $(ALIROOTINCLUDE) + +#MAINO = testDecoder.$(ObjSuf) AliHLTAltroData.$(ObjSuf) AliHLTAltroBunch.$(ObjSuf) AliHLTDDLDecoder.$(ObjSuf) +#MAINS = testDecoder.$(SrcSuf) AliHLTAltroData.$(SrcSuf) AliHLTAltroBunch.$(SrcSuf) AliHLTDDLDecoder.$(SrcSuf) + + +MAINO = testDecoder.$(ObjSuf) +MAINS = testDecoder.$(SrcSuf) MAIN = testDecoder$(ExeSuf) @@ -18,7 +31,7 @@ all: $(PROGRAMS) $(MAIN): $(MAINO) - $(LD) $(LDFLAGS) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN) + $(LD) $(LDFLAGS) $(INCLUDES) $^ $(LIBS) $(GLIBS) -lTreePlayer -lMathCore -lThread -lpthread $(OutPutOpt)$(MAIN) @echo "$@ done" @@ -34,10 +47,12 @@ distclean: clean -@cd RootShower && $(MAKE) distclean .SUFFIXES: .$(SrcSuf) - -AliHLTAltroData.$(ObjSuf): AliHLTAltroData.h -AliHLTDDLDecoder.$(ObjSuf): AliHLTDDLDecoder.h -testDecoder.$(ObjSuf): AliHLTAltroData.h AliHLTDDLDecoder.h + + +#AliHLTAltroData.$(ObjSuf): AliHLTAltroData.h +#AliHLTDDLDecoder.$(ObjSuf): AliHLTDDLDecoder.h +#testDecoder.$(ObjSuf): AliHLTAltroData.h AliHLTDDLDecoder.h +testDecoder.$(ObjSuf): .$(SrcSuf).$(ObjSuf): - $(CXX) $(CXXFLAGS) -c $< + $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< diff --git a/HLT/PHOS/OnlineDisplay/Makefile b/HLT/PHOS/OnlineDisplay/Makefile index 1be3ef0752d..ea2380304da 100755 --- a/HLT/PHOS/OnlineDisplay/Makefile +++ b/HLT/PHOS/OnlineDisplay/Makefile @@ -9,6 +9,7 @@ HeadSuf = h # -lGeom -lGpad -lGraf -lGuiBld -lGui -lMatrix\ # -lRint -lRootAuth -lThread -lVMC + ROOTLIBS = `root-config --libs --glibs` ###ALIROOTLIBS = -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) -lESD -lSTEER -lRAWDatarec -lRAWDatabase @@ -17,7 +18,8 @@ ALIROOTLIBS = -L$(ALIHLT_TOPDIR)/build/lib -lHLTbase -lAliHLTPHOS -L$(ALICE_R #HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-x86_64-debug -lHOMER #HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-i686/ -lHOMER -HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-x86_64-debug -lHOMER +#HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-x86_64-debug -lHOMER +HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-i686-debug -lHOMER HOMERINCLUDE =$(ALIHLT_DC_DIR)/src/Util/HOMER/include diff --git a/HLT/PHOS/hltAltroConfig.txt b/HLT/PHOS/hltAltroConfig.txt index 5d741a466d6..bf9c182a72d 100644 --- a/HLT/PHOS/hltAltroConfig.txt +++ b/HLT/PHOS/hltAltroConfig.txt @@ -1,3 +1,3 @@ -N_SAMPLES 55 +N_SAMPLES 125 N_PRE_SAMPLES 15 diff --git a/HLT/PHOS/testDecoder.cxx b/HLT/PHOS/testDecoder.cxx index 8e337a5aae9..c88258c720f 100644 --- a/HLT/PHOS/testDecoder.cxx +++ b/HLT/PHOS/testDecoder.cxx @@ -1,7 +1,7 @@ +#include "AliAltroDecoder.h" // decoder for altro payload +#include "AliAltroData.h" // container for altro payload +#include "AliAltroBunch.h" // container for altro bunches -#include "AliHLTDDLDecoder.h" - -#include "AliHLTAltroData.h" #include "Rtypes.h" #include #include @@ -10,6 +10,7 @@ #include #include "stdio.h" +#define MIN_BUNCH_SIZE 0 using namespace std; @@ -22,13 +23,13 @@ int main(int argc, const char** argv) clock_t start; clock_t end; - AliHLTAltroData altrodata; - AliHLTAltroBunch *altrobunchPtr = new AliHLTAltroBunch; + AliAltroData altrodata; + AliAltroBunch *altrobunchPtr = new AliAltroBunch; ifstream fin; int length; - AliHLTDDLDecoder *decoder = new AliHLTDDLDecoder(); + AliAltroDecoder *decoder = new AliAltroDecoder(); fin.open(argv[1], ios::binary); @@ -55,30 +56,35 @@ int main(int argc, const char** argv) while(decoder->NextChannel(&altrodata) == true && channelCnt < 10) { channelCnt ++; - decoder->PrintInfo(altrodata, altrodata.fDataSize +4); - - if( altrodata.fDataSize != 0 ) + + // decoder->PrintInfo(altrodata, altrodata.GetDataSize() +4); + + if( altrodata.GetDataSize() != 0 ) { cnt = 0; while( altrodata.NextBunch(altrobunchPtr) == true) { - printf("\n"); + // printf("\n"); - if(cnt < 5) + if(altrobunchPtr->GetBunchSize() > MIN_BUNCH_SIZE) { printf("\n"); cout <<"cnt = "<< cnt <fData[i]); + + // printf("%d\t", altrobunchPtr->fData[i]); + printf("%d\t", (altrobunchPtr->GetData())[i]); + } printf("\n\n");