]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZERODataDCS.h
Fix to HV datapoints retrieval in case the HV is switched off before run-completed...
[u/mrichter/AliRoot.git] / VZERO / AliVZERODataDCS.h
index f089a67e7bcf770aede5184e51063dc8eff069fd..19ad12262f21f872ded0497721d7c838d187d0ee 100644 (file)
@@ -4,16 +4,15 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-#include "TObject.h" 
-#include "TString.h"
-
+#include <TObject.h> 
 #include <TClonesArray.h>
-#include <TH1F.h>
 
 class TMap;
 class TH2F;
 class TGraph;
 class TF1;
+class TString;
+class TH1F;
 
 // AliVZERODataDCS class
 // main aim is to process DCS data
@@ -21,19 +20,23 @@ class TF1;
 
 class AliVZERODataDCS : public TObject {
 public:
-  enum {kNAliases=64,kNGraphs=64};
-  enum {kHvMin=0, kHvMax=2000};
+  enum {kNAliases=80,kNGraphs=64,kNHvChannel=64,kNLvChannel=16,kNCIUBoards = 8};
+  enum {kHvMin=0, kHvMax=3000};
   
   AliVZERODataDCS();
-  AliVZERODataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime);
+  AliVZERODataDCS(Int_t nRun, UInt_t timeCreated, UInt_t timeCompleted, UInt_t daqStart, UInt_t daqEnd);
   ~AliVZERODataDCS();
   
   void SetRun(Int_t run) {fRun = run;}
   void SetStartTime(Int_t startTime) {fStartTime = startTime;}
   void SetEndTime(Int_t endTime) {fEndTime = endTime;}
+  void SetDaqStartTime(Int_t startTime) {fDaqStartTime = startTime;}
+  void SetDaqEndTime(Int_t endTime) {fDaqEndTime = endTime;}
   Int_t GetRun() const {return fRun;}
   Int_t GetStartTime() const {return fStartTime;}
   Int_t GetEndTime() const {return fEndTime;}
+  Int_t GetDaqStartTime() const {return fDaqStartTime;}
+  Int_t GetDaqEndTime() const {return fDaqEndTime;}
   
   void ProcessData(TMap& aliasMap);
   
@@ -42,8 +45,24 @@ public:
   
   void Draw(const Option_t* option);
   
-  Float_t* GetMeanHV()   const {return (float*)fMeanHV;}
+  Float_t* GetMeanHV()    const {return (float*)fMeanHV;}
   Float_t* GetWidthHV()   const {return (float*)fWidthHV;}
+  Bool_t * GetDeadMap()   const {return (bool*)fDeadChannel;}
+  TMap * GetFEEParameters() const {return fFEEParameters;};
+  
+// Getter of Offline Channel number as used in aliroot (defined by aliroot 
+// numbering convention) from DCS Channel number
+
+    Int_t      GetOfflineChannel(Int_t channel)  const
+      { Int_t  fOfflineChannel[64] = {32, 33, 34, 35, 36, 37, 38, 39, 
+                                      40, 41, 42, 43, 44, 45, 46, 47, 
+                                     48, 49, 50, 51, 52, 53, 54, 55, 
+                                     56, 57, 58, 59, 60, 61, 62, 63,
+                                      0,  1,  2,  3,  4,  5,  6,  7, 
+                                      8,  9, 10, 11, 12, 13, 14, 15,
+                                     16, 17, 18, 19, 20, 21, 22, 23, 
+                                     24, 25, 26, 27, 28, 29, 30, 31};
+               return fOfflineChannel[channel]; }
 
 private:
   AliVZERODataDCS(const AliVZERODataDCS&); // Not implemented
@@ -54,19 +73,22 @@ private:
   void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
     
   Int_t fRun;       // Run number
-  Int_t fStartTime; // start time
-  Int_t fEndTime;   // end time
-  
+  Int_t fStartTime; // start time (time created)
+  Int_t fEndTime;   // end time (time completed)
+  UInt_t fDaqStartTime; // DAQ start time
+  UInt_t fDaqEndTime;   // DAQ end time
   
   TString fAliasNames[kNAliases];        // aliases for DCS data
-  TClonesArray fGraphs;                // Array containing  graphics
-  TH1F *fHv[kNAliases];
-  Float_t fMeanHV[kNAliases]; 
-  Float_t fWidthHV[kNAliases];
+  TClonesArray fGraphs;                         // Array containing  graphics
+  TH1F *fHv[kNHvChannel];                  // High Voltage histograms
+  Float_t fMeanHV[kNHvChannel];            // High Voltage mean values
+  Float_t fWidthHV[kNHvChannel];           // High Voltage widths
+  Bool_t  fDeadChannel[kNHvChannel];       // Dead Map 
+  TMap * fFEEParameters;  // TMap holding the FEE parameters of Time Resolution
+    
   Bool_t fIsProcessed;                   // bool to know processing status
   
-  ClassDef(AliVZERODataDCS, 2);
+  ClassDef(AliVZERODataDCS, 5);
 };
 
 #endif