//_______________________________________________________________
const Int_t AliGRPPreprocessor::fgknDAQLbPar = 8; // num parameters in the logbook
- const Int_t AliGRPPreprocessor::fgknDCSDP = 11; // number of dcs dps
+ const Int_t AliGRPPreprocessor::fgknDCSDP = 10; // number of dcs dps
const char* AliGRPPreprocessor::fgkDCSDataPoints[AliGRPPreprocessor::fgknDCSDP] = {
- "LHCState", // missing in DCS
+ "LHCState", // missing in DCS
"L3Polarity",
"DipolePolarity",
- "LHCLuminosity", // missing in DCS
- "BeamIntensity", // missing in DCS
+ "LHCLuminosity", // missing in DCS
+ "BeamIntensity", // missing in DCS
"L3Current",
"DipoleCurrent",
"CavernTemperature",
"CavernAtmosPressure",
- "gva_cr5AtmosphericPressure", // missing in DCS
- "gva_meyrinAtmosphericPressure" // missing in DCS
+ "SurfaceAtmosPressure"
};
const Short_t kSensors = 9; // start index position of sensor in DCS DPs
+ const Short_t kNumSensors = 1; // Number of sensors in DCS DPs
const char* AliGRPPreprocessor::fgkLHCState[20] = {
"P", "PREPARE",
"(DAQ logbook ERROR)",
"(DAQ FXS ERROR)",
"(DCS FXS ERROR)",
- "(DCS data points ERROR)"
+ "(DCS data points ERROR)",
+ "(Trigger Configuration ERROR)"
};
//_______________________________________________________________
AliGRPPreprocessor::AliGRPPreprocessor(AliShuttleInterface* shuttle):
- AliPreprocessor("GRP",shuttle), fPressure(0)
+ AliPreprocessor("GRP",shuttle), fPressure(0)
{
// constructor - shuttle must be instantiated!
AliPreprocessor::Initialize(run, startTime, endTime);
AliInfo("Initialization of the GRP preprocessor.");
-
- TClonesArray * array = new TClonesArray("AliDCSSensor",2);
- for(Int_t j = 0; j < 2; j++) {
+ TClonesArray * array = new TClonesArray("AliDCSSensor",kNumSensors);
+ for(Int_t j = 0; j < kNumSensors; j++) {
AliDCSSensor * sens = new ((*array)[j])AliDCSSensor;
sens->SetStringID(fgkDCSDataPoints[j+kSensors]);
}
// DCS data points //
//=================//
Int_t entries = ProcessDcsDPs( valueMap, grpmap );
- if( entries < fgknDCSDP-5 ) { // FIXME (!= ) LHCState and pressure map are not working yet...
+ if( entries < fgknDCSDP-3 ) { // FIXME (!= ) LHState and pressure map are not working yet...
Log(Form("Problem with the DCS data points!!!"));
error |= 8;
} else Log(Form("DCS data points, successful!"));
+ //=======================//
+ // 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 {
+ TString titleCTPcfg = Form("CTP cfg for run %i from DAQ",fRun);
+ runcfg->SetTitle(titleCTPcfg);
+ 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 {
+ TString titleCTPcfg = Form("CTP cfg for run %i from DCS",fRun);
+ runcfg->SetTitle(titleCTPcfg);
+ 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;
+ }
+ }
+ }
+ }
+
grpmap->SetOwner(1);
AliInfo(Form("Final list entries: %d",grpmap->GetEntries()));
Log("GRP Preprocessor Success");
return 0;
} else {
- Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s",
+ Log( Form("GRP Preprocessor FAILS!!! %s%s%s%s%s",
kppError[(error&1)?1:0],
kppError[(error&2)?2:0],
kppError[(error&4)?3:0],
- kppError[(error&8)?4:0]
+ kppError[(error&8)?4:0],
+ kppError[(error&16)?5:0]
));
return error;
}
{
//Getting the DAQ lb information
- const char* timeStart = GetRunParameter("time_start");
- const char* timeEnd = GetRunParameter("time_end");
+ const char* timeStart = GetRunParameter("DAQ_time_start");
+ const char* timeEnd = GetRunParameter("DAQ_time_end");
const char* beamEnergy = GetRunParameter("beamEnergy");
const char* beamType = GetRunParameter("beamType");
const char* numberOfDetectors = GetRunParameter("numberOfDetectors");
// Get the CTP run configuration
// and scalers from DCS FXS
+/*
{
+
// Get the CTP run configuration
TList* list = GetFileSources(kDCS,"CTP_runconfig");
if (!list) {
}
delete list;
}
-
+*/
{
// Get the CTP counters information
TList* list = GetFileSources(kDCS,"CTP_xcounters");
// NEEDS TO BE REVISED, CONFIRMED
- AliInfo(Form("==========GenevaPressureMaps==========="));
- AliDCSSensorArray *dcsSensorArray = GetPressureMap(valueMap,fPressure);
+ AliInfo(Form("==========P2PressureMap==========="));
+ AliDCSSensorArray *dcsSensorArray = GetPressureMap(valueMap);
if( fPressure->NumFits()==0 ) {
Log("Problem with the pressure sensor values!!!");
- } else {
- AliDCSSensor* sensorCr5 = dcsSensorArray->GetSensor(fgkDCSDataPoints[9]);
- if( sensorCr5->GetFit() ) {
- Log(Form("<GvaCr5Pressure> for run %d: Sensor Fit found",fRun));
- mapDCS->Add( new TObjString("fCr5Pressure"), sensorCr5 );
+ }
+ else {
+ AliDCSSensor* sensorP2 = dcsSensorArray->GetSensor(fgkDCSDataPoints[9]);
+ if( sensorP2->GetFit() ) {
+ Log(Form("<P2Pressure> for run %d: Sensor Fit found",fRun));
+ mapDCS->Add( new TObjString("fP2Pressure"), sensorP2 );
++entries;
- } else {
+ }
+ else {
Log(Form("ERROR Sensor Fit for %s not found: ", fgkDCSDataPoints[9] ));
}
+ /*
AliDCSSensor* sensorMeyrin = dcsSensorArray->GetSensor(fgkDCSDataPoints[10]);
if( sensorMeyrin->GetFit() ) {
Log(Form("<MeyrinPressure> for run %d: Sensor Fit found",fRun));
} else {
Log(Form("ERROR Sensor Fit for %s not found: ", fgkDCSDataPoints[10] ));
}
-
+ */
}
return entries;
}
//_______________________________________________________________
-AliDCSSensorArray *AliGRPPreprocessor::GetPressureMap(TMap* dcsAliasMap, AliDCSSensorArray *fPressure)
+AliDCSSensorArray *AliGRPPreprocessor::GetPressureMap(TMap* dcsAliasMap)
{
// extract DCS pressure maps. Perform fits to save space