]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conventions fixed for AliACORDEDataDCS class
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Mar 2010 18:47:32 +0000 (18:47 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Mar 2010 18:47:32 +0000 (18:47 +0000)
ACORDE/AliACORDEDataDCS.cxx
ACORDE/AliACORDEDataDCS.h

index 30f620b921e2a41772d0cdfff5e397e59e42268a..757a17fa3132543b88bc0a63d52def9e07e62c40 100644 (file)
@@ -1,3 +1,18 @@
+/****************************************************
+       
+  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"
@@ -39,6 +54,9 @@ AliACORDEDataDCS::AliACORDEDataDCS(Int_t nRun, UInt_t startTime, UInt_t endTime)
         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()));
@@ -66,6 +84,8 @@ fGraphs("TGraph",kNGraphs),
 fFunc(0),
 fIsProcessed(kFALSE)
 {
+// Setting the initial values
+// fRUn, Start of Run, End of Run, IsProcessed
 
        fRun=data.fRun;
        fStartTime=data.fStartTime;
@@ -102,7 +122,9 @@ AliACORDEDataDCS& AliACORDEDataDCS:: operator=(const AliACORDEDataDCS & data) {
  
 }
 //---------------------------------------------------------------
-void AliACORDEDataDCS::ProcessData(TMap& aliasMap){
+void AliACORDEDataDCS::ProcessData(TMap& aliasMap)
+{
+// Process of the data from the aliases DCS-data points
 
        if(!(fHv[0])) Init();
 
@@ -163,7 +185,10 @@ void AliACORDEDataDCS::ProcessData(TMap& aliasMap){
 }
 
 //---------------------------------------------------------------
-void AliACORDEDataDCS::Init(){
+void AliACORDEDataDCS::Init()
+{
+// Init of AliACORDEDatDCS procedure
+// Loop over the aliases
 
        TH1::AddDirectory(kFALSE);
 
@@ -197,6 +222,7 @@ void AliACORDEDataDCS::Introduce(UInt_t numAlias, const TObjArray* aliasArr)
 //---------------------------------------------------------------
 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);
 
index 2fd4766cd28c9c84eb370446821aac41511332e7..f654cfb45f1deeafa14c069336ea42f384b4c4ee 100644 (file)
@@ -1,12 +1,18 @@
-#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};
@@ -19,27 +25,25 @@ public:
 
        ~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;}
@@ -52,19 +56,19 @@ private:
        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);
 };