From 4a2eec96f5fc1812a8af07cbc3e212e3f01fc7e6 Mon Sep 17 00:00:00 2001 From: cblume Date: Sun, 21 Nov 2010 11:00:39 +0000 Subject: [PATCH 1/1] Introduce smaller AliTRDCalDCSFEEv2 object (Frederick) --- .../TRD/Calib/DCSv2/Run0_999999999_v0_s0.root | Bin 0 -> 78097 bytes TRD/AliTRDCalibChamberStatus.cxx | 18 +- TRD/AliTRDCalibChamberStatus.h | 8 +- TRD/AliTRDCalibViewer.cxx | 18 +- TRD/AliTRDPreprocessor.cxx | 12 +- TRD/AliTRDPreprocessor.h | 8 +- TRD/AliTRDSaxHandler.cxx | 10 +- TRD/AliTRDSaxHandler.h | 81 +- TRD/AliTRDcalibDB.cxx | 101 +- TRD/CMakelibTRDbase.pkg | 2 +- TRD/Cal/AliTRDCalDCSFEEv2.cxx | 147 +++ TRD/Cal/AliTRDCalDCSFEEv2.h | 141 +++ TRD/Macros/AliTRDcheckConfigv2.C | 359 ++++++ TRD/Macros/DumpOCDBtoTreev2.C | 1005 +++++++++++++++++ TRD/TRDbaseLinkDef.h | 2 + TRD/libTRDbase.pkg | 2 + 16 files changed, 1808 insertions(+), 106 deletions(-) create mode 100644 OCDB/TRD/Calib/DCSv2/Run0_999999999_v0_s0.root create mode 100644 TRD/Cal/AliTRDCalDCSFEEv2.cxx create mode 100644 TRD/Cal/AliTRDCalDCSFEEv2.h create mode 100644 TRD/Macros/AliTRDcheckConfigv2.C create mode 100644 TRD/Macros/DumpOCDBtoTreev2.C diff --git a/OCDB/TRD/Calib/DCSv2/Run0_999999999_v0_s0.root b/OCDB/TRD/Calib/DCSv2/Run0_999999999_v0_s0.root new file mode 100644 index 0000000000000000000000000000000000000000..f8b2710004f51c516b8604245c7bb48cfd8e8d37 GIT binary patch literal 78097 zcmeFad0fp~7e8JJA!JM_;S!QkGBh4C50$A>8iETX{;p;;=LamkdE zP)LKZk`kTf>9;?hdydcAeb49lemft3{a*KZz3%gP+;jF>drj}P)?Rzn`O@JGNPGRi3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=&B-DVlX6Y491Q&||nZ zWk~$^%?;VogT+l36>_GNBWrvnrtJ;pTN>jTN^L+;&~hcj6@aMuErFNsN>g$1AK?ps z&XI5C?WgKYS;yu3tQw6wJS3FA2a5Kc{sW5q_COJIGetCalDCSFEEObj(det); + AliTRDCalDCSFEEv2* calDCSFEEEOR = calDCS->GetCalDCSFEEObj(det); if(!calDCSFEEEOR) continue; @@ -603,7 +603,7 @@ TH2D* AliTRDCalibChamberStatus::PlotSparseI(Int_t sm,Int_t side) } //_____________________________________________________________________ -TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCS *calDCS, Int_t sm, Int_t pl) /*FOLD00*/ +TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl) /*FOLD00*/ { // // Plot globale state of the HalfChamberMerger (HCM) @@ -629,7 +629,7 @@ TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCS *calDCS, I for (Int_t k = 0; k < nstack; k++){ Int_t det = offsetsmpl+k*6; Int_t stac = AliTRDgeometry::GetStack(det); - AliTRDCalDCSFEE* calDCSFEEEOR = calDCS->GetCalDCSFEEObj(det); + AliTRDCalDCSFEEv2* calDCSFEEEOR = calDCS->GetCalDCSFEEObj(det); if(!calDCSFEEEOR) { continue;} for (Int_t icol=0; icolGet("TRD/Calib/DCS"); + entry = manager->Get("TRD/Calib/DCSv2"); if(entry) { entry->SetOwner(kTRUE); dcsArray = (TObjArray*)entry->GetObject(); } } - AliTRDCalDCS *dcsSOR = 0; - AliTRDCalDCS *dcsEOR = 0; + AliTRDCalDCSv2 *dcsSOR = 0; + AliTRDCalDCSv2 *dcsEOR = 0; if(getDCS && dcsArray) { - dcsSOR = (AliTRDCalDCS*)dcsArray->At(0); - dcsEOR = (AliTRDCalDCS*)dcsArray->At(1); + dcsSOR = (AliTRDCalDCSv2*)dcsArray->At(0); + dcsEOR = (AliTRDCalDCSv2*)dcsArray->At(1); } // Alignment information @@ -1042,8 +1042,8 @@ Bool_t AliTRDCalibViewer::DumpOCDBtoTreeDetails(const Char_t* runListFilename, } // end if(getCalibs) // get the dcs information - AliTRDCalDCSFEE *dcsfeeSOR = 0; - AliTRDCalDCSFEE *dcsfeeEOR = 0; + AliTRDCalDCSFEEv2 *dcsfeeSOR = 0; + AliTRDCalDCSFEEv2 *dcsfeeEOR = 0; if(getDCS) { if(dcsSOR) dcsfeeSOR = dcsSOR->GetCalDCSFEEObj(chamberNo); if(dcsEOR) dcsfeeEOR = dcsEOR->GetCalDCSFEEObj(chamberNo); diff --git a/TRD/AliTRDPreprocessor.cxx b/TRD/AliTRDPreprocessor.cxx index 8170ffe04b1..5ce56f24372 100644 --- a/TRD/AliTRDPreprocessor.cxx +++ b/TRD/AliTRDPreprocessor.cxx @@ -55,7 +55,7 @@ #include "AliTRDCalibChamberStatus.h" #include "Cal/AliTRDCalPad.h" #include "Cal/AliTRDCalPadStatus.h" -#include "Cal/AliTRDCalDCS.h" +#include "Cal/AliTRDCalDCSv2.h" #include "Cal/AliTRDCalSingleChamberStatus.h" #include "Cal/AliTRDCalChamberStatus.h" #include "Cal/AliTRDCalROC.h" @@ -377,7 +377,7 @@ Bool_t AliTRDPreprocessor::ExtractHalfChamberStatusDAQ() if(calPed) { //calPed->AnalyseHisto(); // check number of events, create calHalfChamberStatus (done on DAQ) if(fCalDCSObjEOR) { - calPed->CheckEORStatus((AliTRDCalDCS *)fCalDCSObjEOR); + calPed->CheckEORStatus((AliTRDCalDCSv2 *)fCalDCSObjEOR); } calHalfChamberStatus=(AliTRDCalChamberStatus *)calPed->GetCalChamberStatus(); } @@ -1177,7 +1177,7 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData() // get the calibration object storing the data from the handler if (fileExistS) { if(fCalDCSObjSOR) delete fCalDCSObjSOR; - fCalDCSObjSOR = (AliTRDCalDCS *) saxHandlerS.GetCalDCSObj()->Clone(); + fCalDCSObjSOR = (AliTRDCalDCSv2 *) saxHandlerS.GetCalDCSObj()->Clone(); fCalDCSObjSOR->EvaluateGlobalParameters(); fCalDCSObjSOR->SetRunType(GetRunType()); fCalDCSObjSOR->SetStartTime(GetStartTimeDCSQuery()); @@ -1188,7 +1188,7 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData() if (fileExistE) { if(fCalDCSObjEOR) delete fCalDCSObjEOR; - fCalDCSObjEOR = (AliTRDCalDCS *) saxHandlerE.GetCalDCSObj()->Clone(); + fCalDCSObjEOR = (AliTRDCalDCSv2 *) saxHandlerE.GetCalDCSObj()->Clone(); fCalDCSObjEOR->EvaluateGlobalParameters(); fCalDCSObjEOR->SetRunType(GetRunType()); fCalDCSObjEOR->SetStartTime(GetStartTimeDCSQuery()); @@ -1204,8 +1204,8 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData() AliCDBMetaData metaData1; metaData1.SetBeamPeriod(0); metaData1.SetResponsible("Frederick Kramer"); - metaData1.SetComment("DCS configuration data in two AliTRDCalDCS objects in one TObjArray (0:SOR, 1:EOR)."); - if (!Store("Calib", "DCS", calObjArray, &metaData1, 0, kTRUE)) { + metaData1.SetComment("DCS configuration data in two AliTRDCalDCSv2 objects in one TObjArray (0:SOR, 1:EOR)."); + if (!Store("Calib", "DCSv2", calObjArray, &metaData1, 0, kTRUE)) { Log("problems while storing DCS config data object"); return 16; } else { diff --git a/TRD/AliTRDPreprocessor.h b/TRD/AliTRDPreprocessor.h index 1c51fe73663..de3df328487 100644 --- a/TRD/AliTRDPreprocessor.h +++ b/TRD/AliTRDPreprocessor.h @@ -15,7 +15,7 @@ #include "AliPreprocessor.h" class TMap; -class AliTRDCalDCS; +class AliTRDCalDCSv2; class AliTRDCalROC; class AliTRDCalSingleChamberStatus; @@ -44,8 +44,8 @@ class AliTRDPreprocessor : public AliPreprocessor private: - AliTRDCalDCS* fCalDCSObjSOR; // - AliTRDCalDCS* fCalDCSObjEOR; // + AliTRDCalDCSv2* fCalDCSObjSOR; // + AliTRDCalDCSv2* fCalDCSObjEOR; // Bool_t fVdriftHLT; // HLT Vdrift UInt_t ProcessDCSConfigData(); // process DCS configuration @@ -56,7 +56,7 @@ class AliTRDPreprocessor : public AliPreprocessor void SetDefaultNoise(AliTRDCalROC &calROCNoise, Bool_t second); void SetNoise(AliTRDCalROC &calROCNoise, AliTRDCalROC *calROCNoisePrevious, Bool_t second); - ClassDef(AliTRDPreprocessor,1) // The SHUTTLE preprocessor for TRD + ClassDef(AliTRDPreprocessor,2) // The SHUTTLE preprocessor for TRD }; #endif diff --git a/TRD/AliTRDSaxHandler.cxx b/TRD/AliTRDSaxHandler.cxx index 38621ebaf2f..488ce8f1574 100644 --- a/TRD/AliTRDSaxHandler.cxx +++ b/TRD/AliTRDSaxHandler.cxx @@ -36,8 +36,8 @@ #include #include "AliTRDSaxHandler.h" #include "AliTRDgeometry.h" -#include "Cal/AliTRDCalDCS.h" -#include "Cal/AliTRDCalDCSFEE.h" +#include "Cal/AliTRDCalDCSv2.h" +#include "Cal/AliTRDCalDCSFEEv2.h" #include "Cal/AliTRDCalDCSGTU.h" ClassImp(AliTRDSaxHandler) @@ -61,7 +61,7 @@ AliTRDSaxHandler::AliTRDSaxHandler() ,fDCSFEEObj(0) ,fDCSPTRObj(0) ,fDCSGTUObj(0) - ,fCalDCSObj(new AliTRDCalDCS()) + ,fCalDCSObj(new AliTRDCalDCSv2()) ,fLevel1Tag(-2) ,fLevel2Tag(-2) ,fInsideBoardInfo(false) @@ -138,7 +138,7 @@ AliTRDSaxHandler::~AliTRDSaxHandler() } //_____________________________________________________________________________ -AliTRDCalDCS* AliTRDSaxHandler::GetCalDCSObj() +AliTRDCalDCSv2* AliTRDSaxHandler::GetCalDCSObj() { // put the arrays in the global calibration object and return this fCalDCSObj->SetFEEArr(fFEEArr); @@ -324,7 +324,7 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes) // if there is a new DCS element put it in the correct array if (CompareString(tagName, "DCS")) { if (fSystem == kInsideFEE) { - fDCSFEEObj = new AliTRDCalDCSFEE(name,dcsTitle); + fDCSFEEObj = new AliTRDCalDCSFEEv2(); fDCSFEEObj->SetDCSid(dcsId); } if (fSystem == kInsidePTR) { diff --git a/TRD/AliTRDSaxHandler.h b/TRD/AliTRDSaxHandler.h index a9653c29d3a..deef0623fdf 100644 --- a/TRD/AliTRDSaxHandler.h +++ b/TRD/AliTRDSaxHandler.h @@ -22,8 +22,8 @@ #include "Cal/AliTRDCalDCSGTUTmu.h" class TObjArray; -class AliTRDCalDCS; -class AliTRDCalDCSFEE; +class AliTRDCalDCSv2; +class AliTRDCalDCSFEEv2; class AliTRDCalDCSPTR; class AliTRDCalDCSGTU; @@ -52,57 +52,56 @@ public: virtual ~AliTRDSaxHandler(); AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh); - TObjArray* GetDCSFEEDataArray() const { return fFEEArr; } - TObjArray* GetDCSPTRDataArray() const { return fPTRArr; } - AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor + TObjArray* GetDCSFEEDataArray() const { return fFEEArr; } + TObjArray* GetDCSPTRDataArray() const { return fPTRArr; } + AliTRDCalDCSv2* GetCalDCSObj(); // to be called by the preprocessor - Int_t GetHandlerStatus() const { return fHandlerStatus; } + Int_t GetHandlerStatus() const { return fHandlerStatus; } // functions for all possible events - void OnStartDocument() const; - void OnEndDocument() const; - void OnStartElement(const char *name, const TList *attributes); - void OnEndElement(const char *name); - void OnCharacters(const char *name); - void OnComment(const char *name) const; - void OnWarning(const char *name); - void OnError(const char *name); - void OnFatalError(const char *name); - void OnCdataBlock(const char *name, Int_t len) const; + void OnStartDocument() const; + void OnEndDocument() const; + void OnStartElement(const char *name, const TList *attributes); + void OnEndElement(const char *name); + void OnCharacters(const char *name); + void OnComment(const char *name) const; + void OnWarning(const char *name); + void OnError(const char *name); + void OnFatalError(const char *name); + void OnCdataBlock(const char *name, Int_t len) const; private: - bool CompareString(TString str, const char *str2); - - Int_t fHandlerStatus; // 0: everything OK, >0: error - Int_t fNDCSPTR; // number of current PTR unit (to be abandonned soon) - Int_t fNDCSGTU; // number of current GTU unit (to be abandonned soon) - TObjArray* fFEEArr; // array of AliTRDCalDCSFEE objects - TObjArray* fPTRArr; // array of AliTRDCalDCSPTR objects -// TObjArray* fGTUArr; // array of AliTRDCalDCSGTU objects - Int_t fSystem; // current system (FEE/PTR/GTU) (while parsing) - Int_t fInsideRstate; // if we are inside rstate (while parsing) - Int_t fCurrentSM; // current supermodule (while parsing) - Int_t fCurrentStack; // current stack (while parsing) - Int_t fCurrentROB; // current ROB (while parsing) - Int_t fCurrentMCM; // current MCM (while parsing) - Int_t fCurrentADC; // current ADC (while parsing) - TString fContent; // content of the xml element (text) - AliTRDCalDCSFEE* fDCSFEEObj; // the calib object for one FEE DCS board - AliTRDCalDCSPTR* fDCSPTRObj; // the calib object for one PTR DCS board - AliTRDCalDCSGTU* fDCSGTUObj; // the calib object for one GTU DCS board - AliTRDCalDCS* fCalDCSObj; // the complete calib obj containing all info - Int_t fLevel1Tag; // 1st level in XML (while parsing) - Int_t fLevel2Tag; // 2nd level in XML (while parsing) - Bool_t fInsideBoardInfo; // if we are inside BoardInfo (while parsing) + bool CompareString(TString str, const char *str2); + + Int_t fHandlerStatus; // 0: everything OK, >0: error + Int_t fNDCSPTR; // number of current PTR unit (to be abandonned soon) + Int_t fNDCSGTU; // number of current GTU unit (to be abandonned soon) + TObjArray* fFEEArr; // array of AliTRDCalDCSFEEv2 objects + TObjArray* fPTRArr; // array of AliTRDCalDCSPTR objects + // TObjArray* fGTUArr; // array of AliTRDCalDCSGTU objects + Int_t fSystem; // current system (FEE/PTR/GTU) (while parsing) + Int_t fInsideRstate; // if we are inside rstate (while parsing) + Int_t fCurrentSM; // current supermodule (while parsing) + Int_t fCurrentStack; // current stack (while parsing) + Int_t fCurrentROB; // current ROB (while parsing) + Int_t fCurrentMCM; // current MCM (while parsing) + Int_t fCurrentADC; // current ADC (while parsing) + TString fContent; // content of the xml element (text) + AliTRDCalDCSFEEv2* fDCSFEEObj; // the calib object for one FEE DCS board + AliTRDCalDCSPTR* fDCSPTRObj; // the calib object for one PTR DCS board + AliTRDCalDCSGTU* fDCSGTUObj; // the calib object for one GTU DCS board + AliTRDCalDCSv2* fCalDCSObj; // the complete calib obj containing all info + Int_t fLevel1Tag; // 1st level in XML (while parsing) + Int_t fLevel2Tag; // 2nd level in XML (while parsing) + Bool_t fInsideBoardInfo; // if we are inside BoardInfo (while parsing) AliTRDCalDCSGTUTmu* fTmu; // GTU calibration data: pattern generator AliTRDCalDCSGTUCtpOpc* fCtpOpc; // GTU calibration data: OPC AliTRDCalDCSGTUSegment* fSegment; // GTU calibration data: SMU tracklets/tracks/triggers AliTRDCalDCSGTUBoardInfo* fBoardInfo; // GTU calibration data: hard-/software and type - - ClassDef(AliTRDSaxHandler,2); // The XML file handler for the preprocessor + ClassDef(AliTRDSaxHandler,3); // The XML file handler for the preprocessor }; #endif diff --git a/TRD/AliTRDcalibDB.cxx b/TRD/AliTRDcalibDB.cxx index 2cfdea203eb..220d688c3fb 100644 --- a/TRD/AliTRDcalibDB.cxx +++ b/TRD/AliTRDcalibDB.cxx @@ -41,6 +41,7 @@ #include "Cal/AliTRDCalPad.h" #include "Cal/AliTRDCalDet.h" #include "Cal/AliTRDCalDCS.h" +#include "Cal/AliTRDCalDCSv2.h" #include "Cal/AliTRDCalPID.h" #include "Cal/AliTRDCalMonitoring.h" #include "Cal/AliTRDCalChamberStatus.h" @@ -248,7 +249,10 @@ const TObject *AliTRDcalibDB::GetCachedCDBObject(Int_t id) return CacheCDBEntry(kIDFEE ,"TRD/Calib/FEE"); break; case kIDDCS : - return CacheCDBEntry(kIDDCS ,"TRD/Calib/DCS"); + if (GetCDBEntry("TRD/Calib/DCSv2")) + return CacheCDBEntry(kIDDCS ,"TRD/Calib/DCSv2"); + else + return CacheCDBEntry(kIDDCS ,"TRD/Calib/DCS"); break; case kIDPIDNN : return CacheCDBEntry(kIDPIDNN ,"TRD/Calib/PIDNN"); @@ -756,23 +760,45 @@ Int_t AliTRDcalibDB::GetNumberOfTimeBinsDCS() return nUndef; } - const AliTRDCalDCS *calDCSsor = dynamic_cast(dcsArr->At(0)); - const AliTRDCalDCS *calDCSeor = dynamic_cast(dcsArr->At(1)); + if (GetCDBEntry("TRD/Calib/DCSv2")) { + // if there is a DCSv2 object + const AliTRDCalDCSv2 *calDCSsorv2 = dynamic_cast(dcsArr->At(0)); + const AliTRDCalDCSv2 *calDCSeorv2 = dynamic_cast(dcsArr->At(1)); - if (!calDCSsor) { - // the SOR file is mandatory - AliError("NO SOR AliTRDCalDCS object found in CDB file!"); - return nUndef; + if (!calDCSsorv2) { + // the SOR file is mandatory + AliError("NO SOR AliTRDCalDCSv2 object found in CDB file!"); + return nUndef; + } + + if (!calDCSeorv2) { + // this can happen if the run is shorter than a couple of seconds. + AliWarning("NO EOR AliTRDCalDCSv2 object found in CDB file."); } - if (!calDCSeor) { - // this can happen if the run is shorter than a couple of seconds. - AliWarning("NO EOR AliTRDCalDCS object found in CDB file."); + // get the numbers + nTbSor = calDCSsorv2->GetGlobalNumberOfTimeBins(); + if (calDCSeorv2) nTbEor = calDCSeorv2->GetGlobalNumberOfTimeBins(); + } else { + // if there is a DCS object + const AliTRDCalDCS *calDCSsor = dynamic_cast(dcsArr->At(0)); + const AliTRDCalDCS *calDCSeor = dynamic_cast(dcsArr->At(1)); + + if (!calDCSsor) { + // the SOR file is mandatory + AliError("NO SOR AliTRDCalDCS object found in CDB file!"); + return nUndef; } - // get the numbers - nTbSor = calDCSsor->GetGlobalNumberOfTimeBins(); - if (calDCSeor) nTbEor = calDCSeor->GetGlobalNumberOfTimeBins(); + if (!calDCSeor) { + // this can happen if the run is shorter than a couple of seconds. + AliWarning("NO EOR AliTRDCalDCS object found in CDB file."); + } + + // get the numbers + nTbSor = calDCSsor->GetGlobalNumberOfTimeBins(); + if (calDCSeor) nTbEor = calDCSeor->GetGlobalNumberOfTimeBins(); + } // if they're the same return the value // -2 means mixed, -1: no data, >= 0: good number of time bins @@ -804,13 +830,23 @@ void AliTRDcalibDB::GetFilterType(TString &filterType) filterType = ""; return; } - const AliTRDCalDCS *calDCS = dynamic_cast(dcsArr->At(1)); // Take EOR - - if(!calDCS){ - filterType = ""; - return; - } - filterType = calDCS->GetGlobalFilterType(); + if (GetCDBEntry("TRD/Calib/DCSv2")) { + const AliTRDCalDCSv2 *calDCSv2 = dynamic_cast(dcsArr->At(0)); // Take SOR + + if(!calDCSv2){ + filterType = ""; + return; + } + filterType = calDCSv2->GetGlobalFilterType(); + } else { + const AliTRDCalDCS *calDCS = dynamic_cast(dcsArr->At(0)); // Take SOR + + if(!calDCS){ + filterType = ""; + return; + } + filterType = calDCS->GetGlobalFilterType(); + } } //_____________________________________________________________________________ @@ -823,13 +859,24 @@ void AliTRDcalibDB::GetGlobalConfiguration(TString &config){ config = ""; return; } - const AliTRDCalDCS *calDCS = dynamic_cast(dcsArr->At(1)); // Take EOR - - if(!calDCS){ - config = ""; - return; - } - config = calDCS->GetGlobalConfigName(); + + if (GetCDBEntry("TRD/Calib/DCSv2")) { + const AliTRDCalDCSv2 *calDCSv2 = dynamic_cast(dcsArr->At(0)); // Take SOR + + if(!calDCSv2){ + config = ""; + return; + } + config = calDCSv2->GetGlobalConfigName(); + } else { + const AliTRDCalDCS *calDCS = dynamic_cast(dcsArr->At(0)); // Take SOR + + if(!calDCS){ + config = ""; + return; + } + config = calDCS->GetGlobalConfigName(); + } } //_____________________________________________________________________________ diff --git a/TRD/CMakelibTRDbase.pkg b/TRD/CMakelibTRDbase.pkg index 55c5ce4ea3a..472933e7f56 100644 --- a/TRD/CMakelibTRDbase.pkg +++ b/TRD/CMakelibTRDbase.pkg @@ -25,7 +25,7 @@ # SHLIBS - Shared Libraries and objects for linking (Executables only) # #--------------------------------------------------------------------------------# -set ( SRCS AliTRDarraySignal.cxx AliTRDarrayDictionary.cxx AliTRDarrayADC.cxx AliTRDSignalIndex.cxx AliTRDgeometry.cxx AliTRDdigit.cxx AliTRDdigitsManager.cxx AliTRDdigitsParam.cxx AliTRDrawData.cxx AliTRDpadPlane.cxx AliTRDrawStreamOld.cxx AliTRDrawStreamBase.cxx AliTRDrawStream.cxx AliTRDCommonParam.cxx AliTRDfeeParam.cxx AliTRDgtuParam.cxx AliTRDcalibDB.cxx Cal/AliTRDCalROC.cxx Cal/AliTRDCalPad.cxx Cal/AliTRDCalDet.cxx Cal/AliTRDCalDCS.cxx Cal/AliTRDCalDCSFEE.cxx Cal/AliTRDCalDCSPTR.cxx Cal/AliTRDCalDCSGTUBoardInfo.cxx Cal/AliTRDCalDCSGTUCtpOpc.cxx Cal/AliTRDCalDCSGTUSegment.cxx Cal/AliTRDCalDCSGTUTgu.cxx Cal/AliTRDCalDCSGTUTmu.cxx Cal/AliTRDCalDCSGTU.cxx Cal/AliTRDCalMonitoring.cxx Cal/AliTRDCalChamberStatus.cxx Cal/AliTRDCalPadStatus.cxx Cal/AliTRDCalSingleChamberStatus.cxx Cal/AliTRDCalPID.cxx AliTRDCalibraFit.cxx AliTRDCalibraMode.cxx AliTRDCalibraVector.cxx AliTRDCalibraVdriftLinearFit.cxx AliTRDCalibPadStatus.cxx AliTRDCalibChamberStatus.cxx AliTRDCalibViewer.cxx AliTRDCalibViewerGUI.cxx AliTRDEntriesInfo.cxx AliTRDPhInfo.cxx AliTRDPrfInfo.cxx AliTRDUshortInfo.cxx AliTRDQAChecker.cxx AliTRDPreprocessor.cxx AliTRDSaxHandler.cxx AliTRDDataDCS.cxx AliTRDSensor.cxx AliTRDSensorArray.cxx AliTRDalignment.cxx AliTRDtrapConfig.cxx AliTRDmcmSim.cxx AliTRDtrapConfigHandler.cxx AliTRDtrackGTU.cxx AliTRDtrackletBase.cxx AliTRDtrackletGTU.cxx AliTRDtrackletMCM.cxx AliTRDtrackletWord.cxx AliTRDgtuSim.cxx AliTRDgtuTMU.cxx AliTRDhit.cxx AliTRDrecoParam.cxx AliTRDSimParam.cxx) +set ( SRCS AliTRDarraySignal.cxx AliTRDarrayDictionary.cxx AliTRDarrayADC.cxx AliTRDSignalIndex.cxx AliTRDgeometry.cxx AliTRDdigit.cxx AliTRDdigitsManager.cxx AliTRDdigitsParam.cxx AliTRDrawData.cxx AliTRDpadPlane.cxx AliTRDrawStreamOld.cxx AliTRDrawStreamBase.cxx AliTRDrawStream.cxx AliTRDCommonParam.cxx AliTRDfeeParam.cxx AliTRDgtuParam.cxx AliTRDcalibDB.cxx Cal/AliTRDCalROC.cxx Cal/AliTRDCalPad.cxx Cal/AliTRDCalDet.cxx Cal/AliTRDCalDCS.cxx Cal/AliTRDCalDCSFEE.cxx Cal/AliTRDCalDCSv2.cxx Cal/AliTRDCalDCSFEEv2.cxx Cal/AliTRDCalDCSPTR.cxx Cal/AliTRDCalDCSGTUBoardInfo.cxx Cal/AliTRDCalDCSGTUCtpOpc.cxx Cal/AliTRDCalDCSGTUSegment.cxx Cal/AliTRDCalDCSGTUTgu.cxx Cal/AliTRDCalDCSGTUTmu.cxx Cal/AliTRDCalDCSGTU.cxx Cal/AliTRDCalMonitoring.cxx Cal/AliTRDCalChamberStatus.cxx Cal/AliTRDCalPadStatus.cxx Cal/AliTRDCalSingleChamberStatus.cxx Cal/AliTRDCalPID.cxx AliTRDCalibraFit.cxx AliTRDCalibraMode.cxx AliTRDCalibraVector.cxx AliTRDCalibraVdriftLinearFit.cxx AliTRDCalibPadStatus.cxx AliTRDCalibChamberStatus.cxx AliTRDCalibViewer.cxx AliTRDCalibViewerGUI.cxx AliTRDEntriesInfo.cxx AliTRDPhInfo.cxx AliTRDPrfInfo.cxx AliTRDUshortInfo.cxx AliTRDQAChecker.cxx AliTRDPreprocessor.cxx AliTRDSaxHandler.cxx AliTRDDataDCS.cxx AliTRDSensor.cxx AliTRDSensorArray.cxx AliTRDalignment.cxx AliTRDtrapConfig.cxx AliTRDmcmSim.cxx AliTRDtrapConfigHandler.cxx AliTRDtrackGTU.cxx AliTRDtrackletBase.cxx AliTRDtrackletGTU.cxx AliTRDtrackletMCM.cxx AliTRDtrackletWord.cxx AliTRDgtuSim.cxx AliTRDgtuTMU.cxx AliTRDhit.cxx AliTRDrecoParam.cxx AliTRDSimParam.cxx) string ( REPLACE ".cxx" ".h" HDRS "${SRCS}" ) diff --git a/TRD/Cal/AliTRDCalDCSFEEv2.cxx b/TRD/Cal/AliTRDCalDCSFEEv2.cxx new file mode 100644 index 00000000000..2416718e50d --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSFEEv2.cxx @@ -0,0 +1,147 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + +/* $Id: AliTRDCalDCSFEEv2.cxx 18952 2007-06-08 11:36:12Z cblume $ */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// TRD calibration class for TRD DCS FEE configuration parameters // +// // +/////////////////////////////////////////////////////////////////////////////// + +// fStatusBit: +// 0: no errors for that ROC +// 1: ROC sent invalid or corrupted data. +// 2: ROC was not in state CONFIGURED or STANDBY_INIT (most probably it was in STANDBY) +// 3: No new data received from that ROC. +// 4: DCS id from XML attributes and and the one calculated from SM, S, L do not match +// 5: ROC has not responded at all, most probably it was off. + +#include "AliTRDCalDCSFEEv2.h" + +ClassImp(AliTRDCalDCSFEEv2) + +//_____________________________________________________________________________ +AliTRDCalDCSFEEv2::AliTRDCalDCSFEEv2() + :TObject() + ,fStatusBit(0) + ,fSM(-1) + ,fStack(-1) + ,fLayer(-1) + ,fGainTableRocSerial(0) + ,fDCSID(-1) + ,fNumberOfTimeBins(-1) + ,fConfigTag(-1) + ,fSingleHitThres(-1) + ,fThrPdClsThres(-1) + ,fSelNoZS(-1) + ,fTCFilterWeight(-1) + ,fTCFilterShortDecPar(-1) + ,fTCFilterLongDecPar(-1) + ,fFastStatNoise(-1) + ,fGainTableRocType("") + ,fFilterType("") + ,fReadoutParam("") + ,fTestPattern("") + ,fTrackletMode("") + ,fTrackletDef("") + ,fTriggerSetup("") + ,fAddOptions("") + ,fConfigName("") + ,fConfigVersion("") + ,fGainTableName("") + ,fGainTableDesc("") +{ + // + // AliTRDCalDCSFEEv2 default constructor + // + for(Int_t i=0; i<(Int_t)fgkROB; i++) { + for(Int_t j=0; j<(Int_t)fgkMCM; j++) { + fRStateGSM[i][j] = -1; + fRStateNI[i][j] = -1; + fRStateEV[i][j] = -1; + fRStatePTRG[i][j] = -1; + fGainTableAdcdac[i][j] = -1; + for(Int_t k=0; k<(Int_t)fgkADC; k++) { + fGainTableFgfn[i][j][k] = -1; + fGainTableFgan[i][j][k] = -1; + } + } + } +} + + +//_____________________________________________________________________________ +AliTRDCalDCSFEEv2::AliTRDCalDCSFEEv2(const AliTRDCalDCSFEEv2 &c) + :TObject(c) + ,fStatusBit(c.fStatusBit) + ,fSM(c.fSM) + ,fStack(c.fStack) + ,fLayer(c.fLayer) + ,fGainTableRocSerial(c.fGainTableRocSerial) + ,fDCSID(c.fDCSID) + ,fNumberOfTimeBins(c.fNumberOfTimeBins) + ,fConfigTag(c.fConfigTag) + ,fSingleHitThres(c.fSingleHitThres) + ,fThrPdClsThres(c.fThrPdClsThres) + ,fSelNoZS(c.fSelNoZS) + ,fTCFilterWeight(c.fTCFilterWeight) + ,fTCFilterShortDecPar(c.fTCFilterShortDecPar) + ,fTCFilterLongDecPar(c.fTCFilterLongDecPar) + ,fFastStatNoise(c.fFastStatNoise) + ,fGainTableRocType(c.fGainTableRocType) + ,fFilterType(c.fFilterType) + ,fReadoutParam(c.fReadoutParam) + ,fTestPattern(c.fTestPattern) + ,fTrackletMode(c.fTrackletMode) + ,fTrackletDef(c.fTrackletDef) + ,fTriggerSetup(c.fTriggerSetup) + ,fAddOptions(c.fAddOptions) + ,fConfigName(c.fConfigName) + ,fConfigVersion(c.fConfigVersion) + ,fGainTableName(c.fGainTableName) + ,fGainTableDesc(c.fGainTableDesc) +{ + // + // AliTRDCalDCSFEEv2 copy constructor + // + for(Int_t i=0; i<(Int_t)fgkROB; i++) { + for(Int_t j=0; j<(Int_t)fgkMCM; j++) { + fRStateGSM[i][j] = c.fRStateGSM[i][j]; + fRStateNI[i][j] = c.fRStateNI[i][j]; + fRStateEV[i][j] = c.fRStateEV[i][j]; + fRStatePTRG[i][j] = c.fRStatePTRG[i][j]; + fGainTableAdcdac[i][j] = c.fGainTableAdcdac[i][j]; + for(Int_t k=0; k<(Int_t)fgkADC; k++) { + fGainTableFgfn[i][j][k] = c.fGainTableFgfn[i][j][k]; + fGainTableFgan[i][j][k] = c.fGainTableFgan[i][j][k]; + } + } + } +} + + +//_____________________________________________________________________________ +AliTRDCalDCSFEEv2 &AliTRDCalDCSFEEv2::operator=(const AliTRDCalDCSFEEv2 &c) +{ + // + // Assignment operator + // + if (&c == this) return *this; + + new (this) AliTRDCalDCSFEEv2(c); + return *this; +} + diff --git a/TRD/Cal/AliTRDCalDCSFEEv2.h b/TRD/Cal/AliTRDCalDCSFEEv2.h new file mode 100644 index 00000000000..883d4e2a660 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSFEEv2.h @@ -0,0 +1,141 @@ +#ifndef ALITRDCALDCSFEEV2_H +#define ALITRDCALDCSFEEV2_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id: AliTRDCalDCSFEEv2.h 18952 2007-06-08 11:36:12Z cblume $ */ + +/////////////////////////////////////////////////////////////////////////////// +// // +// TRD calibration class for FEE configuration parameters // +// // +/////////////////////////////////////////////////////////////////////////////// + +#include "TObject.h" +#include "TString.h" + +//class TString; + +class AliTRDCalDCSFEEv2 : public TObject { + + public: + + AliTRDCalDCSFEEv2(); + AliTRDCalDCSFEEv2(const AliTRDCalDCSFEEv2 &c); + virtual ~AliTRDCalDCSFEEv2() { }; + AliTRDCalDCSFEEv2 &operator=(const AliTRDCalDCSFEEv2 &c); + + void SetStatusBit(Int_t stbit) { fStatusBit = (Char_t)stbit; } + void SetDCSid(Int_t dcsid) { fDCSID = (Char_t)dcsid; } + void SetSM(Int_t smid) { fSM = (Char_t)smid; } + void SetStack(Int_t stid) { fStack = (Char_t)stid; } + void SetLayer(Int_t lyid) { fLayer = (Char_t)lyid; } + void SetNumberOfTimeBins(Int_t value) { fNumberOfTimeBins = (UShort_t)value; } + void SetConfigTag(Int_t cfgt) { fConfigTag = (UShort_t)cfgt; } + void SetSingleHitThres(Int_t sht) { fSingleHitThres = (Short_t)sht; } + void SetThreePadClustThres(Int_t tpct) { fThrPdClsThres = (Short_t)tpct; } + void SetSelectiveNoZS(Int_t snzs) { fSelNoZS = (Short_t)snzs; } + void SetFastStatNoise(Int_t fstn) { fFastStatNoise = (Short_t)fstn; } + void SetTCFilterWeight(Int_t tcfw) { fTCFilterWeight = (Short_t)tcfw; } + void SetTCFilterShortDecPar(Int_t sdp) { fTCFilterShortDecPar = (Short_t)sdp; } + void SetTCFilterLongDecPar(Int_t ldp) { fTCFilterLongDecPar = (Short_t)ldp; } + void SetGainTableRocSerial(Int_t gts) { fGainTableRocSerial = (UChar_t)gts; } + void SetFilterType(TString fity) { fFilterType = fity; } + void SetReadoutParam(TString rpar) { fReadoutParam = rpar; } + void SetTestPattern(TString tpat) { fTestPattern = tpat; } + void SetTrackletMode(TString tmde) { fTrackletMode = tmde; } + void SetTrackletDef(TString tdef) { fTrackletDef = tdef; } + void SetTriggerSetup(TString trse) { fTriggerSetup = trse; } + void SetAddOptions(TString adop) { fAddOptions = adop; } + void SetConfigName(TString cfgn) { fConfigName = cfgn; } + void SetConfigVersion(TString cfgv) { fConfigVersion = cfgv; } + void SetGainTableName(TString gt) { fGainTableName = gt; } + void SetGainTableDesc(TString gd) { fGainTableDesc = gd; } + void SetGainTableRocType(TString gr) { fGainTableRocType = gr; } + void SetMCMGlobalState(Int_t r,Int_t m,Int_t g) { fRStateGSM[r][m] = g; } + void SetMCMStateNI(Int_t r,Int_t m,Int_t v) { fRStateNI[r][m] = v; } + void SetMCMEventCnt(Int_t r,Int_t m,Int_t v) { fRStateEV[r][m] = v; } + void SetMCMPtCnt(Int_t r,Int_t m,Int_t v) { fRStatePTRG[r][m] = v; } + void SetGainTableAdcdac(Int_t r,Int_t m,Int_t v){ fGainTableAdcdac[r][m] = (Char_t)v; } + void SetGainTableFgfn(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgfn[r][m][a] = (Short_t)v; } + void SetGainTableFgan(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgan[r][m][a] = (Char_t)v; } + + Int_t GetStatusBit() const { return (Int_t)fStatusBit; } + Int_t GetDCSid() const { return (Int_t)fDCSID; } + Int_t GetSM() const { return (Int_t)fSM; } + Int_t GetStack() const { return (Int_t)fStack; } + Int_t GetLayer() const { return (Int_t)fLayer; } + Int_t GetNumberOfTimeBins() const { return (Int_t)fNumberOfTimeBins; } + Int_t GetConfigTag() const { return (Int_t)fConfigTag; } + Int_t GetSingleHitThres() const { return (Int_t)fSingleHitThres; } + Int_t GetThreePadClustThres() const { return (Int_t)fThrPdClsThres; } + Int_t GetSelectiveNoZS() const { return (Int_t)fSelNoZS; } + Int_t GetTCFilterWeight() const { return (Int_t)fTCFilterWeight; } + Int_t GetTCFilterShortDecPar() const { return (Int_t)fTCFilterShortDecPar; } + Int_t GetTCFilterLongDecPar() const { return (Int_t)fTCFilterLongDecPar; } + Int_t GetFastStatNoise() const { return (Int_t)fFastStatNoise; } + Int_t GetGainTableRocSerial() const { return (Int_t)fGainTableRocSerial; } + TString GetFilterType() const { return fFilterType; } + TString GetReadoutParam() const { return fReadoutParam; } + TString GetTestPattern() const { return fTestPattern; } + TString GetTrackletMode() const { return fTrackletMode; } + TString GetTrackletDef() const { return fTrackletDef; } + TString GetTriggerSetup() const { return fTriggerSetup; } + TString GetAddOptions() const { return fAddOptions; } + TString GetConfigName() const { return fConfigName; } + TString GetConfigVersion() const { return fConfigVersion; } + TString GetGainTableName() const { return fGainTableName; } + TString GetGainTableDesc() const { return fGainTableDesc; } + TString GetGainTableRocType() const { return fGainTableRocType; } + Int_t GetMCMGlobalState(Int_t r,Int_t m) const { return (UChar_t)fRStateGSM[r][m]; } + Int_t GetMCMStateNI(Int_t r,Int_t m) const { return (UChar_t)fRStateNI[r][m]; } + Int_t GetMCMEventCnt(Int_t r,Int_t m) const { return fRStateEV[r][m]; } + Int_t GetMCMPtCnt(Int_t r,Int_t m) const { return fRStatePTRG[r][m]; } + Int_t GetGainTableAdcdac(Int_t r,Int_t m) const { return (Int_t)fGainTableAdcdac[r][m]; } + Int_t GetGainTableFgfn(Int_t r,Int_t m,Int_t a) const { return (Int_t)fGainTableFgfn[r][m][a]; } + Int_t GetGainTableFgan(Int_t r,Int_t m,Int_t a) const { return (Int_t)fGainTableFgan[r][m][a]; } + + protected: + + static const Char_t fgkROB = 8; // Number of readout boards + static const Char_t fgkMCM = 18; // Number of MCMs + static const Char_t fgkADC = 21; // Number of ADC channels + + Char_t fStatusBit; // 0 if everything is OK, otherwise !=0 (see impl. file) + Char_t fSM; // the number of the supermode 0..17 + Char_t fStack; // the number of the stack 0..4 + Char_t fLayer; // the number of the layer 0..5 + Char_t fGainTableFgan[(Int_t)fgkROB][(Int_t)fgkMCM][(Int_t)fgkADC]; // array of gain table fgan values + Char_t fGainTableAdcdac[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of gain table adcdac values + UChar_t fRStateGSM[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of the global states of the MCMs + UChar_t fRStateNI[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of the network interface states of the MCMs + UChar_t fGainTableRocSerial; // the roc serial of the chamber from the gain table + UShort_t fDCSID; // ID of the DCS-Board + UShort_t fNumberOfTimeBins; // Number of timebins + UShort_t fConfigTag; // Configuration tag + Short_t fSingleHitThres; // threshold of single hits (arg of readout param) + Short_t fThrPdClsThres; // threshold of 3-pad clusters (arg of readout param) + Short_t fSelNoZS; // write every fSelNoZS'th event without ZS + Short_t fTCFilterWeight; // tail cancellation filter weight + Short_t fTCFilterShortDecPar; // tail cancellation filter short decay parameter + Short_t fTCFilterLongDecPar; // tail cancellation filter long decay parameter + Short_t fFastStatNoise; // collect statistics for fast noise mode + Short_t fGainTableFgfn[(Int_t)fgkROB][(Int_t)fgkMCM][(Int_t)fgkADC]; // array of gain table fgfn values + Int_t fRStateEV[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of the event counters of the MCMs + Int_t fRStatePTRG[(Int_t)fgkROB][(Int_t)fgkMCM]; // array of the pretrigger counters of the MCMs + TString fGainTableRocType; // the roc type from the gain table + TString fFilterType; // filter type (p, pgt, nf) + TString fReadoutParam; // readout parameter (zs, nozs, testpattern) + TString fTestPattern; // value of testpattern (for readout param) + TString fTrackletMode; // tracklet mode (trk, csmtrk, notrk) + TString fTrackletDef; // definition for tracklet mode trk + TString fTriggerSetup; // trigger setup (ptrg, autotrg, autol0) + TString fAddOptions; // additional options (nopm, nion) + TString fConfigName; // Configuration name + TString fConfigVersion; // Configuration version + TString fGainTableName; // the name of the gain table + TString fGainTableDesc; // the description of the gain table + + ClassDef(AliTRDCalDCSFEEv2,1) // TRD calibration class for TRD FEE parameters +}; +#endif diff --git a/TRD/Macros/AliTRDcheckConfigv2.C b/TRD/Macros/AliTRDcheckConfigv2.C new file mode 100644 index 00000000000..92e6efd1435 --- /dev/null +++ b/TRD/Macros/AliTRDcheckConfigv2.C @@ -0,0 +1,359 @@ +//=================================================================================== +// This is a macro to analyze TRD/Calib/DCSv2 OCDB objects either +// from the grid for a given run number or from a local object. +// If you want to analyze data from the grid, please don't forget to +// have a valid alien token initialized and the file /tmp/gclient_env_$UID source'd. +// +// Arguments: +// The first argument is the runnumber (this is ignored in case of a local file), +// the second is a string that needs to contain either "grid" or "local". Further +// you can add either verbose or quiet to that string. If you don't, you'll be asked +// for all stuff individually wether you want to see it or not +// the thrid argument is the number of the ROC you (eventually) want to dump its data +// member of. +// The fourth one is the path and name of the local file you might want to look at. +// +// So the simplest way to use this macro is if you want to check the output of a given +// run from the OCDB: +// .x AliTRDcheckConfigv2.C(60111) +// +// An example for quickly checking a local file: +// .x AliTRDcheckConfigv2.C(0, "local quiet", 533, "$ALICE_ROOT/TRD/Calib/DCSv2/Run0_999999999_v0_s0.root") +// +// Please contact Frederick Kramer in case of problems +//=================================================================================== + +// This is the path one needs to change if the year is no longer 2009 +// and the runnumber cannot be found +//TString alienOcdbPath("alien://folder=/alice/data/2009/OCDB/"); +TString alienOcdbPath("alien://folder=/alice/data/2010/OCDB/"); + +// Do not make changes below here unless you know what your doing + +const Int_t nROC = 540; +const Int_t nROB = 8; +const Int_t nMCM = 18; +const Int_t cArraySize = 1000; + +Bool_t errors = false; + +Int_t AnalyzeArray(Int_t states[cArraySize], Int_t occur[cArraySize]) { + long long srtIndx[cArraySize] = 0; + + TMath::Sort(cArraySize, occur, srtIndx); + + Int_t totalSum = 0, subSum = 0, iIndex = 0; + for (Int_t i=0; i 999) { + cout << "E : out of bounds." << endl; + break; + } + Printf(" Next: %7d (%d)", states[srtIndx[iIndex]], occur[srtIndx[iIndex]]); + subSum += occur[srtIndx[iIndex]]; + } + return states[srtIndx[0]]; +} + + + +void FillItemInArray(Int_t states[cArraySize], Int_t occur[cArraySize], Int_t item, Bool_t allowNeg) { + for (Int_t iArrPos=0; iArrPosGetFEEArr()->GetSize(); i++) { + AliTRDCalDCSFEEv2 *idcsfee = calDCSObj->GetCalDCSFEEObj(i); + if ((idcsfee == NULL) || (idcsfee->GetStatusBit() != 0)) continue; + for (Int_t j=0; jGetMCMGlobalState(j,k); + Int_t inim = idcsfee->GetMCMStateNI(j,k); + Int_t inev = idcsfee->GetMCMEventCnt(j,k); + Int_t inpt = idcsfee->GetMCMPtCnt(j,k); + + FillItemInArray(gsmStates, gsmOccur, igsm, false); + FillItemInArray(nimStates, nimOccur, inim, false); + FillItemInArray(nevStates, nevOccur, inev, false); + FillItemInArray(nptStates, nptOccur, inpt, false); + } + } + } + + cout << "I : Global MCM state statistics:" << endl; + AnalyzeArray(gsmStates, gsmOccur); + cout << "I : Network interface state statistics:" << endl; + AnalyzeArray(nimStates, nimOccur); + cout << "I : MCM Event counter reading statistics:" << endl; + AnalyzeArray(nevStates, nevOccur); + cout << "I : MCM PreTrigger counter reading statistics:" << endl; + AnalyzeArray(nptStates, nptOccur); + + return; +} + + + +void GetMajorityDifferences(AliTRDCalDCSv2* calDCSObj, AliTRDCalDCSv2* calDCSObj2) { + + Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0}; + Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0}; + Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0}; + Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0}; + + for (Int_t i=0; iGetFEEArr()->GetSize() && iGetFEEArr()->GetSize(); i++) { + AliTRDCalDCSFEEv2 *idcsfee = calDCSObj->GetCalDCSFEEObj(i); + AliTRDCalDCSFEEv2 *idcsfee2 = calDCSObj2->GetCalDCSFEEObj(i); + if ((idcsfee == NULL) || (idcsfee2 == NULL) || + (idcsfee->GetStatusBit() != 0) /*|| (idcsfee2->GetStatusBit() != 0)*/) continue; + for (Int_t j=0; jGetMCMGlobalState(j,k) - idcsfee2->GetMCMGlobalState(j,k); + Int_t inim = idcsfee->GetMCMStateNI(j,k) - idcsfee2->GetMCMStateNI(j,k); + Int_t inev = idcsfee2->GetMCMEventCnt(j,k) - idcsfee->GetMCMEventCnt(j,k); + Int_t inpt = idcsfee2->GetMCMPtCnt(j,k) - idcsfee->GetMCMPtCnt(j,k); + + // if they were set to -1, it means they were not actauuly set + // change -1 to -100 to mean they werent set since the above + // can give negitives + if (idcsfee->GetMCMGlobalState(j,k) == -1 && igsm == 0) igsm =-100000; + if (idcsfee->GetMCMStateNI(j,k) == -1 && inim == 0) inim =-100000; + if (idcsfee->GetMCMEventCnt(j,k) == -1 && inev == 0) inev =-100000; + if (idcsfee->GetMCMPtCnt(j,k) == -1 && inpt == 0) inpt =-100000; + + FillItemInArray(gsmStates, gsmOccur, igsm, true); + FillItemInArray(nimStates, nimOccur, inim, true); + FillItemInArray(nevStates, nevOccur, inev, true); + FillItemInArray(nptStates, nptOccur, inpt, true); + } + } + } + + cout << "I : Global MCM state difference statistics:" << endl; + AnalyzeArray(gsmStates, gsmOccur); + cout << "I : Network interface state difference statistics:" << endl; + AnalyzeArray(nimStates, nimOccur); + cout << "I : MCM Event counter difference statistics:" << endl; + if (AnalyzeArray(nevStates, nevOccur) < 1) { + cout << "E : There should have been some events recorded, but there weren't" << endl; + errors = true; + } + cout << "I : MCM PreTrigger counter difference statistics:" << endl; + if (AnalyzeArray(nptStates, nptOccur) < 1) { + cout << "E : There should have been some events recorded, but there weren't" << endl; + errors = true; + } + + return; +} + + +void AliTRDcheckConfigv2(Int_t runNr=0, char *pathfile="nopathgiven"){ + + AliCDBEntry *entry=0; + TString pathfilets(pathfile); + + // get the source + if(pathfilets.Contains("nopathgiven")) { + cout << "I : Accessing grid storage for run number " << runNr << endl; + cout << "I : Get CDBManager instance." << endl; + AliCDBManager *man = AliCDBManager::Instance(); + cout << "I : SetDefaultStorage." << endl; + man->SetDefaultStorage(alienOcdbPath); + cout << "I : Get OCDB Entry." << endl; + entry = man->Get("TRD/Calib/DCSv2", runNr); + if (entry == NULL) { + cout << endl << "ERROR: Unable to get the AliTRDCalDCSv2 object from the OCDB for run number " << runNr << endl << endl; + cout << "If the run number is correct, it could be that the year is no longer 2009 and" << endl; + cout << "the path where the objects is stored has changed, check the top of this macro " << endl; + cout << "to change the path." << endl; + return; + } + } else { + cout << "I : Accessing local storage" << endl; + TFile *f = new TFile(pathfile); + if(f != NULL) { + entry = (AliCDBEntry*) f->Get("AliCDBEntry"); + } + else { + cout << "E : Cannot open file" << endl; + return; + } + } + + TObject *objectCDB = (TObject*)entry->GetObject(); + if (objectCDB->IsA()->InheritsFrom("TObjArray")) { + TObjArray *objArrayCDB = (TObjArray*)entry->GetObject(); + } + + // the CalDCS object + AliTRDCalDCSv2 *caldcs; + AliTRDCalDCSv2 *caldcs2; + + Bool_t sorandeor = true; + + caldcs = (AliTRDCalDCSv2*) objArrayCDB->At(0); + caldcs2 = (AliTRDCalDCSv2*) objArrayCDB->At(1); + + if (caldcs == NULL && caldcs2 == NULL) { + cout << "E : Niether the start or end of run files were in the root file."; + return; + } else if (caldcs != NULL && caldcs2 == NULL) { + cout << "E : The EOR file was not in the root file."; + errors = true; + sorandeor = false; + } else if (caldcs == NULL && caldcs2 != NULL) { + cout << "E : The SOR file was not in the root file."; + errors = true; + sorandeor = false; + caldcs = caldcs2; + } + + cout << endl << "============ Non responding ROC Summary: ============" << endl; + TString bitfivestr = " ROCs with status bit 5. These havn't responded to communication\nattempts over DIM. Most probably they just were off this is ok.\n DCS IDs: "; + Int_t lengthfive = bitfivestr.Length(); + TString bitfourstr = " ROCs with status bit 4! BAD! This might be due to a communication problem between fxsproxy and the feeserver(s) \n DCS IDs: "; + Int_t lengthfour = bitfourstr.Length(); + TString bitthreestr = " ROCs with status bit 3! BAD! data from fee server was old or corrupt.\n DCS IDs: "; + Int_t lengththree = bitthreestr.Length(); + TString bittwostr = " ROCs with status bit 2. These have been in states in which they cannot be read out, e.g. Standby.\n DCS IDs: "; + Int_t lengthtwo = bittwostr.Length(); + TString bitonestr = " ROCs with status bit 1! BAD! This means the chamber(s) didn't respont even though is should have been in a good state.\n DCS IDs: "; + Int_t lengthone = bitonestr.Length(); + + Int_t nSB1=0, nSB2=0, nSB3=0, nSB4=0, nSB5=0, nTot=0; + for (Int_t i=0; iGetFEEArr()->GetSize(); i++) { + AliTRDCalDCSFEEv2 *idcsfee; + idcsfee = caldcs->GetCalDCSFEEObj(i); + if (idcsfee != NULL) { + Int_t sb = idcsfee->GetStatusBit(); + if (sb == 5) { bitfivestr += i; bitfivestr += " "; nSB5++; } + if (sb == 4) { bitfourstr += i; bitfourstr += " "; nSB4++; errors = true; } + if (sb == 3) { bitthreestr += i; bitthreestr += " "; nSB3++; errors = true; } + if (sb == 2) { bittwostr += i; bittwostr += " "; nSB2++; } + if (sb == 1) { bitonestr += i; bitonestr += " "; nSB1++; errors = true; } + nTot += 1; + } + } + + if (lengthfive < bitfivestr.Length()) cout << nSB5 << bitfivestr.Data() << endl << endl; + if (lengthfour < bitfourstr.Length()) cout << nSB4 << bitfourstr.Data() << endl << endl; + if (lengththree < bitthreestr.Length()) cout << nSB3 << bitthreestr.Data() << endl << endl; + if (lengthtwo < bittwostr.Length()) cout << nSB2 << bittwostr.Data() << endl << endl; + if (lengthone < bitonestr.Length()) cout << nSB1 << bitonestr.Data() << endl << endl; + + cout << "The remaining " << nTot-(nSB1+nSB2+nSB3+nSB4+nSB5) << " ROCs responded correctly in the start of run."<GetFEEArr()->GetSize(); i++) { + AliTRDCalDCSFEEv2 *idcsfee; + idcsfee = caldcs->GetCalDCSFEEObj(i); + idcsfee2 = caldcs2->GetCalDCSFEEObj(i); + if (idcsfee != NULL && idcsfee2 != NULL) { + Int_t sbd = idcsfee->GetStatusBit() - idcsfee2->GetStatusBit(); + if (sbd != 0) { + cout << "ROC " << i << " changed from state " << idcsfee->GetStatusBit() << " at start of the run to " << idcsfee2->GetStatusBit() << " at the end of the run." << endl; + nChanged++; + } + nTot += 1; + } + } + + if (nChanged == 0) { + cout << "No ROCs changed state between the start and end of the run" << endl; + } else { + cout << "E : " << nChanged << " out of " << nTot << " ROCs changed state during the run" << endl; + errors = true; + } + + cout << endl << "============ Statistics from RSTATE: ============" << endl; + cout<<"I : The majority entry is given as well as all other values," << endl; + cout<<" sorted according to their occurrence." << endl << endl; + GetMajoritys(caldcs); + if (sorandeor) GetMajorityDifferences(caldcs,caldcs2); + + cout << endl << "============ Global Configuraton: ============" << endl; + cout<<"I : Anything not listed is not set, mixed numbers are indicated with a" << endl; + cout<<" value of -2 and strings are set to 'mixed' if they're mixed." << endl << endl; + if (caldcs->GetGlobalNumberOfTimeBins() != -1) + cout<<"Global number of time bins.........................: "<GetGlobalNumberOfTimeBins() << endl; + if (caldcs->GetGlobalConfigTag() != -1) + cout<<"Global configuration tag...........................: "<GetGlobalConfigTag() << endl; + if (caldcs->GetGlobalSingleHitThres() != -1) + cout<<"Global single hit threshold........................: "<GetGlobalSingleHitThres() << endl; + if (caldcs->GetGlobalThreePadClustThres() != -1) + cout<<"Global three pad cluster threshold.................: "<GetGlobalThreePadClustThres()<GetGlobalSelectiveNoZS() != -1) + cout<<"Global selective ZS (every i'th event).............: "<GetGlobalSelectiveNoZS() << endl; + if (caldcs->GetGlobalTCFilterWeight() != -1) + cout<<"Global tail cancellation filter weight.............: "<GetGlobalTCFilterWeight() << endl; + if (caldcs->GetGlobalTCFilterShortDecPar() != -1) + cout<<"Global tail cancellat. filter short decay parameter: "<GetGlobalTCFilterShortDecPar()<GetGlobalTCFilterLongDecPar() != -1) + cout<<"Global tail cancellation filt. long decay parameter: "<GetGlobalTCFilterLongDecPar()<GetGlobalModeFastStatNoise() != -1) + cout<<"Global fast statistics mode?.......................: "<GetGlobalModeFastStatNoise() << endl; + if (caldcs->GetGlobalConfigVersion() != "") + cout<<"Global configuration tag version...................: "<GetGlobalConfigVersion() << endl; + if (caldcs->GetGlobalConfigName() != "") + cout<<"Global configuration tag name......................: "<GetGlobalConfigName() << endl; + if (caldcs->GetGlobalFilterType() != "") + cout<<"Global filter type.................................: "<GetGlobalFilterType() << endl; + if (caldcs->GetGlobalReadoutParam() != "") + cout<<"Global readout parameter...........................: "<GetGlobalReadoutParam() << endl; + if (caldcs->GetGlobalTestPattern() != "") + cout<<"Global test pattern................................: "<GetGlobalTestPattern() << endl; + if (caldcs->GetGlobalTrackletMode() != "") + cout<<"Global tracklet mode...............................: "<GetGlobalTrackletMode() << endl; + if (caldcs->GetGlobalTrackletDef() != "") + cout<<"Global tracklet definition.........................: "<GetGlobalTrackletDef() << endl; + if (caldcs->GetGlobalTriggerSetup() != "") + cout<<"Global trigger setup...............................: "<GetGlobalTriggerSetup() << endl; + if (caldcs->GetGlobalAddOptions() != "") + cout<<"Global additional options..........................: "<GetGlobalAddOptions() << endl; + + cout << endl << "============ Error Summary: ============" << endl; + if (errors) { + cout<<" I noticed some errors, please see above for the specifics." << endl; + } else { + cout<<" I didn't notice any errors, but that doesn't mean there weren't any!" << endl; + } + + +} diff --git a/TRD/Macros/DumpOCDBtoTreev2.C b/TRD/Macros/DumpOCDBtoTreev2.C new file mode 100644 index 00000000000..ea8b7a82589 --- /dev/null +++ b/TRD/Macros/DumpOCDBtoTreev2.C @@ -0,0 +1,1005 @@ + //////////////////////////////////////////// + // Author: Ionut Cristian Arsene // + // email: iarsene@mail.cern.ch // + //////////////////////////////////////////// + // Use this macro to create ROOT trees with time dependent information from the TRD OCDB + // + // Usage: + // + // void DumpOCDBtoTreev2(const Char_t* outFilename, + // const Char_t* runListFilename, + // Int_t firstRun = -1, Int_t lastRun = -1, + // const Char_t* storageURI = "alien://folder=/alice/data/2010/OCDB/", + // Bool_t getHVInfo = kTRUE, + // Bool_t getCalibrationInfo = kFALSE, + // Bool_t getGasInfo = kFALSE, + // Bool_t getStatusInfo = kFALSE, + // Bool_t getGoofieInfo = kFALSE, + // Bool_t getDCSInfo = kFALSE, + // Bool_t getGRPInfo = kTRUE) + // + // * runListFilename - name of an ascii file containing run numbers + // * outFilename - name of the root file where the TRD OCDB information tree to be stored + // * firstRun, lastRun - lowest and highest run numbers (from the ascii file) to be dumped + // if these numbers are not specified (-1) all run numbers in the input ascii file will + // be used. If the run list file is not specified then all runs in this interval + // will be queried + // * getHVInfo - flag to switch on/off HV information (HV anode and drift currents/voltages) + // * getCalibrationInfo- flag to switch on/off calibration information (gain, pedestal, T0, vdrift, pad status) + // * getGasInfo - flag to switch on/off gas related information (gas composition, overpressure, temperature) + // * getStatusInfo - flag to switch on/off status information (trd_chamberStatus) + // * getGoofieInfo - flag to switch on/off goofie information (gain, HV, pressure, temperature, drift velocity, + // gas composition) + // * getDCSInfo - flag to switch on/off DCS information + // * getGRPInfo - flag to switch on/off GRP information --> there will be no time information in the output tree + // * storageURI - path of the OCDB database (if it is on alien, be sure to have a valid/active token) + + + #include + #include + #include + #include + #include "TError.h" + #include "TVectorD.h" + #include "TTreeStream.h" + #include "TObjString.h" + #include "TTimeStamp.h" + #include "TH1.h" + #include "TMath.h" + #include "TObjArray.h" + #include "TFile.h" + #include "TSystem.h" + #include "TGrid.h" + #include "AliCDBManager.h" + #include "AliCDBStorage.h" + #include "AliCDBEntry.h" + #include "AliTRDcalibDB.h" + #include "AliGRPObject.h" + #include "AliDCSSensor.h" + #include "AliTRDSensorArray.h" + #include "AliTRDCalDet.h" + #include "AliTRDCalPad.h" + #include "AliTRDCalROC.h" + #include "AliTRDCalPadStatus.h" + #include "AliTRDCalChamberStatus.h" + #include "AliTRDCalSingleChamberStatus.h" + #include "AliTRDCalDCSv2.h" + #include "AliTRDCalDCSFEEv2.h" + using namespace std; + + // global variables + // histograms used for extracting the mean and RMS of calibration parameters + TH1F *gRunWiseHisto; + TH1F *gSuperModuleWiseHisto; + TH1F *gChamberWiseHisto; + + // global constants + const Int_t gkSuperModuleStatus[18] = {1, 1, 0, 0, 0, 0, 0, 1, 1, // (1-installed) + 1, 1, 0, 0, 0, 0, 0, 0, 1}; + AliCDBStorage *storage = NULL; + AliCDBManager *manager = NULL; + Int_t currRun(0); + void MakeRunListFromOCDB(const Char_t* directory, const Char_t* outfile, Bool_t fromAlien=kFALSE); + void ProcessTRDSensorArray(AliTRDSensorArray*, TTimeStamp, TVectorD&); + void ProcessTRDCalibArray(AliTRDCalDet*, AliTRDCalPad*, TString, Double_t&, Double_t&, + TVectorD&, TVectorD&, TVectorD&, TVectorD&); + void ProcessTRDstatus(AliTRDCalChamberStatus*, AliTRDCalPadStatus*, Float_t&, TVectorD&, TVectorD&); + void ProcessTRDCalDCSFEE(AliTRDCalDCSv2*, AliTRDCalDCSv2*, Int_t&, Int_t&, Int_t&, Int_t&, Int_t&, Int_t&, Bool_t&, + TVectorD&, TVectorD&); + AliCDBEntry* GetCDBentry(const Char_t *path, Bool_t owner=kTRUE); + //__________________________________________________________________________________________ + void DumpOCDBtoTreev2(const Char_t* outFilename, + const Char_t* runListFilename, + Int_t firstRun = -1, Int_t lastRun = -1, + const Char_t* storageURI = "alien://folder=/alice/data/2010/OCDB/", + Bool_t getHVInfo = kTRUE, + Bool_t getCalibrationInfo = kFALSE, + Bool_t getGasInfo = kFALSE, + Bool_t getStatusInfo = kFALSE, + Bool_t getGoofieInfo = kFALSE, + Bool_t getDCSInfo = kFALSE, + Bool_t getGRPInfo = kTRUE) { + // + // Main function to steer the extraction of TRD OCDB information + // + + + TTimeStamp jobStartTime; + // if the storage is on alien than we need to do some extra stuff + TString storageString(storageURI); + if(storageString.Contains("alien://")) { + TGrid::Connect("alien://"); + } + // initialize the OCDB manager + manager = AliCDBManager::Instance(); + manager->SetDefaultStorage(storageURI); + manager->SetCacheFlag(kTRUE); + storage = manager->GetDefaultStorage(); + AliCDBEntry *entry = NULL; + + // initialize the tree + TTreeSRedirector *treeStreamer = new TTreeSRedirector(outFilename); + + // initialize the histograms used for extracting the mean and RMS + gRunWiseHisto = new TH1F("runHisto", "runHisto", 200, -10.0, 10.0); + gSuperModuleWiseHisto = new TH1F("smHisto", "smHisto", 200, -10.0, 10.0); + gChamberWiseHisto = new TH1F("chamberHisto", "chamberHisto", 200, -10.0, 10.0); + + // open the ascii file with run numbers + ifstream in; + if(runListFilename[0]!='\0') + in.open(runListFilename); + + // if a run list file was not specified then use the run range + if(runListFilename[0]=='\0' && firstRun!=-1 && lastRun!=-1) + currRun = firstRun-1; + + TVectorD runs; + TVectorD rejectedRuns; + TTimeStamp loopStartTime; + + // loop over runs + while(1) { + // check if we still have run numbers in the file or provided range + if(runListFilename[0]=='\0' && firstRun!=-1 && lastRun!=-1) { + currRun++; + if(currRun>lastRun) break; + } + if(runListFilename[0]!='\0') { + if(in.eof()) break; + if(!(in>>currRun)) continue; + if(currRun < (firstRun==-1 ? 0 : firstRun) || + currRun > (lastRun==-1 ? 999999999 : lastRun)) continue; + } + + printf("\n\tRUN[%d]\n", currRun); + // check if the run was processed already + Bool_t runProcessed = kFALSE; + for(Int_t iRun=0; iRunSetRun(currRun); + + // Get the GRP data. Only runs with a corresponding GRP entry in the OCDB + // will be processed. + time_t startTime = 0; + time_t endTime = 0; + TObjString runType("UNKNOWN"); + AliDCSSensor *cavern_pressure = 0x0; + AliDCSSensor *surface_pressure = 0x0; + UInt_t detectorMask = 0; + if(getGRPInfo){ + if(!(entry = GetCDBentry("GRP/GRP/Data", 0))) { + rejectedRuns.ResizeTo(rejectedRuns.GetNoElements()+1); + rejectedRuns[rejectedRuns.GetNoElements()-1] = currRun; + continue; + } + } + AliGRPObject* grpObject = dynamic_cast(entry->GetObject()); + if(grpObject) { + startTime = grpObject->GetTimeStart(); + endTime = grpObject->GetTimeEnd(); + runType = grpObject->GetRunType().Data(); + cavern_pressure = grpObject->GetCavernAtmosPressure(); + surface_pressure = grpObject->GetSurfaceAtmosPressure(); + detectorMask = grpObject->GetDetectorMask(); + TTimeStamp start(grpObject->GetTimeStart()); + TTimeStamp end(grpObject->GetTimeEnd()); + cout << " Start time: " << start.GetDate()/10000 << "/" + << (start.GetDate()/100)-(start.GetDate()/10000)*100 << "/" + << start.GetDate()%100 << " " + << start.GetTime()/10000 << ":" + << (start.GetTime()/100)-(start.GetTime()/10000)*100 << ":" + << start.GetTime()%100 << endl; + cout << " End time: " << end.GetDate()/10000 << "/" + << (end.GetDate()/100)-(end.GetDate()/10000)*100 << "/" + << end.GetDate()%100 << " " + << end.GetTime()/10000 << ":" + << (end.GetTime()/100)-(end.GetTime()/10000)*100 << ":" + << end.GetTime()%100 << endl; + cout << " Run type = " << grpObject->GetRunType().Data() << endl; + } else { + if(getGRPInfo) { + cout << "No GRP info available --> skiping this run!" << endl; + // add the run number to the list of rejected runs + rejectedRuns.ResizeTo(rejectedRuns.GetNoElements()+1); + rejectedRuns[rejectedRuns.GetNoElements()-1] = currRun; + continue; + } + } + + // remove runs with zero time duration + if(getGRPInfo && startTime==endTime) { + if(grpObject) delete grpObject; + // add the run number to the list of rejected runs + rejectedRuns.ResizeTo(rejectedRuns.GetNoElements()+1); + rejectedRuns[rejectedRuns.GetNoElements()-1] = currRun; + continue; + } + + // time step for time dependent information (change this if you need something else) + UInt_t dTime = TMath::Max((endTime-startTime)/20, Long_t(5*60)); + + // get monitoring information + AliTRDSensorArray *anodeISensors = 0; + AliTRDSensorArray *anodeUSensors = 0; + AliTRDSensorArray *driftISensors = 0; + AliTRDSensorArray *driftUSensors = 0; + AliTRDSensorArray *temperatureSensors = 0; + AliTRDSensorArray *chamberStatusSensors = 0; + AliTRDSensorArray *overpressureSensors = 0; + AliTRDSensorArray *gasCO2Sensors = 0; + AliTRDSensorArray *gasH2OSensors = 0; + AliTRDSensorArray *gasO2Sensors = 0; + // AliTRDSensorArray *adcClkPhaseSensors = 0; + + if(getHVInfo) { + // anode hv currents (per chamber) + if((entry = GetCDBentry("TRD/Calib/trd_hvAnodeImon"))) anodeISensors = (AliTRDSensorArray*)entry->GetObject(); + // anode hv voltages (per chamber) + if((entry = GetCDBentry("TRD/Calib/trd_hvAnodeUmon"))) anodeUSensors = (AliTRDSensorArray*)entry->GetObject(); + // drift hv currents (per chamber) + if((entry = GetCDBentry("TRD/Calib/trd_hvDriftImon"))) driftISensors = (AliTRDSensorArray*)entry->GetObject(); + // drift hv voltages (per chamber) + if((entry = GetCDBentry("TRD/Calib/trd_hvDriftUmon"))) driftUSensors = (AliTRDSensorArray*)entry->GetObject(); + } // end if(getHVInfo) + + if(getStatusInfo) { + // chamber status (from sensors) + if((entry = GetCDBentry("TRD/Calib/trd_chamberStatus"))) chamberStatusSensors = (AliTRDSensorArray*)entry->GetObject(); + } // end if(getStatusInfo) + + if(getGasInfo) { + // temperatures from chamber sensors (per chamber) + if((entry = GetCDBentry("TRD/Calib/trd_envTemp"))) temperatureSensors = (AliTRDSensorArray*)entry->GetObject(); + + // gas overpressure (per whole TRD) + if((entry = GetCDBentry("TRD/Calib/trd_gasOverpressure"))) overpressureSensors = (AliTRDSensorArray*)entry->GetObject(); + + // gas CO2 fraction (whole TRD) + if((entry = GetCDBentry("TRD/Calib/trd_gasCO2"))) gasCO2Sensors = (AliTRDSensorArray*)entry->GetObject(); + + // gas H2O fraction (whole TRD) + if((entry = GetCDBentry("TRD/Calib/trd_gasH2O"))) gasH2OSensors = (AliTRDSensorArray*)entry->GetObject(); + + // gas O2 fraction (whole TRD) + if((entry = GetCDBentry("TRD/Calib/trd_gasO2"))) gasO2Sensors = (AliTRDSensorArray*)entry->GetObject(); + + // ADC Clk phase (whole TRD) + /* + entry = manager->Get("TRD/Calib/trd_adcClkPhase"); + if(entry) { + entry->SetOwner(kTRUE); + adcClkPhaseSensors = (AliTRDSensorArray*)entry->GetObject(); + } + */ + } // end if getGasInfo + + + // get calibration information + // process gains + AliTRDCalDet *chamberGainFactor = 0; + AliTRDCalPad *padGainFactor = 0; + Double_t runMeanGain=0.0, runRMSGain=0.0; + TVectorD chamberMeanGain(AliTRDcalibDB::kNdet); + TVectorD chamberRMSGain(AliTRDcalibDB::kNdet); + TVectorD smMeanGain(AliTRDcalibDB::kNsector); + TVectorD smRMSGain(AliTRDcalibDB::kNsector); + TString parName("Gain"); + if(getCalibrationInfo) { + if((entry = GetCDBentry("TRD/Calib/ChamberGainFactor", 0))) chamberGainFactor = (AliTRDCalDet*)entry->GetObject(); + + if((entry = GetCDBentry("TRD/Calib/LocalGainFactor", 0))) padGainFactor = (AliTRDCalPad*)entry->GetObject(); + + ProcessTRDCalibArray(chamberGainFactor, padGainFactor, + parName, + runMeanGain, runRMSGain, + chamberMeanGain, chamberRMSGain, + smMeanGain, smRMSGain); + } + + // process pedestals + AliTRDCalDet *chamberNoise = 0; + AliTRDCalPad *padNoise = 0; + Double_t runMeanNoise=0.0, runRMSNoise=0.0; + TVectorD chamberMeanNoise(AliTRDcalibDB::kNdet); + TVectorD chamberRMSNoise(AliTRDcalibDB::kNdet); + TVectorD smMeanNoise(AliTRDcalibDB::kNsector); + TVectorD smRMSNoise(AliTRDcalibDB::kNsector); + parName = "Noise"; + if(getCalibrationInfo) { + if((entry = GetCDBentry("TRD/Calib/DetNoise", 0))) chamberNoise = (AliTRDCalDet*)entry->GetObject(); + + if((entry = GetCDBentry("TRD/Calib/PadNoise", 0))) padNoise = (AliTRDCalPad*)entry->GetObject(); + + ProcessTRDCalibArray(chamberNoise, padNoise, + parName, + runMeanNoise, runRMSNoise, + chamberMeanNoise, chamberRMSNoise, + smMeanNoise, smRMSNoise); + } + + // process drift velocity + AliTRDCalDet *chamberVdrift = 0; + AliTRDCalPad *padVdrift = 0; + Double_t runMeanVdrift=0.0, runRMSVdrift=0.0; + TVectorD chamberMeanVdrift(AliTRDcalibDB::kNdet); + TVectorD chamberRMSVdrift(AliTRDcalibDB::kNdet); + TVectorD smMeanVdrift(AliTRDcalibDB::kNsector); + TVectorD smRMSVdrift(AliTRDcalibDB::kNsector); + parName = "Vdrift"; + if(getCalibrationInfo) { + if((entry = GetCDBentry("TRD/Calib/ChamberVdrift", 0))) chamberVdrift = (AliTRDCalDet*)entry->GetObject(); + + if((entry = GetCDBentry("TRD/Calib/LocalVdrift", 0))) padVdrift = (AliTRDCalPad*)entry->GetObject(); + + ProcessTRDCalibArray(chamberVdrift, padVdrift, + parName, + runMeanVdrift, runRMSVdrift, + chamberMeanVdrift, chamberRMSVdrift, + smMeanVdrift, smRMSVdrift); + } + + // process T0 + AliTRDCalDet *chamberT0 = 0; + AliTRDCalPad *padT0 = 0; + Double_t runMeanT0=0.0, runRMST0=0.0; + TVectorD chamberMeanT0(AliTRDcalibDB::kNdet); + TVectorD chamberRMST0(AliTRDcalibDB::kNdet); + TVectorD smMeanT0(AliTRDcalibDB::kNsector); + TVectorD smRMST0(AliTRDcalibDB::kNsector); + parName = "T0"; + if(getCalibrationInfo) { + if((entry = GetCDBentry("TRD/Calib/ChamberT0", 0))) chamberT0 = (AliTRDCalDet*)entry->GetObject(); + + if((entry = GetCDBentry("TRD/Calib/LocalT0", 0))) padT0 = (AliTRDCalPad*)entry->GetObject(); + + ProcessTRDCalibArray(chamberT0, padT0, + parName, + runMeanT0, runRMST0, + chamberMeanT0, chamberRMST0, + smMeanT0, smRMST0); + } + + // process pad and chamber status + AliTRDCalChamberStatus* chamberStatus = 0; + AliTRDCalPadStatus *padStatus = 0; + Float_t runBadPadFraction=0.0; + TVectorD chamberBadPadFraction(AliTRDcalibDB::kNdet); + TVectorD chamberStatusValues(AliTRDcalibDB::kNdet); + if(getCalibrationInfo) { + if((entry = GetCDBentry("TRD/Calib/ChamberStatus", 0))) chamberStatus = (AliTRDCalChamberStatus*)entry->GetObject(); + + if((entry = GetCDBentry("TRD/Calib/PadStatus", 0))) padStatus = (AliTRDCalPadStatus*)entry->GetObject(); + + ProcessTRDstatus(chamberStatus, padStatus, + runBadPadFraction, chamberBadPadFraction, + chamberStatusValues); + } + + // get Goofie information + AliTRDSensorArray *goofieGainSensors = 0x0; + AliTRDSensorArray *goofieHvSensors = 0x0; + AliTRDSensorArray *goofiePressureSensors = 0x0; + AliTRDSensorArray *goofieTempSensors = 0x0; + AliTRDSensorArray *goofieVelocitySensors = 0x0; + AliTRDSensorArray *goofieCO2Sensors = 0x0; + AliTRDSensorArray *goofieN2Sensors = 0x0; + + if(getGoofieInfo) { + // goofie gain + if((entry = GetCDBentry("TRD/Calib/trd_goofieGain"))) goofieGainSensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie HV + if((entry = GetCDBentry("TRD/Calib/trd_goofieHv"))) goofieHvSensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie pressure + if((entry = GetCDBentry("TRD/Calib/trd_goofiePressure"))) goofiePressureSensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie temperature + if((entry = GetCDBentry("TRD/Calib/trd_goofieTemp"))) goofieTempSensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie drift velocity + if((entry = GetCDBentry("TRD/Calib/trd_goofieVelocity"))) goofieVelocitySensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie CO2 + if((entry = GetCDBentry("TRD/Calib/trd_goofieCO2"))) goofieCO2Sensors = (AliTRDSensorArray*)entry->GetObject(); + + // goofie N2 + if((entry = GetCDBentry("TRD/Calib/trd_goofieN2"))) goofieN2Sensors = (AliTRDSensorArray*)entry->GetObject(); + } // end if getGoofieInfo + + // process the DCS FEE arrays + Int_t nSB1 = 0; Int_t nSB2 = 0; Int_t nSB3 = 0; Int_t nSB4 = 0; Int_t nSB5 = 0; + Int_t nChanged = 0; + Bool_t sorAndEor = kFALSE; + TVectorD statusArraySOR(AliTRDcalibDB::kNdet); + TVectorD statusArrayEOR(AliTRDcalibDB::kNdet); + Int_t dcsFeeGlobalNTimeBins = -1; + Int_t dcsFeeGlobalConfigTag = -1; + Int_t dcsFeeGlobalSingleHitThres = -1; + Int_t dcsFeeGlobalThreePadClustThres = -1; + Int_t dcsFeeGlobalSelectiveNoSZ = -1; + Int_t dcsFeeGlobalTCFilterWeight = -1; + Int_t dcsFeeGlobalTCFilterShortDecPar = -1; + Int_t dcsFeeGlobalTCFilterLongDecPar = -1; + Int_t dcsFeeGlobalModeFastStatNoise = -1; + TObjString dcsFeeGlobalConfigVersion(""); + TObjString dcsFeeGlobalConfigName(""); + TObjString dcsFeeGlobalFilterType(""); + TObjString dcsFeeGlobalReadoutParam(""); + TObjString dcsFeeGlobalTestPattern(""); + TObjString dcsFeeGlobalTrackletMode(""); + TObjString dcsFeeGlobalTrackletDef(""); + TObjString dcsFeeGlobalTriggerSetup(""); + TObjString dcsFeeGlobalAddOptions(""); + if(getDCSInfo) { + TObjArray *objArrayCDB = 0; + AliTRDCalDCSv2* calDCSsor = 0x0; + AliTRDCalDCSv2* calDCSeor = 0x0; + if((entry = GetCDBentry("TRD/Calib/DCSv2"))) objArrayCDB = (TObjArray*)entry->GetObject(); + if(objArrayCDB) { + objArrayCDB->SetOwner(kTRUE); + calDCSsor = (AliTRDCalDCSv2*)objArrayCDB->At(0); + calDCSeor = (AliTRDCalDCSv2*)objArrayCDB->At(1); + + ProcessTRDCalDCSFEE(calDCSsor, calDCSeor, + nSB1, nSB2, nSB3, nSB4, nSB5, + nChanged, sorAndEor, statusArraySOR, statusArrayEOR); + } + if(calDCSsor || calDCSeor) { + AliTRDCalDCSv2 *caldcs = 0; + if(calDCSsor) caldcs = calDCSsor; + else caldcs = calDCSeor; + dcsFeeGlobalNTimeBins = caldcs->GetGlobalNumberOfTimeBins(); + dcsFeeGlobalConfigTag = caldcs->GetGlobalConfigTag(); + dcsFeeGlobalSingleHitThres = caldcs->GetGlobalSingleHitThres(); + dcsFeeGlobalThreePadClustThres = caldcs->GetGlobalThreePadClustThres(); + dcsFeeGlobalSelectiveNoSZ = caldcs->GetGlobalSelectiveNoZS(); + dcsFeeGlobalTCFilterWeight = caldcs->GetGlobalTCFilterWeight(); + dcsFeeGlobalTCFilterShortDecPar = caldcs->GetGlobalTCFilterShortDecPar(); + dcsFeeGlobalTCFilterLongDecPar = caldcs->GetGlobalTCFilterLongDecPar(); + dcsFeeGlobalModeFastStatNoise = caldcs->GetGlobalModeFastStatNoise(); + dcsFeeGlobalConfigVersion = caldcs->GetGlobalConfigVersion().Data(); + dcsFeeGlobalConfigName = caldcs->GetGlobalConfigName().Data(); + dcsFeeGlobalFilterType = caldcs->GetGlobalFilterType().Data(); + dcsFeeGlobalReadoutParam = caldcs->GetGlobalReadoutParam().Data(); + dcsFeeGlobalTestPattern = caldcs->GetGlobalTestPattern().Data(); + dcsFeeGlobalTrackletMode = caldcs->GetGlobalTrackletMode().Data(); + dcsFeeGlobalTrackletDef = caldcs->GetGlobalTrackletDef().Data(); + dcsFeeGlobalTriggerSetup = caldcs->GetGlobalTriggerSetup().Data(); + dcsFeeGlobalAddOptions = caldcs->GetGlobalAddOptions().Data(); + } + if(objArrayCDB) objArrayCDB->RemoveAll(); + } // end if(getDCSInfo) + + + // loop over time steps + for(UInt_t iTime = (getGRPInfo ? startTime : 0); iTime<=(getGRPInfo ? endTime : 0); iTime += (getGRPInfo ? dTime : 1)) { + // time stamp + TTimeStamp iStamp(iTime); + cout << "time step " << iStamp.GetDate()/10000 << "/" + << (iStamp.GetDate()/100)-(iStamp.GetDate()/10000)*100 << "/" + << iStamp.GetDate()%100 << " " + << iStamp.GetTime()/10000 << ":" + << (iStamp.GetTime()/100)-(iStamp.GetTime()/10000)*100 << ":" + << iStamp.GetTime()%100 << endl; + + // cavern pressure + Float_t pressure = -99.; + Bool_t inside=kFALSE; + if(cavern_pressure) pressure = cavern_pressure->Eval(iStamp,inside); + + // surface pressure + Float_t surfacePressure = -99.; + if(surface_pressure) surfacePressure = surface_pressure->Eval(iStamp,inside); + + // anode I sensors + TVectorD anodeIValues(AliTRDcalibDB::kNdet); + if(anodeISensors) ProcessTRDSensorArray(anodeISensors, iStamp, anodeIValues); + + // anode U sensors + TVectorD anodeUValues(AliTRDcalibDB::kNdet); + if(anodeUSensors) ProcessTRDSensorArray(anodeUSensors, iStamp, anodeUValues); + + // drift I sensors + TVectorD driftIValues(AliTRDcalibDB::kNdet); + if(driftISensors) ProcessTRDSensorArray(driftISensors, iStamp, driftIValues); + + // drift U sensors + TVectorD driftUValues(AliTRDcalibDB::kNdet); + if(driftUSensors) ProcessTRDSensorArray(driftUSensors, iStamp, driftUValues); + + // chamber temperatures + TVectorD envTempValues(AliTRDcalibDB::kNdet); + if(temperatureSensors) ProcessTRDSensorArray(temperatureSensors, iStamp, envTempValues); + + // chamber status sensors + TVectorD statusValues(AliTRDcalibDB::kNdet); + if(chamberStatusSensors) ProcessTRDSensorArray(chamberStatusSensors, iStamp, statusValues); + + // gas overpressure + TVectorD overpressureValues(overpressureSensors ? overpressureSensors->NumSensors() : 0); + if(overpressureSensors) ProcessTRDSensorArray(overpressureSensors, iStamp, overpressureValues); + + // gas CO2 + TVectorD gasCO2Values(gasCO2Sensors ? gasCO2Sensors->NumSensors() : 0); + if(gasCO2Sensors) ProcessTRDSensorArray(gasCO2Sensors, iStamp, gasCO2Values); + + // gas H2O + TVectorD gasH2OValues(gasH2OSensors ? gasH2OSensors->NumSensors() : 0); + if(gasH2OSensors) ProcessTRDSensorArray(gasH2OSensors, iStamp, gasH2OValues); + + // gas O2 + TVectorD gasO2Values(gasO2Sensors ? gasO2Sensors->NumSensors() : 0); + if(gasO2Sensors) ProcessTRDSensorArray(gasO2Sensors, iStamp, gasO2Values); + + // ADC Clk phase + //TVectorD adcClkPhaseValues(adcClkPhaseSensors ? adcClkPhaseSensors->NumSensors() : 0); + //if(adcClkPhaseSensors) ProcessTRDSensorArray(adcClkPhaseSensors, iStamp, adcClkPhaseValues); + + // goofie gain + TVectorD goofieGainValues(goofieGainSensors ? goofieGainSensors->NumSensors() : 0); + if(goofieGainSensors) ProcessTRDSensorArray(goofieGainSensors, iStamp, goofieGainValues); + + // goofie HV + TVectorD goofieHvValues(goofieHvSensors ? goofieHvSensors->NumSensors() : 0); + if(goofieHvSensors) ProcessTRDSensorArray(goofieHvSensors, iStamp, goofieHvValues); + + // goofie pressure + TVectorD goofiePressureValues(goofiePressureSensors ? goofiePressureSensors->NumSensors() : 0); + if(goofiePressureSensors) ProcessTRDSensorArray(goofiePressureSensors, iStamp, goofiePressureValues); + + // goofie temperature + TVectorD goofieTempValues(goofieTempSensors ? goofieTempSensors->NumSensors() : 0); + if(goofieTempSensors) ProcessTRDSensorArray(goofieTempSensors, iStamp, goofieTempValues); + + // goofie drift velocity + TVectorD goofieVelocityValues(goofieVelocitySensors ? goofieVelocitySensors->NumSensors() : 0); + if(goofieVelocitySensors) ProcessTRDSensorArray(goofieVelocitySensors, iStamp, goofieVelocityValues); + + // goofie CO2 + TVectorD goofieCO2Values(goofieCO2Sensors ? goofieCO2Sensors->NumSensors() : 0); + if(goofieCO2Sensors) ProcessTRDSensorArray(goofieCO2Sensors, iStamp, goofieCO2Values); + + // goofie N2 + TVectorD goofieN2Values(goofieN2Sensors ? goofieN2Sensors->NumSensors() : 0); + if(goofieN2Sensors) ProcessTRDSensorArray(goofieN2Sensors, iStamp, goofieN2Values); + + // fill the tree + (*treeStreamer)<< "trdTree" + << "run=" << currRun + << "time=" << iTime + << "runType.=" << &runType; + if(getGRPInfo) { + (*treeStreamer)<< "trdTree" + << "startTimeGRP=" << startTime + << "endTimeGRP=" << endTime + << "cavernPressure=" << pressure + << "surfacePressure=" << surfacePressure + << "detectorMask=" << detectorMask; + } + if(getHVInfo) { + (*treeStreamer)<< "trdTree" + << "hvAnodeI.=" << &anodeIValues + << "hvAnodeU.=" << &anodeUValues + << "hvDriftI.=" << &driftIValues + << "hvDriftU.=" << &driftUValues; + } + if(getStatusInfo) { + (*treeStreamer)<< "trdTree" + << "sensorStatusValues.=" << &statusValues; + } + if(getGasInfo) { + (*treeStreamer)<< "trdTree" + << "envTemp.=" << &envTempValues + << "gasOverPressure.=" << &overpressureValues + << "gasCO2.=" << &gasCO2Values + << "gasH2O.=" << &gasH2OValues + << "gasO2.=" << &gasO2Values; + //<< "adcClkPhase.=" << &adcClkPhaseValues; + } + if(getGoofieInfo) { + (*treeStreamer)<< "trdTree" + << "goofieGain.=" << &goofieGainValues + << "goofieHV.=" << &goofieHvValues + << "goofiePressure.=" << &goofiePressureValues + << "goofieTemp.=" << &goofieTempValues + << "goofieVelocity.=" << &goofieVelocityValues + << "goofieCO2.=" << &goofieCO2Values + << "goofieN2.=" << &goofieN2Values; + } + if(getCalibrationInfo) { + (*treeStreamer)<< "trdTree" + << "runMeanGain=" << runMeanGain + << "runRMSGain=" << runRMSGain + << "smMeanGain.=" << &smMeanGain + << "smRMSGain.=" << &smRMSGain + << "chamberMeanGain.=" << &chamberMeanGain + << "chamberRMSGain.=" << &chamberRMSGain + << "runMeanNoise=" << runMeanNoise + << "runRMSNoise=" << runRMSNoise + << "smMeanNoise.=" << &smMeanNoise + << "smRMSNoise.=" << &smRMSNoise + << "chamberMeanNoise.=" << &chamberMeanNoise + << "chamberRMSNoise.=" << &chamberRMSNoise + << "runMeanVdrift=" << runMeanVdrift + << "runRMSVdrift=" << runRMSVdrift + << "smMeanVdrift.=" << &smMeanVdrift + << "smRMSVdrift.=" << &smRMSVdrift + << "chamberMeanVdrift.=" << &chamberMeanVdrift + << "chamberRMSVdrift.=" << &chamberRMSVdrift + << "runMeanT0=" << runMeanT0 + << "runRMST0=" << runRMST0 + << "smMeanT0.=" << &smMeanT0 + << "smRMST0.=" << &smRMST0 + << "chamberMeanT0.=" << &chamberMeanT0 + << "chamberRMST0.=" << &chamberRMST0 + << "runBadPadFraction=" << runBadPadFraction + << "chamberBadPadFraction.=" << &chamberBadPadFraction + << "chamberStatusValues.=" << &chamberStatusValues; + } + if(getDCSInfo) { + (*treeStreamer)<< "trdTree" + << "dcsFeeGlobalNTimeBins=" << dcsFeeGlobalNTimeBins + << "dcsFeeGlobalConfigTag=" << dcsFeeGlobalConfigTag + << "dcsFeeGlobalSingleHitThres=" << dcsFeeGlobalSingleHitThres + << "dcsFeeGlobalThreePadClustThres=" << dcsFeeGlobalThreePadClustThres + << "dcsFeeGlobalSelectiveNoSZ=" << dcsFeeGlobalSelectiveNoSZ + << "dcsFeeGlobalTCFilterWeight=" << dcsFeeGlobalTCFilterWeight + << "dcsFeeGlobalTCFilterShortDecPar=" << dcsFeeGlobalTCFilterShortDecPar + << "dcsFeeGlobalTCFilterLongDecPar=" << dcsFeeGlobalTCFilterLongDecPar + << "dcsFeeGlobalModeFastStatNoise=" << dcsFeeGlobalModeFastStatNoise + // << "dcsFeeGlobalConfigVersion.=" << &dcsFeeGlobalConfigVersion + // << "dcsFeeGlobalConfigName.=" << &dcsFeeGlobalConfigName + // << "dcsFeeGlobalFilterType.=" << &dcsFeeGlobalFilterType + // << "dcsFeeGlobalReadoutParam.=" << &dcsFeeGlobalReadoutParam + // << "dcsFeeGlobalTestPattern.=" << &dcsFeeGlobalTestPattern + // << "dcsFeeGlobalTrackletMode.=" << &dcsFeeGlobalTrackletMode + // << "dcsFeeGlobalTrackletDef.=" << &dcsFeeGlobalTrackletDef + // << "dcsFeeGlobalTriggerSetup.=" << &dcsFeeGlobalTriggerSetup + // << "dcsFeeGlobalAddOptions.=" << &dcsFeeGlobalAddOptions + << "statusDCSFEESOR.=" << &statusArraySOR + << "statusDCSFEEEOR.=" << &statusArrayEOR + << "SORandEOR=" << sorAndEor + << "nChanged=" << nChanged + << "nSB1=" << nSB1 + << "nSB2=" << nSB2 + << "nSB3=" << nSB3 + << "nSB4=" << nSB4 + << "nSB5=" << nSB5; + } + (*treeStreamer)<< "trdTree" + << "\n"; + } // end loop over time steps + + // add the run number to the list of runs + runs.ResizeTo(runs.GetNoElements()+1); + runs[runs.GetNoElements()-1] = currRun; + + // do some cleaning + if(grpObject) delete grpObject; + if(anodeISensors) anodeISensors->Clear(); + if(anodeUSensors) anodeUSensors->Clear(); + if(driftISensors) driftISensors->Clear(); + if(driftUSensors) driftUSensors->Clear(); + if(temperatureSensors) temperatureSensors->Clear(); + if(overpressureSensors) overpressureSensors->Clear(); + if(gasCO2Sensors) gasCO2Sensors->Clear(); + if(gasH2OSensors) gasH2OSensors->Clear(); + if(gasO2Sensors) gasO2Sensors->Clear(); + //if(adcClkPhaseSensors) adcClkPhaseSensors->Clear(); + if(goofieGainSensors) goofieGainSensors->Clear(); + if(goofieHvSensors) goofieHvSensors->Clear(); + if(goofiePressureSensors) goofiePressureSensors->Clear(); + if(goofieTempSensors) goofieTempSensors->Clear(); + if(goofieVelocitySensors) goofieVelocitySensors->Clear(); + if(goofieCO2Sensors) goofieCO2Sensors->Clear(); + if(goofieN2Sensors) goofieN2Sensors->Clear(); + if(chamberGainFactor) delete chamberGainFactor; + if(padGainFactor) delete padGainFactor; + if(chamberNoise) delete chamberNoise; + if(padNoise) delete padNoise; + if(chamberVdrift) delete chamberVdrift; + if(padVdrift) delete padVdrift; + if(chamberT0) delete chamberT0; + if(padT0) delete padT0; + if(chamberStatus) delete chamberStatus; + if(padStatus) delete padStatus; + } // end while (loop over runs) + TTimeStamp loopEndTime; + + treeStreamer->GetFile()->cd(); + runs.Write("runs"); + delete treeStreamer; + + // output some job informations + TTimeStamp jobEndTime; + cout << "=============================================" << endl; + cout << "Job launched at : " << jobStartTime.AsString() << endl; + cout << "Loop over runs started at: " << loopStartTime.AsString() << endl; + cout << "Loop over runs ended at : " << loopEndTime.AsString() << endl; + cout << "Job ended at : " << jobEndTime.AsString() << endl; + cout << "Initialization duration : " + << loopStartTime.GetSec() - jobStartTime.GetSec() << " seconds" << endl; + cout << "Loop over runs duration : " + << loopEndTime.GetSec() - loopStartTime.GetSec() << " seconds" << endl; + cout << "Post loop : " + << jobEndTime.GetSec() - loopEndTime.GetSec() << " seconds" << endl; + cout << "Running time per processed run: " + << (loopEndTime.GetSec()-loopStartTime.GetSec())/(runs.GetNoElements()>0 ? Double_t(runs.GetNoElements()) : 1.0) + << " sec./run" << endl; + cout << "Running time per input run: " + << (loopEndTime.GetSec()-loopStartTime.GetSec())/((rejectedRuns.GetNoElements()+runs.GetNoElements())>0 ? Double_t(runs.GetNoElements()+rejectedRuns.GetNoElements()) : 1.0) + << " sec./run" << endl; + + // print the runs that had problems + cout << "number of rejected runs: " << rejectedRuns.GetNoElements() << endl; + cout << "rejected run numbers" << endl; + cout << "********************" << endl; + for(Int_t iRun=0; iRunEval() method makes interpolation inside the covered time interval + // and returns the value at the closest time limit (start or end) outside the covered time range + AliDCSSensor *sensor; + Bool_t inside=kFALSE; + for(Int_t i=0; iNumSensors(); i++) { + sensor = sensorArray->GetSensorNum(i); + if(sensor && sensor->GetGraph()) + values[i] = sensor->Eval(timeStamp,inside); + else + values[i] = -99.; + } + return; + } + + //__________________________________________________________________________________________ + void ProcessTRDCalibArray(AliTRDCalDet* chamberCalib, AliTRDCalPad *padCalib, + TString parName, + Double_t &runValue, Double_t &runRMS, + TVectorD &chamberValues, TVectorD &chamberValuesRMS, + TVectorD &superModuleValues, TVectorD &superModuleValuesRMS) { + // Process the calibrations for a given run. + // Calculates the run and chamber wise averages + // + + // check if the calibration parameter is multiplicative or additive + Bool_t multiplicative = kTRUE; + if(!parName.CompareTo("T0")) multiplicative = kFALSE; + + // first iteration (calculate all averages and RMS without discrimination on the SM average) + gRunWiseHisto->Reset(); + for(Int_t iSM = 0; iSMReset(); + // check if SM is installed + if(!gkSuperModuleStatus[iSM]) continue; + for(Int_t iChamber=iSM*AliTRDcalibDB::kNstack*AliTRDcalibDB::kNlayer; + iChamber < (iSM+1)*AliTRDcalibDB::kNstack*AliTRDcalibDB::kNlayer; + iChamber++) { // loop over chambers in this supermodule + // get the chamber value + Float_t chamberValue = chamberCalib->GetValue(iChamber); + // get the ROC object + AliTRDCalROC *chamberROC = padCalib->GetCalROC(iChamber); + if(!chamberROC) + continue; + gChamberWiseHisto->Reset(); + for(Int_t iChannel = 0; iChannel < chamberROC->GetNchannels(); iChannel++){ // loop over channels + // calculate the calibration parameter for this pad + Float_t padValue; + if(multiplicative) + padValue = chamberValue * chamberROC->GetValue(iChannel); + else + padValue = chamberValue + chamberROC->GetValue(iChannel); + // fill the run, SM and chamber wise histograms + gChamberWiseHisto->Fill(padValue); + // if the parameter is Noise then check if the pad value is not a default one + // Default value is now 1.2!!!! Check with Raphaelle for more informations + if(parName.Contains("Noise") && + TMath::Abs(padValue-1.2)<0.00001) continue; + gSuperModuleWiseHisto->Fill(padValue); + gRunWiseHisto->Fill(padValue); + } // end loop over channels + // get the chamber wise mean and RMS + chamberValues[iChamber] = gChamberWiseHisto->GetMean(); + chamberValuesRMS[iChamber] = gChamberWiseHisto->GetRMS(); + } // end loop over chambers + // SM wise mean and RMS + superModuleValues[iSM] = gSuperModuleWiseHisto->GetMean(); + superModuleValuesRMS[iSM] = gSuperModuleWiseHisto->GetRMS(); + } // end loop over supermodules + // run wise mean and RMS + runValue = gRunWiseHisto->GetMean(); + runRMS = gRunWiseHisto->GetRMS(); + + // Noise and Gain are finished processing + if(parName.Contains("Noise") || parName.Contains("Gain")) + return; + // second iteration (calculate SM and run wise averages and RMS for Vdrift and T0) + // The pads with calib parameter equal to the SM average are discarded (default value) + gRunWiseHisto->Reset(); + for(Int_t iSM = 0; iSMReset(); + // eliminate the uninstalled super modules + if(!gkSuperModuleStatus[iSM]) continue; + for(Int_t iChamber=iSM*AliTRDcalibDB::kNstack*AliTRDcalibDB::kNlayer; + iChamber < (iSM+1)*AliTRDcalibDB::kNstack*AliTRDcalibDB::kNlayer; + iChamber++) { // loop over chambers + // the chamber value + Float_t chamberValue = chamberCalib->GetValue(iChamber); + AliTRDCalROC *chamberROC = padCalib->GetCalROC(iChamber); + if(!chamberROC) + continue; + + for(Int_t iChannel = 0; iChannel < chamberROC->GetNchannels(); iChannel++){ // loop over channels in a chamber + // get the pad value + Float_t padValue; + if(multiplicative) + padValue = chamberValue * chamberROC->GetValue(iChannel); + else + padValue = chamberValue + chamberROC->GetValue(iChannel); + // eliminate from the average and RMS calculation all pads which + // have the calib parameter equal with the SM average + if((parName.Contains("Vdrift") || parName.Contains("T0")) && + TMath::Abs(padValue-superModuleValues[iSM])<0.00001) continue; + gSuperModuleWiseHisto->Fill(padValue); + gRunWiseHisto->Fill(padValue); + } // end loop over channels + } // end loop over chambers + superModuleValues[iSM] = gSuperModuleWiseHisto->GetMean(); + superModuleValuesRMS[iSM] = gSuperModuleWiseHisto->GetRMS(); + } // end loop over super modules + runValue = gRunWiseHisto->GetMean(); + runRMS = gRunWiseHisto->GetRMS(); + return; + } + + //__________________________________________________________________________________________ + void ProcessTRDstatus(AliTRDCalChamberStatus* chamberStatus, AliTRDCalPadStatus* padStatus, + Float_t &runBadPadFraction, TVectorD &chamberBadPadFraction, + TVectorD &chamberStatusValues) { + // Process the pad status. Calculates the fraction of pads with non 0 status + // run and chamber wise + // + Int_t runPadStatusNot0 = 0; + Int_t runPadStatusAll = 0; + + Int_t superModuleStatus[18] = {1, 1, 0, 0, 0, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 0, 0, 0, 1}; + + // loop over chambers + for(Int_t iChamber=0; iChamber < AliTRDcalibDB::kNdet; iChamber++) { + // check if the chamber is in an installed sector; + Int_t sm = AliTRDgeometry::GetSector(iChamber); + if(!superModuleStatus[sm]) continue; + + chamberStatusValues[iChamber] = chamberStatus->GetStatus(iChamber); + AliTRDCalSingleChamberStatus *singleChamberStatus = padStatus->GetCalROC(iChamber); + if(!singleChamberStatus) + continue; + Int_t chamberPadStatusNot0 = 0; + Int_t chamberPadStatusAll = 0; + // loop over channels in a chamber + for(Int_t iChannel = 0; iChannel < singleChamberStatus->GetNchannels(); iChannel++) { + if(singleChamberStatus->GetStatus(iChannel) > 0) { + chamberPadStatusNot0++; + runPadStatusNot0++; + } + chamberPadStatusAll++; + runPadStatusAll++; + } + chamberBadPadFraction[iChamber] = (chamberPadStatusAll>0 ? + Float_t(chamberPadStatusNot0)/Float_t(chamberPadStatusAll) : -99.); + } + runBadPadFraction = (runPadStatusAll>0 ? Float_t(runPadStatusNot0)/Float_t(runPadStatusAll) : -99.); + return; + } + + //__________________________________________________________________________________________ + void ProcessTRDCalDCSFEE(AliTRDCalDCSv2 *caldcsSOR, AliTRDCalDCSv2 *caldcsEOR, + Int_t &nsb1, Int_t &nsb2, Int_t &nsb3, Int_t &nsb4, Int_t &nsb5, + Int_t &nChanged, Bool_t &sorAndEor, + TVectorD &statusArraySOR, TVectorD &statusArrayEOR) { + // + // Process the DCS information + // + sorAndEor = kTRUE; + if(!caldcsSOR && !caldcsEOR) { + sorAndEor = kFALSE; + return; + } + else if(caldcsSOR && !caldcsEOR) { + sorAndEor = kFALSE; + } + else if(!caldcsSOR && caldcsEOR) { + caldcsSOR = caldcsEOR; + sorAndEor = kFALSE; + } + + nsb1 = 0; nsb2 = 0; nsb3 = 0; nsb4 = 0; nsb5 = 0; nChanged = 0; + for(Int_t iROC=0; iROCGetFEEArr()->GetSize(); iROC++) { + AliTRDCalDCSFEEv2 *dcsSorFee = caldcsSOR->GetCalDCSFEEObj(iROC); + AliTRDCalDCSFEEv2 *dcsEorFee = caldcsEOR->GetCalDCSFEEObj(iROC); + if(dcsSorFee) { + statusArraySOR[iROC] = dcsSorFee->GetStatusBit(); + if(statusArraySOR[iROC] == 1) nsb1++; + if(statusArraySOR[iROC] == 2) nsb2++; + if(statusArraySOR[iROC] == 3) nsb3++; + if(statusArraySOR[iROC] == 4) nsb4++; + if(statusArraySOR[iROC] == 5) nsb5++; + } + if(dcsEorFee) { + statusArrayEOR[iROC] = dcsEorFee->GetStatusBit(); + } + if(sorAndEor) { + if((statusArraySOR[iROC]-statusArrayEOR[iROC]) != 0) nChanged++; + } + } + return; + } + + //__________________________________________________________________________________________ + void MakeRunListFromOCDB(const Char_t* directory, const Char_t* outfile, Bool_t fromAlien) { + // + // For a given OCDB path dump the list of available run numbers + // + if(fromAlien) + gSystem->Exec(Form("alien_ls %s > temp.txt", directory)); + else + gSystem->Exec(Form("ls %s > temp.txt", directory)); + + ifstream inBuffer("temp.txt"); + if(!inBuffer.is_open()) { + cout << "File temp.txt not opened! Exiting" << endl; + return; + } + ofstream outBuffer(outfile); + if(!outBuffer.is_open()) { + cout << "File runList.txt cannot be opened! Exiting" << endl; + return; + } + + while(!inBuffer.eof()) { + char inputLine[128]; + inBuffer.getline(inputLine, 128, '\n'); + int runLow, runHigh; + const char* tempLine = inputLine; + sscanf(tempLine, "Run%d_%d_v1_s0.root", &runLow, &runHigh); + outBuffer << runLow << endl; + } + + inBuffer.close(); + outBuffer.close(); + gSystem->Exec("rm temp.txt"); + return; + } + + //__________________________________________________________________________________________ + AliCDBEntry* GetCDBentry(const Char_t *path, Bool_t owner) + { + ::Info("GetCDBentry", Form("QUERY RUN [%d] for \"%s\".", currRun, path)); + AliCDBEntry *entry(NULL); + storage->QueryCDB(currRun, path); + if(!storage->GetQueryCDBList()->GetEntries()){ + ::Error("GetCDBentry", Form("Missing \"%s\" in run %d.", path, currRun)); + return NULL; + } else entry = manager->Get(path); + if(!entry) return NULL; + + entry->SetOwner(owner); + ::Info("GetCDBentry", Form("FOUND ENTRY @ [%p].", (void*)entry)); + return entry; + } diff --git a/TRD/TRDbaseLinkDef.h b/TRD/TRDbaseLinkDef.h index bf588006a39..1e0b234d205 100644 --- a/TRD/TRDbaseLinkDef.h +++ b/TRD/TRDbaseLinkDef.h @@ -43,6 +43,8 @@ #pragma link C++ class AliTRDCalDet+; #pragma link C++ class AliTRDCalDCS+; #pragma link C++ class AliTRDCalDCSFEE+; +#pragma link C++ class AliTRDCalDCSv2+; +#pragma link C++ class AliTRDCalDCSFEEv2+; #pragma link C++ class AliTRDCalDCSPTR+; #pragma link C++ class AliTRDCalDCSGTUBoardInfo+; #pragma link C++ class AliTRDCalDCSGTUCtpOpc+; diff --git a/TRD/libTRDbase.pkg b/TRD/libTRDbase.pkg index 515cc7770fb..308776792d8 100644 --- a/TRD/libTRDbase.pkg +++ b/TRD/libTRDbase.pkg @@ -22,6 +22,8 @@ SRCS= AliTRDarraySignal.cxx \ Cal/AliTRDCalDet.cxx \ Cal/AliTRDCalDCS.cxx \ Cal/AliTRDCalDCSFEE.cxx \ + Cal/AliTRDCalDCSv2.cxx \ + Cal/AliTRDCalDCSFEEv2.cxx \ Cal/AliTRDCalDCSPTR.cxx \ Cal/AliTRDCalDCSGTUBoardInfo.cxx \ Cal/AliTRDCalDCSGTUCtpOpc.cxx \ -- 2.39.3