+/****************************************************
+
+ 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"
fStartTime(0),
fEndTime(0),
fGraphs("TGraph",kNGraphs),
+ fFunc(0),
fIsProcessed(kFALSE)
{
- for(int i=0;i<kNHistos;i++) fHv[i]=0x0;
- fFunc = 0;
+ for(int i=0;i<kNHistos;i++)
+ {
+ fHv[i]=0x0;
+ fMean[i] = fWidth[i] = 0.0;
+ }
+
}
//---------------------------------------------------------------
fStartTime(startTime),
fEndTime(endTime),
fGraphs("TGraph",kNGraphs),
+ 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;
+
Init();
}
//---------------------------------------------------------------
AliACORDEDataDCS::~AliACORDEDataDCS() {
- for(int i=0;i<kNHistos;i++) {delete fHv[i]; fHv[i]=0;}
+ for(int i=0;i<kNHistos;i++)
+ {
+ delete fHv[i]; fHv[i]=0;
+ }
fGraphs.Clear("C");
fFunc=0;
}
+//---------------------------------------------------------------
+
+AliACORDEDataDCS::AliACORDEDataDCS(const AliACORDEDataDCS & data):
+TObject(),
+fRun(0),
+fStartTime(0),
+fEndTime(0),
+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;
+ fEndTime=data.fEndTime;
+ fFunc=data.fFunc;
+ fIsProcessed=data.fIsProcessed;
+
+
+ for(int i=0;i<kNAliases;i++){fAliasNames[i] = data.fAliasNames[i];}
+
+ for(int i=0;i<kNHistos;i++)
+ {
+ fHv[i]=data.fHv[i];
+ fMean[i]=data.fMean[i];
+ fWidth[i]=data.fWidth[i];
+ }
+
+
+
+}
+//--------------------------------------------------------------
+AliACORDEDataDCS& AliACORDEDataDCS:: operator=(const AliACORDEDataDCS & data) {
+
+
+ this->fRun=data.fRun;
+ this->fStartTime=data.fStartTime;
+ this->fEndTime=data.fEndTime;
+ this->fFunc=data.fFunc;
+ this->fIsProcessed=data.fIsProcessed;
+
+
+ for(int i=0;i<kNAliases;i++){this->fAliasNames[i] = data.fAliasNames[i];}
+
+ for(int i=0;i<kNHistos;i++)
+ {
+ this->fHv[i]=data.fHv[i];
+ }
+
+
+ return *this;
+
+}
//---------------------------------------------------------------
-void AliACORDEDataDCS::ProcessData(TMap& aliasMap){
+void AliACORDEDataDCS::ProcessData(TMap& aliasMap)
+{
+// Process of the data from the aliases DCS-data points
if(!(fHv[0])) Init();
if(aliasArr->GetEntries()<2)
{
- AliError(Form("Alias %s has just %d entries!",
+ AliError(Form("Alias %s has just %d entries!",
fAliasNames[j].Data(),aliasArr->GetEntries()));
continue;
}
}
//---------------------------------------------------------------
-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);