+ //=======================//
+ // Trigger Configuration //
+ //=======================//
+ // either from DAQ logbook.....
+ const char * triggerConf = GetTriggerConfiguration();
+ if (triggerConf!= NULL) {
+ Log("Found trigger configuration in DAQ logbook");
+ AliTriggerConfiguration *runcfg = AliTriggerConfiguration::LoadConfigurationFromString(triggerConf);
+ if (!runcfg) {
+ Log("Bad CTP run configuration file from DAQ logbook! The corresponding CDB entry will not be filled!");
+ error |= 16;
+ }
+ else {
+ AliCDBMetaData metaData;
+ metaData.SetBeamPeriod(0);
+ metaData.SetResponsible("Roman Lietava");
+ metaData.SetComment("CTP run configuration from DAQ logbook");
+ if (!Store("CTP","Config", runcfg, &metaData, 0, 0)) {
+ Log("Unable to store the CTP run configuration object to OCDB!");
+ error |= 16;
+ }
+ }
+ }
+ // ...or from DCS FXS
+ else{
+ Log("No trigger configuration found in the DAQ logbook!! Trying reading from DCS FXS...");
+ TString runcfgfile = GetFile(kDCS, "CTP_runconfig", "");
+ if (runcfgfile.IsNull()) {
+ Log("No CTP runconfig files has been found in DCS FXS!");
+ error |= 16;
+ }
+ else {
+ Log(Form("File with Id CTP_runconfig found! Copied to %s",runcfgfile.Data()));
+ AliTriggerConfiguration *runcfg = AliTriggerConfiguration::LoadConfiguration(runcfgfile);
+ if (!runcfg) {
+ Log("Bad CTP run configuration file from DCS FXS! The corresponding CDB entry will not be filled!");
+ error |= 16;;
+ }
+ else {
+ AliCDBMetaData metaData;
+ metaData.SetBeamPeriod(0);
+ metaData.SetResponsible("Roman Lietava");
+ metaData.SetComment("CTP run configuration from DCS FXS");
+ if (!Store("CTP","Config", runcfg, &metaData, 0, 0)) {
+ Log("Unable to store the CTP run configuration object to OCDB!");
+ error |= 16;
+ }
+ }
+ }
+ }
+