| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# OutputStream.h

Go to the documentation of this file.

    00001 // $Id: OutputStream.h,v 1.10 2006/11/30 14:57:04 mato Exp $
    00002 #ifndef GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H
    00003 #define GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H
    00004
    00005
    00006 // Required for inheritance
    00007 #include "GaudiKernel/IDataSelector.h"
    00008 #include "GaudiKernel/Algorithm.h"
    00009 #include "GaudiKernel/Property.h"
    00010
    00011 // STL include files
    00012 #include <memory>
    00013 #include <vector>
    00014 #include <string>
    00015
    00016 // forward declarations
    00017 template <class ConcreteAlgorithm> class AlgFactory;
    00018 namespace { template <class P, class S> class Factory; }
    00019
    00020 class IRegistry;
    00021 class IConversionSvc;
    00022 class IDataManagerSvc;
    00023 class OutputStreamAgent;
    00024 class DataStoreItem;
    00025
    00030 class OutputStream : public Algorithm     {
    00031   friend class AlgFactory<OutputStream>;
    00032   friend class Factory<OutputStream,IAlgorithm* (std::string,ISvcLocator *)>;
    00033
    00034 public:
    00035   typedef std::vector<DataStoreItem*> Items;
    00036   typedef std::vector<std::string>    ItemNames;
    00037 protected:
    00039   bool                     m_doPreLoad;
    00041   bool                     m_doPreLoadOpt;
    00043   bool                     m_verifyItems;
    00045   std::string              m_storeName;
    00047   std::string              m_persName;
    00049   std::string              m_output;
    00051   std::string              m_outputName;
    00053   std::string              m_outputType;
    00055   OutputStreamAgent*       m_agent;
    00057   IDataProviderSvc*        m_pDataProvider;
    00059   IDataManagerSvc*         m_pDataManager;
    00061   IConversionSvc*          m_pConversionSvc;
    00063   DataStoreItem*           m_currentItem;
    00065   ItemNames                m_itemNames;
    00067   Items                    m_itemList;
    00069   ItemNames                m_optItemNames;
    00071   Items                    m_optItemList;
    00073   IDataSelector            m_objects;
    00075   int                      m_events;
    00077   StringArrayProperty      m_acceptNames;
    00079   StringArrayProperty      m_requireNames;
    00081   StringArrayProperty      m_vetoNames;
    00083   std::vector<Algorithm*>* m_acceptAlgs;
    00085   std::vector<Algorithm*>* m_requireAlgs;
    00087   std::vector<Algorithm*>* m_vetoAlgs;
    00088
    00089 public:
    00091         OutputStream(const std::string& name, ISvcLocator* pSvcLocator);
    00093   virtual ~OutputStream();
    00094 protected:
    00096   StatusCode decodeAcceptAlgs( );
    00098   void acceptAlgsHandler( Property& theProp );
    00100   StatusCode decodeRequireAlgs( );
    00102   void requireAlgsHandler( Property& theProp );
    00104   StatusCode decodeVetoAlgs( );
    00106   void vetoAlgsHandler( Property& theProp );
    00108   StatusCode decodeAlgorithms( StringArrayProperty& theNames,
    00109                                std::vector<Algorithm*>* theAlgs );
    00111   bool isEventAccepted( ) const;
    00113   DataStoreItem* findItem(const std::string& path);
    00115   virtual StatusCode writeObjects();
    00116
    00117 public:
    00119         virtual StatusCode initialize();
    00121         virtual StatusCode finalize();
    00123         virtual StatusCode execute();
    00124   // Connect to proper conversion service
    00125   virtual StatusCode connectConversionSvc();
    00127   virtual bool collect(IRegistry* dir, int level);
    00129   virtual StatusCode collectObjects();
    00131   void clearItems(Items& itms);
    00133   void addItem(Items& itms, const std::string& descriptor);
    00135   void clearSelection();
    00137   IDataSelector* selectedObjects()    {
    00138     return &m_objects;
    00139   }
    00140 };
    00141
    00142 #endif // GAUDISVC_PERSISTENCYSVC_OUTPUTSTREAM_H