From 1f4ce44eaeb7e4b18da82f2bbc064233a3167fdc Mon Sep 17 00:00:00 2001 From: rpreghen Date: Thu, 28 Oct 2010 12:45:01 +0000 Subject: [PATCH] changes are needed in order to implement the code to be used in the TRIGGER PreProcessor which will store in the OCDB a new object containing the relevant information about TOF trigger status for each run --- TOF/AliTOFFEEReader.cxx | 26 +++++ TOF/AliTOFFEEReader.h | 9 +- TOF/AliTOFFEElightConfig.h | 23 +++++ TOF/AliTOFPreprocessor.cxx | 4 +- TOF/AliTOFTriggerMask.cxx | 95 ++++++++++++++++++ TOF/AliTOFTriggerMask.h | 44 ++++++++ TOF/CMakelibTOFbase.pkg | 17 +++- .../TOFFEElight.20101028.133932.8000 | Bin 0 -> 2073900 bytes TOF/TOFPreprocessor.C | 2 +- TOF/TOFbaseLinkDef.h | 1 + TOF/libTOFbase.pkg | 3 +- 11 files changed, 217 insertions(+), 7 deletions(-) create mode 100644 TOF/AliTOFTriggerMask.cxx create mode 100644 TOF/AliTOFTriggerMask.h create mode 100644 TOF/ShuttleInput/TOFFEElight.20101028.133932.8000 diff --git a/TOF/AliTOFFEEReader.cxx b/TOF/AliTOFFEEReader.cxx index c8fd0b8798b..d414252e548 100644 --- a/TOF/AliTOFFEEReader.cxx +++ b/TOF/AliTOFFEEReader.cxx @@ -121,6 +121,21 @@ AliTOFFEEReader::ResetChannelEnabledArray() //_______________________________________________________________ +void +AliTOFFEEReader::ResetTriggerMaskArray() +{ + /* + * + * reset trigger mask array + * + */ + + for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++) + fTriggerMask[iddl] = 0x0; +} + +//_______________________________________________________________ + void AliTOFFEEReader::Reset() { @@ -135,6 +150,9 @@ AliTOFFEEReader::Reset() fMatchingWindow[iIndex] = 0; fLatencyWindow[iIndex] = 0; } + + for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++) + fTriggerMask[iddl] = 0x0; } //_______________________________________________________________ @@ -244,6 +262,8 @@ AliTOFFEEReader::ParseFEElightConfig() AliInfo("parsing TOF FEElight config"); + Reset(); + AliTOFcalibHisto calibHisto; calibHisto.LoadCalibHisto(); @@ -260,6 +280,12 @@ AliTOFFEEReader::ParseFEElightConfig() fMatchingWindow[index] = channelConfig->GetMatchingWindow(); fLatencyWindow[index] = channelConfig->GetLatencyWindow(); } + + AliTOFFEEtriggerConfig *triggerConfig = NULL; + for (Int_t iddl = 0; iddl < GetNumberOfDDLs(); iddl++) { + triggerConfig = fFEElightConfig->GetTriggerConfig(iddl); + fTriggerMask[iddl] = triggerConfig->GetStatusMap(); + } return nEnabled; } diff --git a/TOF/AliTOFFEEReader.h b/TOF/AliTOFFEEReader.h index 4cf6cbc0d47..c071227a95f 100644 --- a/TOF/AliTOFFEEReader.h +++ b/TOF/AliTOFFEEReader.h @@ -44,7 +44,9 @@ public TObject Bool_t GetChannelEnabled(Int_t iIndex) const {return iIndex < GetNumberOfIndexes() ? fChannelEnabled[iIndex] : kFALSE;}; // get channel enabled Int_t GetMatchingWindow(Int_t iIndex) const {return iIndex < GetNumberOfIndexes() ? fMatchingWindow[iIndex] : 0;}; // get matching window Int_t GetLatencyWindow(Int_t iIndex) const {return iIndex < GetNumberOfIndexes() ? fLatencyWindow[iIndex] : 0;}; // get latency window - + UInt_t GetTriggerMask(Int_t iddl) const {return iddl < GetNumberOfDDLs() ? fTriggerMask[iddl] : 0;}; // get trigger mask + UInt_t *GetTriggerMaskArray() {return fTriggerMask;}; // get trigger mask array + /* setters */ /* methods */ @@ -60,6 +62,7 @@ public TObject Int_t ParseFEElightConfig(); // parse FEElight config void ResetChannelEnabledArray(); // reset channel enabled array + void ResetTriggerMaskArray(); // reset trigger mask array void Reset(); // reset channel enabled array Bool_t IsChannelEnabled(Int_t iIndex) const {return GetChannelEnabled(iIndex);}; // is channel enabled @@ -83,7 +86,9 @@ public TObject Int_t fMatchingWindow[fgkNumberOfIndexes]; // matching window Int_t fLatencyWindow[fgkNumberOfIndexes]; // matching window - ClassDef(AliTOFFEEReader, 1); + UInt_t fTriggerMask[fgkNumberOfDDLs]; // trigger mask + + ClassDef(AliTOFFEEReader, 2); }; diff --git a/TOF/AliTOFFEElightConfig.h b/TOF/AliTOFFEElightConfig.h index 9ae1e3f61ac..946d53ba290 100644 --- a/TOF/AliTOFFEElightConfig.h +++ b/TOF/AliTOFFEElightConfig.h @@ -46,15 +46,37 @@ class AliTOFFEEchannelConfig //_____________________________________________________________________________ +class AliTOFFEEtriggerConfig +{ + + public: + + private: + UInt_t fStatusMap; // status + + public: + AliTOFFEEtriggerConfig() : fStatusMap(0x0) {}; // default construct + ~AliTOFFEEtriggerConfig() {}; // default destructor + + UInt_t GetStatusMap() const {return fStatusMap;}; // get status map + + void SetStatusMap(UInt_t value) {fStatusMap = value;}; // set status map + +}; + +//_____________________________________________________________________________ + class AliTOFFEElightConfig { private: static const Int_t fgkNumberOfChannels = 172800; // number of channels + static const Int_t fgkNumberOfTriggerMaps = 72; // number of trigger maps Int_t fVersion; // version Int_t fRunNumber; // run number Int_t fRunType; // run type AliTOFFEEchannelConfig fChannelConfig[fgkNumberOfChannels]; // channel config array + AliTOFFEEtriggerConfig fTriggerConfig[fgkNumberOfTriggerMaps]; // trigger config array public: AliTOFFEElightConfig() : fVersion(0), fRunNumber(0), fRunType(0), fChannelConfig() {}; // default construct @@ -64,6 +86,7 @@ class AliTOFFEElightConfig Int_t GetRunNumber() const {return fRunNumber;}; // get run number Int_t GetRunType() const {return fRunType;}; // get run type AliTOFFEEchannelConfig *GetChannelConfig(Int_t i) {return (i < fgkNumberOfChannels ? &fChannelConfig[i] : NULL);}; // get channel config + AliTOFFEEtriggerConfig *GetTriggerConfig(Int_t i) {return (i < fgkNumberOfTriggerMaps ? &fTriggerConfig[i] : NULL);}; // get trigger config void SetVersion(Int_t value) {fVersion = value;}; // get version void SetRunNumber(Int_t value) {fRunNumber = value;}; // get run number diff --git a/TOF/AliTOFPreprocessor.cxx b/TOF/AliTOFPreprocessor.cxx index d118074a761..5d85c696bc5 100644 --- a/TOF/AliTOFPreprocessor.cxx +++ b/TOF/AliTOFPreprocessor.cxx @@ -1830,10 +1830,10 @@ UInt_t AliTOFPreprocessor::Process(TMap *dcsAliasMap) // Int_t iresultDAQ = ProcessOnlineDelays(); Int_t iresultDAQ = ProcessT0Fill(); Int_t iresultNoiseCalib = ProcessNoiseCalibTrg(); - // Int_t iresultReadout = ProcessReadout(); + Int_t iresultReadout = ProcessReadout(); Int_t iresultDCS = ProcessDCSDataPoints(dcsAliasMap); Int_t iResultHVandLVdps = ProcessHVandLVdps(dcsAliasMap); - return iresultDAQ+iresultNoiseCalib+iresultDCS+iResultHVandLVdps; + return iresultDAQ+iresultNoiseCalib+iresultDCS+iResultHVandLVdps+iresultReadout; } // storing diff --git a/TOF/AliTOFTriggerMask.cxx b/TOF/AliTOFTriggerMask.cxx new file mode 100644 index 00000000000..9f5f4a03b53 --- /dev/null +++ b/TOF/AliTOFTriggerMask.cxx @@ -0,0 +1,95 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line 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. * + **************************************************************************/ + +// * +// * +// * +// * this class defines the TOF object to be stored +// * in OCDB on a run-by-run basis in order to have the status +// * of TOF trigger inputs. it stores 32 bit masks for each crate +// * +// * +// * +// * + +#include "AliTOFTriggerMask.h" + +ClassImp(AliTOFTriggerMask) + +//_________________________________________________________ + +AliTOFTriggerMask::AliTOFTriggerMask() : + TObject(), + fTriggerMask() +{ + /* + * default constructor + */ + + for (Int_t iddl = 0; iddl < 72; iddl++) fTriggerMask[iddl] = 0; +} + +//_________________________________________________________ + +AliTOFTriggerMask::~AliTOFTriggerMask() +{ + /* + * default destructor + */ + +} + +//_________________________________________________________ + +AliTOFTriggerMask::AliTOFTriggerMask(const AliTOFTriggerMask &source) : + TObject(source), + fTriggerMask() +{ + /* + * copy constructor + */ + + for (Int_t iddl = 0; iddl < 72; iddl++) fTriggerMask[iddl] = source.fTriggerMask[iddl]; +} + +//_________________________________________________________ + +AliTOFTriggerMask & +AliTOFTriggerMask::operator=(const AliTOFTriggerMask &source) +{ + /* + * operator= + */ + + if (this == &source) return *this; + TObject::operator=(source); + + for (Int_t iddl = 0; iddl < 72; iddl++) fTriggerMask[iddl] = source.fTriggerMask[iddl]; + + return *this; +} + +//_________________________________________________________ + +void +AliTOFTriggerMask::SetTriggerMaskArray(UInt_t *array) +{ + /* + * set trigger mask array + */ + + for (Int_t iddl = 0; iddl < 72; iddl++) fTriggerMask[iddl] = array[iddl]; +} + diff --git a/TOF/AliTOFTriggerMask.h b/TOF/AliTOFTriggerMask.h new file mode 100644 index 00000000000..ff980f5ecf4 --- /dev/null +++ b/TOF/AliTOFTriggerMask.h @@ -0,0 +1,44 @@ +#ifndef ALITOFTRIGGERMASK_H +#define ALITOFTRIGGERMASK_H + +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ +/* $Id$ */ + +// * +// * +// * +// * this class defines the TOF object to be stored +// * in OCDB on a run-by-run basis in order to have the status +// * of TOF trigger inputs. it stores 32 bit masks for each crate +// * +// * +// * +// * + +#include "TObject.h" + +class AliTOFTriggerMask : +public TObject +{ + + public: + + AliTOFTriggerMask(); // default constructor + virtual ~AliTOFTriggerMask(); // default destructor + AliTOFTriggerMask(const AliTOFTriggerMask &source); // copy constructor + AliTOFTriggerMask &operator=(const AliTOFTriggerMask &source); // operator= + + UInt_t GetTriggerMask(UInt_t icrate) const {return icrate < 72 ? fTriggerMask[icrate] : 0;}; // get trigger mask + UInt_t *GetTriggerMaskArray() {return fTriggerMask;}; // get trigger mask array + + void SetTriggerMaskArray(UInt_t *array); // set trigger mask array + + private: + + UInt_t fTriggerMask[72]; // trigger mask array + + ClassDef(AliTOFTriggerMask, 1); +}; + +#endif /* ALITOFTRIGGERMASK_H */ diff --git a/TOF/CMakelibTOFbase.pkg b/TOF/CMakelibTOFbase.pkg index e6183a009eb..1ba24a8e987 100644 --- a/TOF/CMakelibTOFbase.pkg +++ b/TOF/CMakelibTOFbase.pkg @@ -25,7 +25,22 @@ # SHLIBS - Shared Libraries and objects for linking (Executables only) # #--------------------------------------------------------------------------------# -set ( SRCS AliTOFGeometry.cxx AliTOFdigit.cxx AliTOFDigitMap.cxx AliTOFRawMap.cxx AliTOFrawData.cxx AliTOFRawStream.cxx AliTOFHitData.cxx AliTOFHitField.cxx AliTOFHitDataBuffer.cxx AliTOFDecoder.cxx AliTOFChannelOffline.cxx AliTOFChannelOnline.cxx AliTOFChannelOnlineStatus.cxx AliTOFChannelOnlineArray.cxx AliTOFChannelOnlineStatusArray.cxx AliTOFcalib.cxx AliTOFAlignment.cxx AliTOFPreprocessor.cxx AliTOFDataDCS.cxx AliTOFFormatDCS.cxx AliTOFPreprocessorFDR.cxx AliTOFFEEReader.cxx AliTOFFEEDump.cxx AliTOFCableLengthMap.cxx AliTOFNoiseConfigHandler.cxx AliTOFcalibHisto.cxx AliTOFArray.cxx AliTOFDaConfigHandler.cxx AliTOFDeltaBCOffset.cxx AliTOFCTPLatency.cxx AliTOFT0Fill.cxx AliTOFRunParams.cxx AliTOFResponseParams.cxx AliTOFT0FillOnlineCalib.cxx AliTOFLvHvDataPoints.cxx AliTOFDCSmaps.cxx AliTOFChainSummaryData.cxx AliTOFDRMSummaryData.cxx AliTOFDecoderSummaryData.cxx AliTOFLTMSummaryData.cxx AliTOFTRMSummaryData.cxx AliTOFDecoderV2.cxx AliTOFTDCError.cxx AliTOFTDCErrorBuffer.cxx AliTOFTDCHit.cxx AliTOFTDCHitBuffer.cxx AliTOFReadoutInfo.cxx) +set ( SRCS AliTOFGeometry.cxx AliTOFdigit.cxx AliTOFDigitMap.cxx +AliTOFRawMap.cxx AliTOFrawData.cxx AliTOFRawStream.cxx AliTOFHitData.cxx +AliTOFHitField.cxx AliTOFHitDataBuffer.cxx AliTOFDecoder.cxx +AliTOFChannelOffline.cxx AliTOFChannelOnline.cxx AliTOFChannelOnlineStatus.cxx +AliTOFChannelOnlineArray.cxx AliTOFChannelOnlineStatusArray.cxx +AliTOFcalib.cxx AliTOFAlignment.cxx AliTOFPreprocessor.cxx AliTOFDataDCS.cxx +AliTOFFormatDCS.cxx AliTOFPreprocessorFDR.cxx AliTOFFEEReader.cxx +AliTOFFEEDump.cxx AliTOFCableLengthMap.cxx AliTOFNoiseConfigHandler.cxx +AliTOFcalibHisto.cxx AliTOFArray.cxx AliTOFDaConfigHandler.cxx +AliTOFDeltaBCOffset.cxx AliTOFCTPLatency.cxx AliTOFT0Fill.cxx +AliTOFRunParams.cxx AliTOFResponseParams.cxx AliTOFT0FillOnlineCalib.cxx +AliTOFLvHvDataPoints.cxx AliTOFDCSmaps.cxx AliTOFChainSummaryData.cxx +AliTOFDRMSummaryData.cxx AliTOFDecoderSummaryData.cxx AliTOFLTMSummaryData.cxx +AliTOFTRMSummaryData.cxx AliTOFDecoderV2.cxx AliTOFTDCError.cxx +AliTOFTDCErrorBuffer.cxx AliTOFTDCHit.cxx AliTOFTDCHitBuffer.cxx +AliTOFReadoutInfo.cxx AliTOFTriggerMask.cxx) string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" ) diff --git a/TOF/ShuttleInput/TOFFEElight.20101028.133932.8000 b/TOF/ShuttleInput/TOFFEElight.20101028.133932.8000 new file mode 100644 index 0000000000000000000000000000000000000000..6dc0ff3d37f4b76e3d58adcb732a433ed953342c GIT binary patch literal 2073900 zcmeI*Z-`}O0mtz(ldY>@gAlp|>BWV5)zS*O1u2QE_GhD*&1EP-rgdt!7F-;+A_C1< z3U1UJv$PQ<)7-@{lWbgD#B|#izR=PjR5U89cNGiTAGU$wIlsku#(TThnR~mRKzcYn z=ildk@44sPnRO?crupF6O*66d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Dn{R8^eMcNa?)Q$E|77ed=hVhuk8{uMjMG2LIfY&nCIwsdz4X|DpETCzpR)sd7JGng9{eH~<&B^UC$_GC8$0dw=kDm?f@m-2s8KwB)0$480WqwW8GX{8^5K;`L*r* zzb@Yx-vb|x@dM#s`~LsEo7&$|Ic0WF=|3CZv+L@z{HFLlob=53x!=5>eC?NQ|2hA% zO3&F??(6Z`PA<>;$$ZadpLy?>$B@hOelkB7a$mX4WAUAN&Z&)GJ^774v+{Uy{MX!9 zyf1Q2ZNDchk9F5o{Ex(EWxf{gjQfpzzdsng<-T&xrPCiTEnPHyQ5jEP(kbKjY};DK zpZxHSGH#lkWxRE^{T-_9d)sb5ws}jL(`nkzh&-NN$3L!|*J5RP9^1KbuX4hEx3mr9 z=fd;fYM1{ruHm_EcKc+!-yfN5%h)FhBE8?eA5dAKR&&OK$UIHYs#>#oI<%D(dT>ZbpPqw{=^ux|4D4 zJEH$Q-*evDKEE7__vXQ8+WWoNVw~I0@wTlOmnL(0H{;8@*nT(L8Rj{s$7fCLb9NYx zKihsZde|M;g#5DxU%P$z>)7qFy!L(3zPPsJxEqIVuAjM`{qdbuF3AddInputFile(AliTestShuttle::kDAQ, "TOF", "READOUT", "MON", "$ALICE_ROOT/TOF/ShuttleInput/Readout.root"); shuttle->AddInputFile(AliTestShuttle::kDAQ, "TOF", "DELAYS", "MON", "$ALICE_ROOT/TOF/ShuttleInput/Total.root"); shuttle->AddInputFile(AliTestShuttle::kDAQ, "TOF", "RUNLevel", "MON", "$ALICE_ROOT/TOF/ShuttleInput/Partial.root"); - shuttle->AddInputFile(AliTestShuttle::kDCS, "TOF", "TofFeeLightMap", "", "$ALICE_ROOT/TOF/ShuttleInput/TOFFEElight.20090616.102605.8000"); + shuttle->AddInputFile(AliTestShuttle::kDCS, "TOF", "TofFeeLightMap", "", "$ALICE_ROOT/TOF/ShuttleInput/TOFFEElight.20101028.133932.8000"); shuttle->AddInputFile(AliTestShuttle::kDCS, "TOF", "TofFeeMap", "", "$ALICE_ROOT/TOF/ShuttleInput/TOFFEE.20091217.194708.105517"); TString filename; diff --git a/TOF/TOFbaseLinkDef.h b/TOF/TOFbaseLinkDef.h index 87c2d6d45b9..f6b4fb5f76c 100644 --- a/TOF/TOFbaseLinkDef.h +++ b/TOF/TOFbaseLinkDef.h @@ -57,6 +57,7 @@ #pragma link C++ class AliTOFTDCHitBuffer+; #pragma link C++ class AliTOFReadoutInfo+; +#pragma link C++ class AliTOFTriggerMask+; #endif diff --git a/TOF/libTOFbase.pkg b/TOF/libTOFbase.pkg index 3ae84130062..7aaa99259a8 100644 --- a/TOF/libTOFbase.pkg +++ b/TOF/libTOFbase.pkg @@ -47,7 +47,8 @@ SRCS = AliTOFGeometry.cxx \ AliTOFTDCErrorBuffer.cxx\ AliTOFTDCHit.cxx\ AliTOFTDCHitBuffer.cxx\ - AliTOFReadoutInfo.cxx + AliTOFReadoutInfo.cxx\ + AliTOFTriggerMask.cxx HDRS:= $(SRCS:.cxx=.h) -- 2.43.0