}
else
{
- //FIXME : should insure here that values are only the ones within run
- //limits (startTime<timestamp<endTime)
+ RemoveValuesOutsideRun(values);
+
hv.Add(new TObjString(aliasName.Data()),values);
}
}
#include "AliCDBMetaData.h"
#include "AliLog.h"
+#include "AliDCSValue.h"
#include "Riostream.h"
#include "TMap.h"
else
{
TObjArray* values = static_cast<TObjArray*>(dcsMapPair->Value()->Clone());
- //FIXME : should insure here that values are only the ones within run
- //limits (startTime<timestamp<endTime)
+ RemoveValuesOutsideRun(values);
+
dcsMap.Add(new TObjString(aliasName.Data()),values);
}
}
// $Id$
+#include "TObjArray.h"
+#include "AliDCSValue.h"
#include "AliMUONVSubprocessor.h"
//-----------------------------------------------------------------------------
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
AliMUONVSubprocessor::Initialize(Int_t /*run*/,
- UInt_t /*startTime*/,
- UInt_t /*endTime*/)
+ UInt_t startTime,
+ UInt_t endTime)
{
/// optional
+ fStartTime = startTime;
+ fEndTime = endTime;
+}
+
+//_____________________________________________________________________________
+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;
}
#endif
class TMap;
+class TObjectArray;
class AliMUONPreprocessor;
class AliMUONVSubprocessor : public TNamed
protected:
/// Return the pointer to our master
AliMUONPreprocessor* Master() const { return fMaster; }
+
+ Bool_t RemoveValuesOutsideRun ( TObjArray* values );
/// Not implemented
AliMUONVSubprocessor();
private:
AliMUONPreprocessor* fMaster; ///< Pointer to our master
+ UInt_t fStartTime; ///< Start time of run
+ UInt_t fEndTime; ///< End time of run
- ClassDef(AliMUONVSubprocessor,1) // Base class of MUON shuttle sub(pre)processors
+ ClassDef(AliMUONVSubprocessor,2) // Base class of MUON shuttle sub(pre)processors
};
#endif
/// the rootlogon.C there) before compiling this macro :
/// <pre>
/// gSystem->Load("$ALICE_ROOT/SHUTTLE/TestShuttle/libTestShuttle");
+/// gSystem->Load("$ALICE_ROOT/MUON/libMUONshuttle");
/// </pre>
///
/// Having $ALICE_ROOT/SHUTTLE/TestShuttle directory in your LD_LIBRARY_PATH