X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONHVSubprocessor.cxx;h=b782e5ff69ad91ecf55cf75c5101872f6661ffa2;hb=c40ebacc6f4a624ce45289c6ff16fb182561feaa;hp=0821c8569c703269c28b8800152fbe8c0835145c;hpb=d3f57575d0dfa0cb8edcf7a4dd127f66e6875231;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONHVSubprocessor.cxx b/MUON/AliMUONHVSubprocessor.cxx index 0821c8569c7..b782e5ff69a 100644 --- a/MUON/AliMUONHVSubprocessor.cxx +++ b/MUON/AliMUONHVSubprocessor.cxx @@ -13,7 +13,9 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/// $Id$ +// $Id$ + +//----------------------------------------------------------------------------- /// \class AliMUONHVSubprocessor /// /// A subprocessor to read HV values for one run @@ -21,14 +23,15 @@ /// 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" @@ -56,15 +59,6 @@ AliMUONHVSubprocessor::~AliMUONHVSubprocessor() /// 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) @@ -74,7 +68,7 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap) TMap hv; hv.SetOwner(kTRUE); - AliMUONHVNamer hvNamer; + AliMpHVNamer hvNamer; AliMpDEIterator deIt; @@ -118,6 +112,9 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap) TIter next(&aliases); TObjString* alias; + Bool_t kNoAliases(kTRUE); + Int_t aliasNotFound(0); + Int_t valueNotFound(0); while ( ( alias = static_cast(next()) ) ) { @@ -125,14 +122,15 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap) TPair* hvPair = static_cast(dcsAliasMap->FindObject(aliasName.Data())); if (!hvPair) { - Master()->Log(Form("Did not find expected alias (%s)",aliasName.Data())); + ++aliasNotFound; } else { - TObjArray* values = static_cast(hvPair->Value()); + kNoAliases = kFALSE; + TObjArray* values = static_cast(hvPair->Value()->Clone()); if (!values) { - Master()->Log(Form("Could not get values for alias (%s)",aliasName.Data())); + ++valueNotFound; } else { @@ -143,7 +141,23 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap) } } - 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); @@ -152,8 +166,8 @@ AliMUONHVSubprocessor::Process(TMap* dcsAliasMap) 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 }