Skip to content
Snippets Groups Projects
Commit 4642f8d2 authored by Atlas-Software Librarian's avatar Atlas-Software Librarian Committed by Graeme Stewart
Browse files

'CMakeLists.txt' (OutputStreamAthenaPool-00-02-84)

	* tag OutputStreamAthenaPool-00-02-84
	* src/AthenaPoolOutputStreamTool.cxx: Add items to satellite
	DataHeader if they have symlink.

2015-11-27 Will Buttinger <will@cern.ch>
	* src/AthenaPoolOutputStreamTool.cxx: Suppress warnings about missing CLID after first occurance, so that warnings don't appear on every event.
	* Tagging as OutputStreamAthenaPool-00-02-83

2015-11-20 Peter van Gemmeren <gemmeren@anl.gov>
	* python/OutputStreamAthenaPool.py: Remove some obsolete backward
	compatibility hacks.
	* Tagging as OutputStreamAthenaPool-00-02-82

2015-09-16  scott snyder  <snyder@bnl.gov>

	* Tagging OutputStreamAthenaPool-00-02-81.
	* Comply with ATLAS naming conventions.

	* src/AthenaPoolOutputStreamTool.cxx: Added check of availability of clid before adding to ItemList, when taking list from input
	* Tagging as OutputStreamAthenaPool-00-02-76
