示例#1
0
void tag() {
  const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR");
	
  gSystem->Load("libNet.so");
  //  gSystem->Load("libMonaLisa.so");
	
  //  new TMonaLisaWriter(0, "GridAliRoot-tag.C", 0, 0, "global");
	
  
  TString fESDFileName = "alien://";
  fESDFileName += turl;
  fESDFileName += "/AliESDs.root";  
	
  TString fGUID = 0;
  GetGUID(fGUID);
	
  gEnv->Print();
	
  TString fAliroot, fRoot, fGeant;
  GetVersions(fAliroot,fRoot,fGeant);
	
  TString fPeriod, fPass, fName;
  GetProductionInfo(fPeriod, fPass, fName);
	
  UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID,fPeriod,fPass,fName);
}
示例#2
0
HRESULT DMSHelper::GetSpecificVersion(CStdStringW sDocID, CStdStringW sVersionID, WSDocumentVersionNoCom &wsDocVersion)
{
	try
	{
		std::vector<WSDocumentVersionNoCom> vVersions = GetVersions(sDocID);

		WSDocumentVersionNoCom vVersion;
		::ZeroMemory(&vVersion, sizeof(WSDocumentVersionNoCom));

		for(UINT i = 0; i< vVersions.size(); i++)
		{
			vVersion = vVersions[i];
			if(vVersion.GetVersionLabel().CompareNoCase(sVersionID) == 0)
			{
				break;
			}
		}
		wsDocVersion.SetWSDocument(vVersion.GetWSDocument());
		return GetDocument(wsDocVersion.GetWSDocument().GetDocId(), wsDocVersion.GetWSDocument(), 0);
	}
	catch(_com_error& e)
	{
		LOG_WS_ERROR_RESULT(e);
	}
	return E_FAIL;
}
示例#3
0
void tag() {
  const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR");
  TString fESDFileName = "alien://";
  fESDFileName += turl;
  fESDFileName += "/AliESDs.root";  

  TString fGUID = 0;
  GetGUID(fGUID);

  TString fAliroot, fRoot, fGeant;
  GetVersions(fAliroot,fRoot,fGeant);

  UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID);
}
示例#4
0
HRESULT DMSHelper::GetVersionInfo(const CStdStringW& sDocVersionID, WSDocumentVersionNoCom &wsDocVersion)
{
	LOG_WS_FUNCTION_SCOPE_MSG(sDocVersionID);

	try
	{
		CStdStringW sDocID(sDocVersionID);
		sDocID.Replace(L"\\",L"/");

		std::vector<WSDocumentVersionNoCom>::iterator itr;
		std::vector<WSDocumentVersionNoCom> vecVersions = GetVersions(sDocID);
		if(vecVersions.size() == 0)
		{
			CStdString sErr;
			sErr.Format(L"Failed to get versions for doc ID [%s]", sDocID);
			LOG_WS_ERROR(sErr.c_str());
			return E_FAIL;
		}

		for(itr = vecVersions.begin(); itr != vecVersions.end(); itr++)
		{
			CStdStringW sVersionDocID = itr->GetWSDocument().GetDocId();
			sVersionDocID.Replace(L"\\",L"/");
			if(sDocID.CompareNoCase(sVersionDocID) == 0 )
			{
				wsDocVersion = *itr;
				return S_OK;
			}
		}

		CStdString sMsg;
		sMsg.Format(L"Failed to get versions for doc ID [%s]", sDocID);
		LOG_WS_INFO(sMsg.c_str());
	}
	catch(_com_error &e)
	{
		LOG_WS_ERROR_RESULT(e);
		return e.Error();
	}
	catch(...)
	{
		LOG_WS_ERROR(_T("Unknown Exception"));
		return E_FAIL;
	}
	return E_DOCUMENT_NOT_FOUND;
}
示例#5
0
std::vector<WSDocNonCom> DMSHelper::GetAllRelatedDocs(CStdStringW sDocID)
{
	LOG_WS_FUNCTION_SCOPE_MSG(sDocID);

	try
	{
		std::vector<WSDocNonCom> vRelations;

		if(GetCapabilities(sDocID) & WS_VERSION_INDEPENDENT_RELATED_DOCUMENTS)
		{
			vRelations = GetRelatedDocs(sDocID);
		}
		else
		{
			std::vector<WSDocumentVersionNoCom> vVersions = GetVersions(sDocID);

			for (unsigned int i=0; i<vVersions.size(); i++)
			{
				std::vector<WSDocNonCom> vSomeRelations = GetRelatedDocs(vVersions[i].GetWSDocument().GetDocId());
				vRelations.insert(vRelations.end(), vSomeRelations.begin(), vSomeRelations.end());
			}
		}

		return vRelations;
	}
	catch(_com_error& e)
	{
		LOG_WS_ERROR_RESULT(e);
		throw;
	}
	catch(std::exception& e)
	{
		LOG_WS_ERROR_RESULT(e);
		throw;
	}
	catch(TCHAR*& e)
	{
		CStdString sErr(e);
		sErr.append(_T("(TCHAR*): This exception was thrown"));
		LOG_WS_ERROR(sErr);
		throw;
	}
}
示例#6
0
std::vector<WSDocNonCom> DMSHelper::GetAllRelatedSynergyDocs(CStdStringW sDocID)
{
	if(GetCapabilities(sDocID) & WS_VERSION_INDEPENDENT_RELATED_DOCUMENTS)
	{
		return GetSynergyRelatedDocs(sDocID);
	}
	else
	{
		std::vector<WSDocumentVersionNoCom> vVersions = GetVersions(sDocID);

		std::vector<WSDocNonCom> vAllRelations;

		for (unsigned int i=0; i<vVersions.size(); i++)
		{
			std::vector<WSDocNonCom> vSomeRelations = GetSynergyRelatedDocs(vVersions[i].GetWSDocument().GetDocId());
			vAllRelations.insert(vAllRelations.end(), vSomeRelations.begin(), vSomeRelations.end());
		}

		return vAllRelations;
	}
}