 |
ATLAS Offline Software
|
Go to the documentation of this file.
19 #include "GaudiKernel/IConversionSvc.h"
20 #include "GaudiKernel/IOpaqueAddress.h"
21 #include "GaudiKernel/IRegistry.h"
22 #include "GaudiKernel/DataObject.h"
25 #include "GaudiKernel/IClassIDSvc.h"
35 m_storeSvc(
"StoreGateSvc",
name),
36 m_conversionSvc(
"Athena::RootCnvSvc/AthenaRootCnvSvc",
name),
37 m_clidSvc(
"ClassIDSvc",
name) {
39 declareProperty(
"Store",
m_storeSvc,
"Store from which to stream out event data");
40 declareProperty(
"TreeName",
m_treeName =
"CollectionTree",
"Name of the output event tree");
41 declareProperty(
"OutputFile",
m_outputName,
"Name of the output file");
54 return StatusCode::SUCCESS;
72 return StatusCode::SUCCESS;
76 ATH_MSG_VERBOSE(
"connectServices dataStore = " << dataStore <<
", cnvSvc = " << cnvSvc <<
", extendProv = " << extendProvenenceRecord);
86 return StatusCode::SUCCESS;
95 return StatusCode::FAILURE;
100 return StatusCode::FAILURE;
104 return StatusCode::SUCCESS;
111 return StatusCode::FAILURE;
116 return StatusCode::FAILURE;
121 return StatusCode::SUCCESS;
126 return StatusCode::SUCCESS;
132 std::vector<DataObject*> dataObjects;
133 dataObjects.reserve(typeKeys.size());
134 for (IAthenaOutputStreamTool::TypeKeyPairs::const_iterator
first = typeKeys.begin(), last = typeKeys.end();
136 const std::string&
type = (*first).first;
137 const std::string&
key = (*first).second;
142 return StatusCode::FAILURE;
144 DataObject* dObj = 0;
163 dataObjects.push_back(dObj);
173 return StatusCode::FAILURE;
176 std::set<DataObject*> written;
177 for (std::vector<DataObject*>::const_iterator doIter = dataObjects.begin(), doLast = dataObjects.end();
178 doIter != doLast; ++doIter) {
179 ATH_MSG_VERBOSE(
" --> [" << (*doIter)->clID() <<
"/" << (*doIter)->name() <<
"]...");
181 if (written.find(*doIter) != written.end()) {
183 ATH_MSG_DEBUG(
"Trying to write DataObject twice (clid/key): " << (*doIter)->clID() <<
", " << (*doIter)->name());
186 written.insert(*doIter);
188 IOpaqueAddress* addr = 0;
190 IRegistry* ireg = (*doIter)->registry();
199 if (
dynamic_cast<RootBranchAddress*
>(ireg->address())) {
200 delete addr; addr = 0;
202 ireg->setAddress(addr);
210 ATH_MSG_ERROR(
"Could not create Rep for DataObject (clid/key): " << (*doIter)->clID() <<
", " << (*doIter)->name());
211 return StatusCode::FAILURE;
215 return StatusCode::SUCCESS;
220 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
a run-time configurable list of data objects
Some weak symbol referencing magic...
::StatusCode StatusCode
StatusCode definition for legacy code.
This file contains the class definition for the RootSvc class.
uint32_t CLID
The Class ID type.
#define ATH_MSG_WARNING(x)
This file contains the class definition for the Athena::RootConnection class.