parent bbcbb134
No related branches found
No related tags found
No related merge requests found
################################################################################
# Package: OutputStreamAthenaPool
################################################################################
# Declare the package name:
atlas_subdir( OutputStreamAthenaPool )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
Control/AthenaBaseComps
Control/AthenaKernel
Control/SGTools
Control/StoreGate
Database/AthenaPOOL/AthenaPoolCnvSvc
Database/AthenaPOOL/AthenaPoolKernel
Database/AthenaPOOL/AthenaPoolUtilities
Database/PersistentDataModel
Event/EventInfo
GaudiKernel )
# Component(s) in the package:
atlas_add_component( OutputStreamAthenaPool
src/AthenaPoolOutputStreamTool.cxx
src/MakeEventStreamInfo.cxx
src/CopyEventStreamInfo.cxx
src/MakeInputDataHeader.cxx
src/components/*.cxx
LINK_LIBRARIES AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests AthenaPoolCnvSvcLib AthenaPoolUtilities PersistentDataModel EventInfo GaudiKernel )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
......@@ -8,12 +8,13 @@
from AthenaCommon.AppMgr import theApp
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaServices.AthenaServicesConf import AthenaOutputStream
from OutputStreamAthenaPoolConf import AthenaPoolOutputStreamTool
def createOutputStream( streamName, fileName = "", asAlg = False ):
writingTool = AthenaPoolOutputStreamTool( streamName + "Tool" )
writingTool.DataHeaderSatellites = [ "basic/:EventInfo#*" ]
outputStream = AthenaPoolOutputStreamProtect(
outputStream = AthenaOutputStream(
streamName,
WritingTool = writingTool,
ItemList = [ "EventInfo#*" ]
......@@ -25,7 +26,6 @@ def createOutputStream( streamName, fileName = "", asAlg = False ):
topSequence = AlgSequence()
topSequence += outputStream
else:
from AthenaServices.AthenaServicesConf import AthenaOutputStream
theApp.OutStreamType = "AthenaOutputStream"
theApp.addOutputStream( outputStream )
......@@ -49,21 +49,3 @@ def createOutputConditionStream( streamName, fileName = "" ):
## backward compat
AthenaPoolOutputStream = createOutputStream
AthenaPoolOutputConditionStream = createOutputConditionStream
from AthenaCommon import CfgMgr
class AthenaPoolOutputStreamProtect(CfgMgr.AthenaOutputStream):
def __init__(self, name='Stream1', **kw):
kw['name'] = kw.get('name', name)
super(AthenaPoolOutputStreamProtect, self).__init__(**kw)
return
def _set_output_file(self, fname):
self._properties['OutputFile'].__set__(self, fname)
from AthenaServices.AthenaServicesConf import AthenaOutputStream
AthenaOutputStream("%s_FH" % (self._name,)).OutputFile = fname
return
def _get_output_file(self):
return self._properties['OutputFile'].__get__(self)
OutputFile = property(_get_output_file, _set_output_file, "fwd doc...")
pass
......@@ -433,10 +433,17 @@ StatusCode AthenaPoolOutputStreamTool::streamObjects(const DataObjectVec& dataOb
}
for (std::vector<DataHeaderElement>::const_iterator thisToken = m_dataHeader->begin(),
endToken = m_dataHeader->end(); thisToken != endToken; thisToken++) {
if (iter->second.find(thisToken->getPrimaryClassID()) != iter->second.end()) {
satDataHeader->insert(*thisToken);
} else if (thisToken->getPrimaryClassID() == ClassID_traits<DataHeader>::ID()) {
if (thisToken->getPrimaryClassID() == ClassID_traits<DataHeader>::ID()) {
satDataHeader->insertProvenance(*thisToken);
} else {
std::set<CLID> symLinks = thisToken->getClassIDs();
for (std::set<CLID>::const_iterator symIter = symLinks.begin(),
symIterEnd = symLinks.end(); symIter != symIterEnd; symIter++) {
if (iter->second.find(*symIter) != iter->second.end()) {
satDataHeader->insert(*thisToken);
break;
}
}
}
}
DataObject* satDataHeaderObj = m_store->accessData(ClassID_traits<DataHeader>::ID(), iter->first);
......@@ -474,7 +481,7 @@ StatusCode AthenaPoolOutputStreamTool::fillObjectRefs(const DataObjectVec& dataO
return(status);
}
//__________________________________________________________________________
StatusCode AthenaPoolOutputStreamTool::getInputItemList(SG::IFolder* m_p2BWrittenFromTool) {
StatusCode AthenaPoolOutputStreamTool::getInputItemList(SG::IFolder* p2BWrittenFromTool) {
const std::string hltKey = "HLTAutoKey";
const DataHandle<DataHeader> beg, ending;
if (m_store->retrieve(beg, ending).isFailure() || beg == ending) {
......@@ -492,17 +499,20 @@ StatusCode AthenaPoolOutputStreamTool::getInputItemList(SG::IFolder* m_p2BWritte
//see https://its.cern.ch/jira/browse/ATLASG-59 for the solution
std::string typeName;
if( m_clidSvc->getTypeNameOfID(clid,typeName).isFailure() && it->getKey().find("Aux.") == std::string::npos) {
ATH_MSG_WARNING("Skipping " << it->getKey() << " with unknown clid " << clid );
continue;
if(m_skippedItems.find(it->getKey()) == m_skippedItems.end()) {
ATH_MSG_WARNING("Skipping " << it->getKey() << " with unknown clid " << clid << " . Further warnings for this item are suppressed" );
m_skippedItems.insert(it->getKey());
}
continue;
}
ATH_MSG_DEBUG("Adding " << typeName << "#" << it->getKey() << " (clid " << clid << ") to itemlist");
const std::string keyName = it->getKey();
if (keyName.size() > 10 && keyName.substr(0, 10) == hltKey) {
m_p2BWrittenFromTool->add(clid, hltKey + "*").ignore();
p2BWrittenFromTool->add(clid, hltKey + "*").ignore();
} else if (keyName.size() > 10 && keyName.substr(keyName.size() - 10, 10) == hltKey) {
m_p2BWrittenFromTool->add(clid, "*" + hltKey).ignore();
p2BWrittenFromTool->add(clid, "*" + hltKey).ignore();
} else {
m_p2BWrittenFromTool->add(clid, keyName).ignore();
p2BWrittenFromTool->add(clid, keyName).ignore();
}
}
}
......
......@@ -126,6 +126,10 @@ private:
bool m_connectionOpen;
/// Flag as to whether to extend provenance via the DataHeader
bool m_extendProvenanceRecord;
/// set of skipped item keys, because of missing CLID
std::set<std::string> m_skippedItems;
};
#endif
......@@ -70,7 +70,7 @@ void CopyEventStreamInfo::handle(const Incident& inc) {
if (m_inputMetaDataStore->contains<EventStreamInfo>(m_key)) {
std::list<SG::ObjectWithVersion<EventStreamInfo> > allVersions;
if (!m_inputMetaDataStore->retrieveAllVersions(allVersions, m_key).isSuccess()) {
ATH_MSG_ERROR("Could not retrieve all versions for PedestalWriteData");
ATH_MSG_ERROR("Could not retrieve all versions for EventStreamInfo");
return;
}
EventStreamInfo* evtStrInfo_out = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment