Minor modifications along with moving from const char* to TString.
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Aug 2006 15:48:44 +0000 (15:48 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Aug 2006 15:48:44 +0000 (15:48 +0000)
STEER/AliLHCTag.cxx
STEER/AliLHCTag.h

index 4275e37..daf0b01 100644 (file)
 //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
 //-----------------------------------------------------------------
 
-#include <stdlib.h>
-#include <Riostream.h>
-
 #include "AliLHCTag.h"
 
 ClassImp(AliLHCTag)
 
-//______________________________________________________________________________
-AliLHCTag::AliLHCTag()
+//___________________________________________________________________________
+  AliLHCTag::AliLHCTag() : 
+    TObject(),  
+    fLHCState(0),
+    fLHCLuminosity(-10.)
 {
-  fLHCLuminosity = -1.0;
+  // AliLHCTag default constructor
 }
 
-//______________________________________________________________________________
-AliLHCTag::~AliLHCTag()
-{
+//___________________________________________________________________________
+AliLHCTag::~AliLHCTag() {
+  // AliEventTag destructor
 }
index 5f82f63..b52deaf 100644 (file)
 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
 //-------------------------------------------------------------------------
 
-#include <stdlib.h>
-#include <Riostream.h>
-
 #include "TObject.h"
-#include "TClonesArray.h"
+#include "TString.h"
 
 //______________________________________________________________________________
-class AliLHCTag : public TObject
-{
- private:
-  Char_t   fLHCState[50];                 //LHC run conditions - comments
-  Float_t  fLHCLuminosity;                //the value of the luminosity
-  
+class AliLHCTag : public TObject {
  public:
   AliLHCTag();
   virtual ~AliLHCTag();
   
-  void          SetLHCState(char *type) {strcpy(fLHCState,type);}
-  void          SetLuminosity(Float_t lumin) {fLHCLuminosity = lumin;}
-  void          SetLHCTag(Float_t lumin, char *type) {fLHCLuminosity = lumin; strcpy(fLHCState,type); }
+  //____________________________________________________//
+  void SetLHCState(TString type) {fLHCState = type;}
+  void SetLuminosity(Float_t lumin) {fLHCLuminosity = lumin;}
+  void SetLHCTag(Float_t lumin, TString type) {fLHCLuminosity = lumin; fLHCState = type; }
   
-  char         *GetLHCState() {return fLHCState;}
-  Float_t       GetLuminosity() {return fLHCLuminosity;}
+  //____________________________________________________//
+  const char *GetLHCState() {return fLHCState.Data();}
+  Float_t     GetLuminosity() const {return fLHCLuminosity;}
+  
+  //____________________________________________________//
+ private:
+  TString fLHCState;      //LHC run conditions - comments
+  Float_t fLHCLuminosity; //the value of the luminosity
   
   ClassDef(AliLHCTag,1)  //(ClassName, ClassVersion)
 };