- // make a robust XML validation
- TSAXParser testParser;
- if (fileExistS && testParser.ParseFile(xmlFileS.Data()) < 0 ) {
- Log("ERROR: XML content (SOR) is not well-formed.");
- return 10;
- } else if (fileExistE && testParser.ParseFile(xmlFileE.Data()) < 0 ) {
- Log("ERROR: XML content (EOR) is not well-formed.");
- return 11;
- }
- Log("XML contents are well-formed.");
-
- // create parser and parse
- TSAXParser saxParserS, saxParserE;
- AliTRDSaxHandler saxHandlerS, saxHandlerE;
- if (fileExistS) {
- saxParserS.ConnectToHandler("AliTRDSaxHandler", &saxHandlerS);
- saxParserS.ParseFile(xmlFileS.Data());
- }
- if (fileExistE) {
- saxParserE.ConnectToHandler("AliTRDSaxHandler", &saxHandlerE);
- saxParserE.ParseFile(xmlFileE.Data());
- }
- // report errors of the parser if present
- if (fileExistS && saxParserS.GetParseCode() != 0) {
- Log(Form("ERROR in XML file validation. SOR Parse Code: %s", saxParserS.GetParseCode()));
- return 12;
- }
- if (fileExistE && saxParserE.GetParseCode() != 0) {
- Log(Form("ERROR in XML file validation. EOR Parse Code: %s", saxParserE.GetParseCode()));
- return 13;
- }
- Log("XML file validation OK.");
- // report errors of the handler if present
- if (fileExistS && saxHandlerS.GetHandlerStatus() != 0) {
- Log(Form("ERROR while creating calibration objects. SOR Error code: %s", saxHandlerS.GetHandlerStatus()));
- return 14;
- }
- if (fileExistE && saxHandlerE.GetHandlerStatus() != 0) {
- Log(Form("ERROR while creating calibration objects. EOR Error code: %s", saxHandlerE.GetHandlerStatus()));
- return 15;
+ // report errors of the parser if present
+ if (saxParser.GetParseCode() != 0) {
+ Log(Form("Warning: %s XML file validation failed! Parse code: %d", esor[iFile].Data(), saxParser.GetParseCode()));
+ continue;
+ }
+ Log(Form("%s XML validation OK.", esor[iFile].Data()));
+
+ // report errors of the handler if present
+ if (saxHandler.GetHandlerStatus() != 0) {
+ Log(Form("Warning: Creating %s calibration object failed! Error code: %d", esor[iFile].Data(), saxHandler.GetHandlerStatus()));
+ continue;
+ }
+ Log(Form("%s SAX handler reports no errors.", esor[iFile].Data()));
+
+ // get the calibration object storing the data from the handler
+ AliTRDCalDCSv2 *calDCSObj = (AliTRDCalDCSv2*)saxHandler.GetCalDCSObj()->Clone();
+ calDCSObj->EvaluateGlobalParameters();
+ calDCSObj->SetRunType(GetRunType());
+ calDCSObj->SetStartTime(GetStartTimeDCSQuery());
+ calDCSObj->SetEndTime(GetEndTimeDCSQuery());
+ if (iFile == 0) fCalDCSObjSOR = calDCSObj;
+ if (iFile == 1) fCalDCSObjEOR = calDCSObj;