From: mivanov Date: Tue, 25 Jun 2013 08:40:08 +0000 (+0000) Subject: Adding print function and constant getter to the array of sensors X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=3dc6d65a9bedca517ba2d79f0bdd24396d0d6d3c Adding print function and constant getter to the array of sensors --- diff --git a/STEER/CDB/AliDCSSensor.cxx b/STEER/CDB/AliDCSSensor.cxx index aed5f6dfc44..cb0aa4e5c94 100644 --- a/STEER/CDB/AliDCSSensor.cxx +++ b/STEER/CDB/AliDCSSensor.cxx @@ -78,10 +78,26 @@ AliDCSSensor& AliDCSSensor::operator=(const AliDCSSensor& source){ return *this; } + +void AliDCSSensor::Print(const Option_t* option="") const{ + // + // + // + TString opt = option; opt.ToLower(); + printf("%s:%s\n",GetTitle(), GetName()); + printf("%s\n",fStringID.GetTitle()); + if (!fSensors) return; + Int_t nsensors=fSensors->GetEntries(); + for (Int_t i=0; iAt(i)) fSensors->At(i)->Print(option); + } +} + //_____________________________________________________________________________ Double_t AliDCSSensor::GetValue(UInt_t timeSec) { - // + // // Get DCS value for actual sensor // timeSec given as offset from start-of-map measured in seconds // *NOTE* In the current TPC setup, start-of-map is defined as the diff --git a/STEER/CDB/AliDCSSensor.h b/STEER/CDB/AliDCSSensor.h index 04849618cae..b9d17191b0f 100644 --- a/STEER/CDB/AliDCSSensor.h +++ b/STEER/CDB/AliDCSSensor.h @@ -35,11 +35,12 @@ public: AliDCSSensor(const AliDCSSensor& source); virtual ~AliDCSSensor(){} AliDCSSensor& operator=(const AliDCSSensor& source); + virtual void Print(const Option_t* option="") const; Int_t GetId() const {return fId; } Int_t GetIdDCS() const {return fIdDCS; } const TString& GetStringID() const {return fStringID; } - + Double_t GetX() const {return fX; } Double_t GetY() const {return fY; } Double_t GetZ() const {return fZ; } diff --git a/STEER/CDB/AliDCSSensorArray.cxx b/STEER/CDB/AliDCSSensorArray.cxx index 325050d5f02..c8adb21d871 100644 --- a/STEER/CDB/AliDCSSensorArray.cxx +++ b/STEER/CDB/AliDCSSensorArray.cxx @@ -189,6 +189,15 @@ AliDCSSensorArray &AliDCSSensorArray::operator=(const AliDCSSensorArray &c) return *this; } +void AliDCSSensorArray::Print(const Option_t* option="") const{ + // + // print function overwriten + // + TString opt = option; opt.ToLower(); + printf("%s:%s\n",GetTitle(), GetName()); + printf("%s\n",fStringID.GetTitle()); +} + //____________________________________________________________________________ void AliDCSSensorArray::SetGraph(TMap *map) diff --git a/STEER/CDB/AliDCSSensorArray.h b/STEER/CDB/AliDCSSensorArray.h index dafc3941624..939aec3b861 100644 --- a/STEER/CDB/AliDCSSensorArray.h +++ b/STEER/CDB/AliDCSSensorArray.h @@ -32,6 +32,8 @@ class AliDCSSensorArray : public TNamed { AliDCSSensorArray(const AliDCSSensorArray &c); virtual ~AliDCSSensorArray(); AliDCSSensorArray &operator=(const AliDCSSensorArray &c); + virtual void Print(const Option_t* option="") const; + void SetStartTime (const TTimeStamp& start) { fStartTime = start; } void SetEndTime (const TTimeStamp& end) { fEndTime = end; } TTimeStamp GetStartTime () const { return fStartTime; } @@ -75,9 +77,9 @@ class AliDCSSensorArray : public TNamed { Int_t GetFirstIdDCS() const; Int_t GetLastIdDCS() const; + const TClonesArray * GetArray(){return fSensors;} - - protected: + protected: Int_t fMinGraph; // minimum #points of graph to be fitted Int_t fMinPoints; // minimum number of points per knot in fit Int_t fIter; // number of iterations for spline fit