]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRawDataErrorLog.cxx
Processing SPD Mean Vertex only in PHYSICS runs.
[u/mrichter/AliRoot.git] / STEER / AliRawDataErrorLog.cxx
index 95a40ae9ae32affdccf4e82c373d642f8d13fcc9..83b72cffe26195e9922e72b0e23ca6a4c2909380 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "AliRawDataErrorLog.h"
 
+#include <Riostream.h>
+
 ClassImp(AliRawDataErrorLog)
 
 //_____________________________________________________________________________
@@ -89,6 +91,19 @@ AliRawDataErrorLog & AliRawDataErrorLog::operator=(const AliRawDataErrorLog &sou
   return *this;
 }
 
+void AliRawDataErrorLog::Copy(TObject &obj) const {
+  
+  // this overwrites the virtual TOBject::Copy()
+  // to allow run time copying without casting
+  // in AliESDEvent
+
+  if(this==&obj)return;
+  AliRawDataErrorLog *robj = dynamic_cast<AliRawDataErrorLog*>(&obj);
+  if(!robj)return; // not an AliRawDataErrorLog
+  *robj = *this;
+
+}
+
 //_____________________________________________________________________________
 Int_t AliRawDataErrorLog::Compare(const TObject *obj) const
 {
@@ -108,3 +123,37 @@ Int_t AliRawDataErrorLog::Compare(const TObject *obj) const
   else
     return ((fEventNumber > eventNumber) ? 1 : -1);
 }
+
+//_____________________________________________________________________________
+const char*
+AliRawDataErrorLog::GetErrorLevelAsString() const
+{
+  switch ( GetErrorLevel() )
+  {
+    case kMinor:
+      return "MINOR";
+      break;
+    case kMajor:
+      return "MAJOR";
+      break;
+    case kFatal:
+      return "FATAL";
+      break;
+    default:
+      return "INVALID";
+      break;
+  }
+  
+}
+
+//_____________________________________________________________________________
+void
+AliRawDataErrorLog::Print(Option_t*) const
+{
+  cout << Form("EventNumber %10d DdlID %5d ErrorLevel %10s ErrorCode %4d Occurence %5d",
+               GetEventNumber(),GetDdlID(),
+               GetErrorLevelAsString(),
+               GetErrorCode(),
+               GetCount()) << endl;
+  cout << "    " << GetMessage() << endl;
+}