#include "TMHistogrammingEventDumpHeaderShortErrorOnly.h"

//_____________________________________________________________________
TMHistogrammingEventDumpHeaderShortErrorOnly::TMHistogrammingEventDumpHeaderShortErrorOnly() :
  TMHistogrammingEventDump()
{
}
//_____________________________________________________________________
TMHistogrammingEventDumpHeaderShortErrorOnly::~TMHistogrammingEventDumpHeaderShortErrorOnly() {
}
//_____________________________________________________________________
void TMHistogrammingEventDumpHeaderShortErrorOnly::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())) {
	DumpHeaderShort(fEvent);
	DumpThis(" ");
	fNeedRedump=kTRUE;
      }
    }
    else {
      fEventAccept = kFALSE;
    }

  }

  TMHistogramming::EndEvent(str, globalEventNumber);
}
