#include "AliMUONCalibParamND.h"
#include "AliMUONCalibrationData.h"
#include "AliMUONDigitCalibrator.h"
+#include "AliMUONLogger.h"
#include "AliMUONRawStreamTrackerHP.h"
#include "AliMUONTrackerData.h"
#include "AliMpDDLStore.h"
AliMUONVTrackerDataMaker(),
fRawReader(0x0),
fAccumulatedData(0x0),
+fIsOwnerOfAccumulatedData(kTRUE),
fOneEventData(0x0),
fDigitCalibrator(0x0),
fCalibrationData(0x0),
fRunNumber(0),
fIsRunning(kFALSE),
fIsOwnerOfRawReader(kFALSE),
-fIsEventByEvent(kFALSE)
+fIsEventByEvent(kFALSE),
+fLogger(0x0),
+fLastEventWasEmpty(kFALSE),
+fNumberOfPhysicsEvents(0),
+fNumberOfGoodPhysicsEvents(0)
{
/// Root IO ctor
}
AliMUONVTrackerDataMaker(),
fRawReader(rawReader),
fAccumulatedData(0x0),
+fIsOwnerOfAccumulatedData(kTRUE),
fOneEventData(new AliMUON2DMap(true)),
fDigitCalibrator(0x0),
fCalibrationData(0x0),
fRunNumber(runNumber),
fIsRunning(kFALSE),
fIsOwnerOfRawReader(kFALSE),
-fIsEventByEvent(kFALSE)
+fIsEventByEvent(kFALSE),
+fLogger(0x0),
+fLastEventWasEmpty(kFALSE),
+fNumberOfPhysicsEvents(0),
+fNumberOfGoodPhysicsEvents(0)
{
/// Ctor in which this object will NOT be the owner of the reader
/// and can NOT apply rewind to it, nor use Next on it.
AliMUONVTrackerDataMaker(),
fRawReader(rawReader),
fAccumulatedData(0x0),
+fIsOwnerOfAccumulatedData(kTRUE),
fOneEventData(new AliMUON2DMap(true)),
fDigitCalibrator(0x0),
fCalibrationData(0x0),
fRunNumber(0),
fIsRunning(kFALSE),
fIsOwnerOfRawReader(kTRUE),
-fIsEventByEvent(kFALSE)
+fIsEventByEvent(kFALSE),
+fLogger(0x0),
+fLastEventWasEmpty(kFALSE),
+fNumberOfPhysicsEvents(0),
+fNumberOfGoodPhysicsEvents(0)
{
/// Ctor in which we take the ownership of the rawReader, so we can rewind
/// and advance it as we wish
AliMUONVTrackerDataMaker(),
fRawReader(rawReader),
fAccumulatedData(0x0),
+fIsOwnerOfAccumulatedData(kTRUE),
fOneEventData(new AliMUON2DMap(true)),
fDigitCalibrator(0x0),
fCalibrationData(0x0),
fRunNumber(0),
fIsRunning(kFALSE),
fIsOwnerOfRawReader(kTRUE),
-fIsEventByEvent(kFALSE)
+fIsEventByEvent(kFALSE),
+fLogger(0x0),
+fLastEventWasEmpty(kFALSE),
+fNumberOfPhysicsEvents(0),
+fNumberOfGoodPhysicsEvents(0)
{
+ /// Ctor from raw data reader
if (fRawReader)
{
fRawReader->NextEvent(); // to be sure to get run number available
/// dtor
delete fOneEventData;
- delete fAccumulatedData;
+ if ( fIsOwnerOfAccumulatedData ) delete fAccumulatedData;
if ( fIsOwnerOfRawReader ) delete fRawReader;
delete fCalibrationData;
delete fDigitCalibrator;
fSource += other.fSource;
fNumberOfEvents += other.fNumberOfEvents;
-
+ fNumberOfPhysicsEvents += other.fNumberOfPhysicsEvents;
+ fNumberOfGoodPhysicsEvents += other.fNumberOfGoodPhysicsEvents;
+
TList list;
list.Add(other.fAccumulatedData);
return kFALSE;
}
- AliCodeTimerAuto("",);
-
- static Int_t nphysics(0);
- static Int_t ngood(0);
+ AliCodeTimerAuto("",0);
if ( !IsRunning() ) return kTRUE;
return kFALSE;
}
- Int_t eventType = fRawReader->GetType();
-
- ++fNumberOfEvents;
-
- if (eventType != AliRawEventHeaderBase::kPhysicsEvent )
- {
- return kTRUE; // for the moment
- }
-
- ++nphysics;
-
- Bool_t pok = ProcessEvent();
-
- if ( pok ) ++ngood;
-
- AliDebug(1,Form("n %10d nphysics %10d ngood %10d",fNumberOfEvents,nphysics,ngood));
+ ProcessEvent();
return kTRUE;
}
/// duplicate this critical piece of calibration code !
///
- AliCodeTimerAuto("",);
+ ++fNumberOfEvents;
- AliMUONRawStreamTrackerHP stream(fRawReader);
+ Int_t eventType = fRawReader->GetType();
+
+ if (eventType != AliRawEventHeaderBase::kPhysicsEvent )
+ {
+ return kTRUE; // for the moment
+ }
+
+ ++fNumberOfPhysicsEvents;
+
+ fLastEventWasEmpty = kFALSE;
+
+ AliCodeTimerAuto("",0);
+ AliMUONRawStreamTrackerHP stream(fRawReader);
+
stream.DisableWarnings();
-// stream.EnabbleErrorLogger();
+ stream.DisableRawReaderErrorLogger();
+ stream.DisableMUONErrorLogger();
+
+ if (fLogger)
+ {
+ stream.EnableMUONErrorLogger();
+ stream.SetMUONErrorLogger(fLogger);
+ stream.SetLoggingDetailLevel(AliMUONRawStreamTrackerHP::kMediumErrorDetail);
+ }
const Int_t nddls = AliDAQ::NumberOfDdls("MUONTRK");
TArrayI nevents(nddls);
if (!badEvent)
{
- fAccumulatedData->Add(*fOneEventData,&nevents);
+ fAccumulatedData->Add(*fOneEventData,&nevents);
+ if ( fOneEventData->GetSize() == 0 ) fLastEventWasEmpty = kTRUE;
+ ++fNumberOfGoodPhysicsEvents;
}
-
+
+ AliDebug(1,Form("n %10d nphysics %10d ngood %10d",fNumberOfEvents,fNumberOfPhysicsEvents,fNumberOfGoodPhysicsEvents));
+
return !badEvent;
}
{
fRawReader->RewindEvents();
fNumberOfEvents=0;
+ fNumberOfPhysicsEvents=0;
+ fNumberOfGoodPhysicsEvents=0;
}
else
{