* 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 "AliMpDCSNamer.h"
#include "AliCDBMetaData.h"
#include "AliLog.h"
TMap hv;
hv.SetOwner(kTRUE);
- AliMUONHVNamer hvNamer;
+ AliMpDCSNamer hvNamer("TRACKER");
AliMpDEIterator deIt;
switch ( AliMpDEManager::GetStationType(detElemId) )
{
- case AliMp::kStation1:
- case AliMp::kStation2:
+ case AliMp::kStation12:
{
for ( int i = 0; i <3; ++i)
{
- aliases.Add(new TObjString(hvNamer.DCSHVChannelName(detElemId,i)));
+ aliases.Add(new TObjString(hvNamer.DCSChannelName(detElemId,i)));
}
}
break;
case AliMp::kStation345:
{
- aliases.Add(new TObjString(hvNamer.DCSHVChannelName(detElemId)));
+ aliases.Add(new TObjString(hvNamer.DCSChannelName(detElemId)));
for ( int i = 0; i < hvNamer.NumberOfPCBs(detElemId); ++i)
{
- aliases.Add(new TObjString(hvNamer.DCSHVSwitchName(detElemId,i)));
+ aliases.Add(new TObjString(hvNamer.DCSSwitchName(detElemId,i)));
}
}
break;
if (!hvPair)
{
++aliasNotFound;
-// Master()->Log(Form("WARNING Did not find expected alias (%s)",aliasName.Data()));
}
else
{
- TObjArray* values = static_cast<TObjArray*>(hvPair->Value());
+ kNoAliases = kFALSE;
+ TObjArray* values = static_cast<TObjArray*>(hvPair->Value()->Clone());
if (!values)
{
++valueNotFound;
-// Master()->Log(Form("WARNING Could not get values for alias (%s)",aliasName.Data()));
}
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);
}
}
- kNoAliases = kFALSE;
}
if ( kNoAliases )
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
}