// $Id$
+#include "TObjArray.h"
+#include "AliDCSValue.h"
#include "AliMUONVSubprocessor.h"
+//-----------------------------------------------------------------------------
/// \class AliMUONVSubprocessor
///
/// Base class for a shuttle sub-task for MUON (either TRK or TRG)
/// to be performed within the MUON shuttle's preprocessors
///
/// \author Laurent Aphecetche
-///
+//-----------------------------------------------------------------------------
/// \cond CLASSIMP
ClassImp(AliMUONVSubprocessor)
AliMUONVSubprocessor::AliMUONVSubprocessor(AliMUONPreprocessor* master,
const char* name,
const char* title)
-: TNamed(name,title), fMaster(master)
+ : TNamed(name,title), fMaster(master),
+ fStartTime(0),
+ fEndTime(0)
{
/// ctor
}
}
//_____________________________________________________________________________
-void
+Bool_t
AliMUONVSubprocessor::Initialize(Int_t /*run*/,
- UInt_t /*startTime*/,
- UInt_t /*endTime*/)
+ UInt_t startTime,
+ UInt_t endTime)
{
/// optional
+ fStartTime = startTime; // time_created
+ fEndTime = endTime; // time_completed
+ return kTRUE;
+}
+
+//_____________________________________________________________________________
+Bool_t
+AliMUONVSubprocessor::RemoveValuesOutsideRun(TObjArray* values)
+{
+ /// Remove values outside run time limits
+
+ TIter next(values);
+ AliDCSValue* val = 0x0;
+
+ Bool_t removedValues = kFALSE;
+
+ while ( ( val = static_cast<AliDCSValue*>(next()) ) )
+ {
+ if ( val->GetTimeStamp() < fStartTime || val->GetTimeStamp() > fEndTime ) {
+ values->Remove(val);
+ removedValues = kTRUE;
+ }
+ }
+ values->Compress();
+
+ return removedValues;
}