AliTimeStamp datum and methods added
authorlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Jul 2009 14:45:32 +0000 (14:45 +0000)
committerlietava <lietava@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Jul 2009 14:45:32 +0000 (14:45 +0000)
STEER/AliTriggerScalersRecordESD.cxx
STEER/AliTriggerScalersRecordESD.h

index 276e10a..ec730b9 100644 (file)
@@ -16,6 +16,7 @@
 \r
 #include <Riostream.h>\r
 #include <TObjArray.h>\r
+#include <AliTimeStamp.h>\r
 #include "AliLog.h"  \r
 #include "AliTriggerScalersESD.h"\r
 #include "AliTriggerScalersRecordESD.h"\r
@@ -24,6 +25,7 @@ ClassImp( AliTriggerScalersRecordESD )
 //_____________________________________________________________________________\r
 AliTriggerScalersRecordESD::AliTriggerScalersRecordESD():\r
 TObject(),\r
+fTimestamp(),\r
 fScalers()\r
 {\r
 }\r
@@ -44,8 +46,10 @@ void AliTriggerScalersRecordESD::AddTriggerScalers( UChar_t classIndex, ULong64_
 //_____________________________________________________________________________\r
 AliTriggerScalersRecordESD::AliTriggerScalersRecordESD( const AliTriggerScalersRecordESD &rec ) :\r
 TObject(rec),\r
+fTimestamp(rec.fTimestamp),\r
 fScalers()\r
 {\r
+//copy constructor\r
 for (Int_t i = 0; i < rec.fScalers.GetEntriesFast(); i++) {\r
     if (rec.fScalers[i]) fScalers.Add(rec.fScalers[i]->Clone());\r
   }\r
@@ -53,8 +57,10 @@ for (Int_t i = 0; i < rec.fScalers.GetEntriesFast(); i++) {
 //_____________________________________________________________________________\r
 AliTriggerScalersRecordESD& AliTriggerScalersRecordESD:: operator=(const AliTriggerScalersRecordESD& rec)\r
 {\r
+//asignment operator\r
 if(&rec == this) return *this;\r
 ((TObject *)this)->operator=(rec);\r
+fTimestamp=rec.fTimestamp;\r
 for (Int_t i = 0; i < rec.fScalers.GetEntriesFast(); i++) {\r
     if (rec.fScalers[i]) fScalers.Add(rec.fScalers[i]->Clone());\r
   }\r
index 6a40cd4..8994c0b 100644 (file)
 //\r
 //////////////////////////////////////////////////////////////////////////////\r
 #include <TObjArray.h>\r
+#include "AliTimeStamp.h"\r
 class TObjArray;\r
+class AliTimeStamp;\r
 class AliTriggerScalersESD;\r
 \r
 class AliTriggerScalersRecordESD : public TObject {\r
 \r
 public:\r
-                            AliTriggerScalersRecordESD();\r
-                    \r
-                            virtual   ~AliTriggerScalersRecordESD() { fScalers.SetOwner(); fScalers.Delete(); }\r
-                 \r
-                    void    Reset();\r
-                    void    AddTriggerScalers( AliTriggerScalersESD* scaler );\r
-                    void    AddTriggerScalers( UChar_t classIndex, ULong64_t LOCB, ULong64_t LOCA,        \r
-                                              ULong64_t L1CB, ULong64_t L1CA, ULong64_t L2CB, ULong64_t L2CA );\r
-                            \r
-         const TObjArray*   GetTriggerScalers()  const { return  &fScalers; }\r
-    const AliTriggerScalersESD*   GetTriggerScalersForClass( const Int_t classindex ) const;       \r
-                                \r
-            virtual void    Print( const Option_t* opt ="" ) const;\r
+                              AliTriggerScalersRecordESD();\r
+                   virtual   ~AliTriggerScalersRecordESD() { fScalers.SetOwner(); fScalers.Delete(); }       \r
+                      void    Reset();\r
+                      void    AddTriggerScalers( AliTriggerScalersESD* scaler );\r
+                      void    AddTriggerScalers( UChar_t classIndex, ULong64_t LOCB, ULong64_t LOCA,        \r
+                                              ULong64_t L1CB, ULong64_t L1CA, ULong64_t L2CB, ULong64_t L2CA );                            \r
+           const TObjArray*   GetTriggerScalers()  const { return  &fScalers; }\r
+const AliTriggerScalersESD*   GetTriggerScalersForClass( const Int_t classindex ) const;       \r
+        const AliTimeStamp*   GetTimeStamp() const {return &fTimestamp;};\r
+                       void   SetTimeStamp(AliTimeStamp stamp){fTimestamp = stamp;};  \r
+               virtual void   Print( const Option_t* opt ="" ) const;\r
                       \r
-                      AliTriggerScalersRecordESD( const AliTriggerScalersRecordESD &rec );\r
+                           AliTriggerScalersRecordESD( const AliTriggerScalersRecordESD &rec );\r
                       AliTriggerScalersRecordESD&   operator=(const AliTriggerScalersRecordESD& rec);      \r
                \r
 \r
 private:  \r
-\r
+                        AliTimeStamp fTimestamp;    // record timestamp\r
                         TObjArray    fScalers;      // Array of scalers (AliTriggerScalersESD) \r
-                        ClassDef( AliTriggerScalersRecordESD, 1 )  // Define a Record of Trigger Scalers \r
+                        ClassDef( AliTriggerScalersRecordESD, 2 )  // Define a Record of Trigger Scalers \r
 };\r
 \r
 #endif\r