Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
InputCopyStream.cpp
Go to the documentation of this file.
1 // $Id: InputCopyStream.cpp,v 1.2 2006/01/10 20:09:27 hmd Exp $
2 #define GAUDISVC_PERSISTENCYSVC_INPUTCOPYSTREAM_CPP
3 
4 // Framework include files
11 #include "GaudiKernel/DataObject.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "InputCopyStream.h"
15 
16 // Define the algorithm factory for the standard output data writer
18 
19 // Standard Constructor
20  InputCopyStream::InputCopyStream(const std::string& name, ISvcLocator* pSvcLocator)
21  : OutputStream ( name, pSvcLocator),
22  m_leavesTool ( NULL ),
23  m_tesVetoList ( )
24 {
25  m_doPreLoad = false;
26  m_doPreLoadOpt = false;
27  declareProperty( "TESVetoList", m_tesVetoList );
28 }
29 
30 // Standard Destructor
32 
33 // Initialize the instance.
35 {
37  if ( sc.isFailure() ) return sc;
38 
39  sc = toolSvc()->retrieveTool("DataSvcFileEntriesTool", "InputCopyStreamTool",
40  m_leavesTool);
41 
42  return sc;
43 }
44 
45 // Finalize the instance.
47 {
48  toolSvc()->releaseTool(m_leavesTool).ignore();
49  m_leavesTool = NULL;
50  return OutputStream::finalize();
51 }
52 
55 {
56  // Get the objects in the same file as the root node
57  try
58  {
59  // Get all the leaves on the input stream
61 
62  // Do we need to veto anything ?
63  if ( UNLIKELY( !m_tesVetoList.empty() ) )
64  {
65  // Veto out locations
66  IDataStoreLeaves::LeavesList filteredLeaves;
67  filteredLeaves.reserve( leaves.size() );
69  iL != leaves.end(); ++iL )
70  {
71  if ( *iL && (*iL)->registry() )
72  {
75  (*iL)->registry()->identifier() ) == m_tesVetoList.end() )
76  {
77  filteredLeaves.push_back( (*iL) );
78  }
79  }
80  }
81 
82  // saved the veto'ed list
83  m_objects.assign( filteredLeaves.begin(), filteredLeaves.end() );
84 
85  }
86  else
87  {
88  // no veto'ing, so save everything
89  m_objects.assign( leaves.begin(), leaves.end() );
90  }
91  }
92  catch ( const GaudiException & e )
93  {
94  MsgStream log(msgSvc(), name());
95  log << MSG::ERROR << e.message() << endmsg;
96  return StatusCode::FAILURE;
97  }
98 
99  // Collect the other objects from the transient store (mandatory and optional)
101 }

Generated at Wed Nov 28 2012 12:17:11 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004