#include "TMHistogrammingEventDumpHeaderLongErrorOnly.h"

//_____________________________________________________________________
TMHistogrammingEventDumpHeaderLongErrorOnly::TMHistogrammingEventDumpHeaderLongErrorOnly() :
  TMHistogrammingEventDump()
{
}
//_____________________________________________________________________
TMHistogrammingEventDumpHeaderLongErrorOnly::~TMHistogrammingEventDumpHeaderLongErrorOnly() {
}
//_____________________________________________________________________
void TMHistogrammingEventDumpHeaderLongErrorOnly::EndEvent(AliITSRawStreamSPD *str, UInt_t globalEventNumber) {
  if (fEventAccept) {
    if (str->GetAdvancedErrorLog()->GetNrErrorsAllEq(0)>0) {
      TString newEv = Form("______________________________________________________EVENT %d (PHYSICS EVENT)______________________________________________________",globalEventNumber);
      if (DumpThis(newEv.Data())) {
	DumpHeaderLong(fEvent);
	DumpThis(" ");
	fNeedRedump=kTRUE;
      }
    }
    else {
      fEventAccept = kFALSE;
    }

  }

  TMHistogramming::EndEvent(str, globalEventNumber);
}
