X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=STEER%2FAliGRPPreprocessor.cxx;h=a6de7baf6f25f7053603fae01d6c2aabb337d772;hb=f91768e055f78749b06b681956997887648e759b;hp=63eec79a8ed20db47a89d09070ad727a7e6c8978;hpb=073502c9a41d16b476d3badde40ff9005f4492d8;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliGRPPreprocessor.cxx b/STEER/AliGRPPreprocessor.cxx index 63eec79a8ed..a6de7baf6f2 100644 --- a/STEER/AliGRPPreprocessor.cxx +++ b/STEER/AliGRPPreprocessor.cxx @@ -33,6 +33,9 @@ #include "AliGRPDCS.h" #include "AliDCSSensorArray.h" +#include "AliTriggerConfiguration.h" +#include "AliTriggerRunScalers.h" + #include "AliCDBMetaData.h" #include "AliLog.h" @@ -120,6 +123,16 @@ UInt_t AliGRPPreprocessor::Process(TMap* valueMap) { return 1; } + //=================// + // DCS FXS // + //=================// + UInt_t iDcsFxs = ProcessDcsFxs(); + if(iDcsFxs == 0) { + Log(Form("ProcessDcsFxs successful!")); + } else { + Log(Form("Could not store CTP run configuration and scalers!")); + return 1; + } //=================// // DCS data points // @@ -329,6 +342,95 @@ UInt_t AliGRPPreprocessor::ProcessDaqFxs() { } +//_______________________________________________________________ +UInt_t AliGRPPreprocessor::ProcessDcsFxs() { + //======DCS FXS======// + // Get the CTP run configuration + // and scalers from DCS FXS + + { + // Get the CTP run configuration + TList* list = GetFileSources(kDCS,"CTP_runconfig"); + if (!list) { + Log("No CTP runconfig file: connection problems with DAQ FXS logbook!"); + return 1; + } + + if (list->GetEntries() == 0) { + Log("No CTP runconfig file to be processed!"); + } + else { + TIter iter(list); + TObjString *source; + while ((source = dynamic_cast (iter.Next()))) { + TString runcfgfile = GetFile(kDCS, "CTP_runconfig", source->GetName()); + if (runcfgfile.IsNull()) { + Log("No CTP runconfig files has been found: empty source!"); + } + else { + Log(Form("File with Id CTP_runconfig found in source %s! Copied to %s",source->GetName(),runcfgfile.Data())); + AliTriggerConfiguration *runcfg = AliTriggerConfiguration::LoadConfiguration(runcfgfile); + if (!runcfg) { + Log("Bad CTP run configuration file! The corresponding CDB entry will not be filled!"); + } + else { + AliCDBMetaData metaData; + metaData.SetBeamPeriod(0); + metaData.SetResponsible("Roman Lietava"); + metaData.SetComment("CTP run configuration"); + if (!Store("CTP","Config", runcfg, &metaData, 0, 0)) { + Log("Unable to store the CTP run configuration object to OCDB!"); + } + } + } + } + } + delete list; + } + + { + // Get the CTP counters information + TList* list = GetFileSources(kDCS,"CTP_xcounters"); + if (!list) { + Log("No CTP counters file: connection problems with DAQ FXS logbook!"); + return 1; + } + + if (list->GetEntries() == 0) { + Log("No CTP counters file to be processed!"); + } + else { + TIter iter(list); + TObjString *source; + while ((source = dynamic_cast (iter.Next()))) { + TString countersfile = GetFile(kDCS, "CTP_xcounters", source->GetName()); + if (countersfile.IsNull()) { + Log("No CTP counters files has been found: empty source!"); + } + else { + Log(Form("File with Id CTP_xcounters found in source %s! Copied to %s",source->GetName(),countersfile.Data())); + AliTriggerRunScalers *scalers = AliTriggerRunScalers::ReadScalers(countersfile); + if (!scalers) { + Log("Bad CTP counters file! The corresponding CDB entry will not be filled!"); + } + else { + AliCDBMetaData metaData; + metaData.SetBeamPeriod(0); + metaData.SetResponsible("Roman Lietava"); + metaData.SetComment("CTP scalers"); + if (!Store("CTP","Scalers", scalers, &metaData, 0, 0)) { + Log("Unable to store the CTP scalers object to OCDB!"); + } + } + } + } + } + delete list; + } + + return 0; +} + //_______________________________________________________________ TList *AliGRPPreprocessor::ProcessDcsDPs(TMap* valueMap, UInt_t iStartTime, UInt_t iStopTime) { //Getting the DCS dps