+/****************************************************
+
+ AliACORDEDataDCS class
+ create to make a pointer to the
+ ACORDE data DCS points
+
+ Author: Pedro Gonzalez (CIEMAT, Madrid)
+ ACORDE-DCS creator: Mario Ivan Martinez Hdez
+ <mim@fcfm.buap.mx>
+
+ Last update: Fix of coding violations
+ Mario Rodriguez C. (FCFM-BUAP)
+ <mrodrigu@mail.cern.ch>
+
+*****************************************************/
#include "AliACORDEDataDCS.h"
#include "AliCDBMetaData.h"
fFunc(0),
fIsProcessed(kFALSE)
{
+// Init of class AliACORDEDataDCS
+// Gettin the TimeStamp an put it on a string
+
AliInfo(Form("\n\tRun %d \n\tStartTime %s \n\tEndTime %s", nRun,
TTimeStamp(startTime).AsString(),
TTimeStamp(endTime).AsString()));
fFunc(0),
fIsProcessed(kFALSE)
{
+// Setting the initial values
+// fRUn, Start of Run, End of Run, IsProcessed
fRun=data.fRun;
fStartTime=data.fStartTime;
}
//---------------------------------------------------------------
-void AliACORDEDataDCS::ProcessData(TMap& aliasMap){
+void AliACORDEDataDCS::ProcessData(TMap& aliasMap)
+{
+// Process of the data from the aliases DCS-data points
if(!(fHv[0])) Init();
}
//---------------------------------------------------------------
-void AliACORDEDataDCS::Init(){
+void AliACORDEDataDCS::Init()
+{
+// Init of AliACORDEDatDCS procedure
+// Loop over the aliases
TH1::AddDirectory(kFALSE);
//---------------------------------------------------------------
void AliACORDEDataDCS::CreateGraph(int i, int dim, const Double_t *x, const Double_t *y)
{
+// Create the plots for the ACORDE DCS
TGraph *gr = new(fGraphs[fGraphs.GetEntriesFast()]) TGraph(dim, x, y);
-#ifndef AliACORDEDataDCS_H
-#define AliACORDEDataDCS_H
+/****************************************************
+ AliACORDEDataDCS class
+ Pointer to the DCS objects
+ Author: Pedro Gonzalez (CIEMAT, Madrid)
+ Last updated: March 21 th 2010
+ Fixing coding violatgion
+ Mario Rodriguez (FCFM-BUAP, Puebla MX)
+
+*****************************************************/
+#ifndef AliACORDEDATADCS_H
+#define AliACORDEDATADCS_H
-#include <TMap.h>
#include <TClonesArray.h>
-#include <TH2F.h>
#include <TGraph.h>
-#include <TF1.h>
-
+#include <TMap.h>
class AliACORDEDataDCS : public TObject {
public:
enum {kNAliases=60, kNHistos=60, kNGraphs=60, kNFunctions=2};
~AliACORDEDataDCS();
- void SetRun(Int_t run) {fRun = run;}
+ void SetRun(Int_t run) {fRun = run;}
void SetStartTime(Int_t startTime) {fStartTime = startTime;}
void SetEndTime(Int_t endTime) {fEndTime = endTime;}
- Int_t GetRun() {return fRun;}
- Int_t GetStartTime() {return fStartTime;}
- Int_t GetEndTime() {return fEndTime;}
+ Int_t GetRun() const {return fRun;}
+ Int_t GetStartTime() const {return fStartTime;}
+ Int_t GetEndTime() const {return fEndTime;}
void ProcessData(TMap& aliasMap);
const char* GetAliasName(UInt_t pos)
{return pos<kNAliases ? fAliasNames[pos].Data() : 0;}
- const TH1F* GetHisto(UInt_t pos)
- {return pos<kNHistos ? fHv[pos] : 0;}
+ TH1F* GetHisto(UInt_t pos) const {return pos<kNHistos ? fHv[pos] : 0;}
- Float_t GetMean(UInt_t pos) {return pos<kNHistos ? fMean[pos] : 0;}
- Float_t GetWidth(UInt_t pos) {return pos<kNHistos ? fWidth[pos] : 0;}
+ Float_t GetMean(UInt_t pos) const {return pos<kNHistos ? fMean[pos] : 0;}
+ Float_t GetWidth(UInt_t pos) const {return pos<kNHistos ? fWidth[pos] : 0;}
- const TGraph* GetGraph(UInt_t pos)
- {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
+ const TGraph* GetGraph(UInt_t pos) {return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos)) : 0;}
- const TF1* GetFunction() {return fFunc;}
+ const TF1* GetFunction() const {return fFunc;}
Double_t Eval(int pos, Double_t time)
{return pos<kNGraphs ? ((TGraph*) fGraphs.UncheckedAt(pos))->Eval(time) : -1;}
void Introduce(UInt_t numAlias, const TObjArray* aliasArr);
void CreateGraph(int i, int dim, const Double_t *x, const Double_t *y);
- Int_t fRun;
- UInt_t fStartTime;
- UInt_t fEndTime;
+ Int_t fRun; // # of Run
+ UInt_t fStartTime; // Start time of the Run
+ UInt_t fEndTime; // End time of the Run
- Float_t fMean[kNHistos];
- Float_t fWidth[kNHistos];
+ Float_t fMean[kNHistos]; // Mean of hits distribution for ACORDE
+ Float_t fWidth[kNHistos]; // Width of the hits dist. for ACORDE
- TString fAliasNames[kNAliases];
- TH1F *fHv[kNHistos];
- TClonesArray fGraphs;
- TF1 *fFunc;
+ TString fAliasNames[kNAliases]; // Alias names for ACORDE Data Points
+ TH1F *fHv[kNHistos]; // High Voltage values
+ TClonesArray fGraphs; // Clones of plots for ACORDE
+ TF1 *fFunc; // Funtion for ACORDE DP
- Bool_t fIsProcessed;
+ Bool_t fIsProcessed; // Boolean flag to know if the vent was processed
ClassDef(AliACORDEDataDCS, 1);
};