| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OutputStream.h
Go to the documentation of this file.
1 #ifndef GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H
2 #define GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H
3
4 // Required for inheritance
5 #include "GaudiKernel/IDataSelector.h"
6 #include "GaudiKernel/Algorithm.h"
7 #include "GaudiKernel/Property.h"
8
9 // STL include files
10 #include <memory>
11 #include <vector>
12 #include <string>
13
14 // forward declarations
15 class IIncidentSvc;
16 class IRegistry;
17 class IConversionSvc;
18 class IDataManagerSvc;
19 class OutputStreamAgent;
20 class DataStoreItem;
21
27 class OutputStream : public Algorithm {
28 public:
29 typedef std::vector<DataStoreItem*> Items;
30 typedef std::vector<std::string> ItemNames;
31 protected:
33 SmartIF<IIncidentSvc> m_incidentSvc;
35 bool m_doPreLoad;
37 bool m_doPreLoadOpt;
39 bool m_verifyItems;
41 std::string m_storeName;
43 std::string m_persName;
45 std::string m_output;
47 std::string m_outputName;
49 std::string m_outputType;
51 OutputStreamAgent* m_agent;
53 SmartIF<IDataProviderSvc> m_pDataProvider;
55 SmartIF<IDataManagerSvc> m_pDataManager;
57 SmartIF<IConversionSvc> m_pConversionSvc;
59 DataStoreItem* m_currentItem;
61 ItemNames m_itemNames;
63 Items m_itemList;
65 ItemNames m_optItemNames;
67 Items m_optItemList;
69 IDataSelector m_objects;
71 int m_events;
73 StringArrayProperty m_acceptNames;
75 StringArrayProperty m_requireNames;
77 StringArrayProperty m_vetoNames;
79 std::vector<Algorithm*>* m_acceptAlgs;
81 std::vector<Algorithm*>* m_requireAlgs;
83 std::vector<Algorithm*>* m_vetoAlgs;
84
85 public:
87 OutputStream(const std::string& name, ISvcLocator* pSvcLocator);
89 virtual ~OutputStream();
90 protected:
92 StatusCode decodeAcceptAlgs();
94 void acceptAlgsHandler( Property& theProp );
96 StatusCode decodeRequireAlgs();
98 void requireAlgsHandler( Property& theProp );
100 StatusCode decodeVetoAlgs();
102 void vetoAlgsHandler( Property& theProp );
104 StatusCode decodeAlgorithms( StringArrayProperty& theNames,
105 std::vector<Algorithm*>* theAlgs );
107 bool isEventAccepted() const;
109 DataStoreItem* findItem(const std::string& path);
111 virtual StatusCode writeObjects();
112
114 bool m_fireIncidents;
115
117 virtual bool hasInput() const;
118
119 public:
121 virtual StatusCode initialize();
123 virtual StatusCode finalize();
125 virtual StatusCode execute();
126 // Connect to proper conversion service
127 virtual StatusCode connectConversionSvc();
129 virtual bool collect(IRegistry* dir, int level);
131 virtual StatusCode collectObjects();
133 void clearItems(Items& itms);
135 void addItem(Items& itms, const std::string& descriptor);
137 void clearSelection();
139 IDataSelector* selectedObjects() { return &m_objects; }
140 };
141
142 #endif // GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H