* provided "as is" without express or implied warranty. *
**************************************************************************/
-/// $Id$
+// $Id$
+
+//-----------------------------------------------------------------------------
/// \class AliMUONHVSubprocessor
///
/// A subprocessor to read HV values for one run
/// It simply creates a copy of the dcsAliasMap w/o information
/// from the MUON TRK, and dumps this copy into the CDB
///
-// Author: Laurent Aphecetche, Subatech
+/// \author Laurent Aphecetche, Subatech
+//-----------------------------------------------------------------------------
#include "AliMUONHVSubprocessor.h"
-#include "AliMUONHVNamer.h"
#include "AliMUONPreprocessor.h"
#include "AliMpDEIterator.h"
#include "AliMpDEManager.h"
+#include "AliMpHVNamer.h"
#include "AliCDBMetaData.h"
#include "AliLog.h"
/// dtor
}
-//_____________________________________________________________________________
-void
-AliMUONHVSubprocessor::Initialize(Int_t run,
- UInt_t startTime, UInt_t endTime)
-{
- /// Initialisation for a given run
- AliDebug(1,Form("run %d startTime %ld endtime %ld",run,startTime,endTime));
-}
-
//_____________________________________________________________________________
UInt_t
AliMUONHVSubprocessor::Process(TMap* dcsAliasMap)
TMap hv;
hv.SetOwner(kTRUE);
- AliMUONHVNamer hvNamer;
+ AliMpHVNamer hvNamer;
AliMpDEIterator deIt;
TIter next(&aliases);
TObjString* alias;
+ Bool_t kNoAliases(kTRUE);
+ Int_t aliasNotFound(0);
+ Int_t valueNotFound(0);
while ( ( alias = static_cast<TObjString*>(next()) ) )
{
TPair* hvPair = static_cast<TPair*>(dcsAliasMap->FindObject(aliasName.Data()));
if (!hvPair)
{
- Master()->Log(Form("Did not find expected alias (%s)",aliasName.Data()));
+ ++aliasNotFound;
}
else
{
- TObjArray* values = static_cast<TObjArray*>(hvPair->Value());
+ kNoAliases = kFALSE;
+ TObjArray* values = static_cast<TObjArray*>(hvPair->Value()->Clone());
if (!values)
{
- Master()->Log(Form("Could not get values for alias (%s)",aliasName.Data()));
+ ++valueNotFound;
}
else
{
}
}
- Master()->Log("Aliases successfully read in");
+ if ( kNoAliases )
+ {
+ Master()->Log("ERROR : no DCS values found");
+ return 1;
+ }
+
+ if ( aliasNotFound )
+ {
+ Master()->Log(Form("WARNING %d aliases not found",aliasNotFound));
+ }
+
+ if ( valueNotFound )
+ {
+ Master()->Log(Form("WARNING %d values not found",valueNotFound));
+ }
+
+ Master()->Log("INFO Aliases successfully read in");
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
Bool_t validToInfinity(kFALSE);
- UInt_t result = Master()->Store("Calib","HV",&hv,&metaData,0,validToInfinity);
+ Bool_t result = Master()->Store("Calib","HV",&hv,&metaData,0,validToInfinity);
- return result;
+ return ( result != kTRUE); // return 0 if everything is ok
}