Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Framework/Framework/AppStream.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: AppStream.hh,v 1.5 2002/03/02 03:51:46 yemi Exp $
00004 //
00005 // Description:
00006 //      Class AppStream. The output stream class.
00007 //
00008 // Environment:
00009 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00010 //
00011 // Author List:
00012 //      David R. Quarrie                Original Author
00013 //
00014 // Copyright Information:
00015 //      Copyright (C) 1994, 1995        Lawrence Berkeley Laboratory
00016 //
00017 //------------------------------------------------------------------------
00018 
00019 // Note the case sentivity here - it avoids a conclict with the APPStream class
00020 #ifndef AppSTREAM_HH
00021 #define AppSTREAM_HH
00022 //-----------------------
00023 // Experiment Headers --
00024 //-----------------------
00025 #include "BaBar/Experiment.hh"
00026 
00027 //-------------
00028 // C Headers --
00029 //-------------
00030 #include <stddef.h>
00031 
00032 //------------------------------------
00033 // Collaborating Class Declarations --
00034 //------------------------------------
00035 class APPPath;
00036 class AbsEvent;
00037 template<class T> class APPList;
00038 
00039 //              ---------------------
00040 //              -- Class Interface --
00041 //              ---------------------
00042  
00043 class AppStream {
00044 
00045   //--------------------
00046   // Instance Members --
00047   //--------------------
00048 
00049 public:
00050   
00051   // Constructors
00052   AppStream( 
00053             const char* const theName, 
00054             const char* const theDestination = NULL, 
00055             const char* const theDescription = NULL );
00056   
00057   // Destructor
00058   virtual ~AppStream( );
00059   
00060   // Selectors (const)
00061   unsigned int          events     ( ) const;
00062   const char*           name       ( ) const;
00063   const char*           description( ) const;
00064   const char*           destination( ) const;
00065   bool                  isEnabled  ( ) const;
00066   virtual bool                  isOpen     ( ) const = 0;
00067   APPList < APPPath* >* paths      ( ) const;
00068   
00069   APPPath* fetch( const char* const theName ) const;
00070   bool     has  ( const char* const theName ) const;
00071   
00072   // Modifiers
00073   void setEnabled    ( bool mode );
00074   
00075   // phase III.1 modification - made method virtual  
00076   virtual void setDestination( const char* const theName );
00077 
00078   // Operations
00079   virtual bool open ( ) = 0;
00080   virtual void close( ) = 0;
00081   virtual bool write( AbsEvent* aNode );
00082   
00083   
00084   virtual void append ( const APPPath* const thePath );
00085   virtual void remove ( const APPPath* const thePath );
00086   virtual void remove ( const char* const theName );
00087   virtual void wipeout( );
00088   
00089 protected:
00090   
00091   virtual bool writeToDestination( AbsEvent* aNode ) = 0;
00092   
00093   APPList < APPPath* >* _paths;
00094   char*                 _name;
00095   char*                 _description;
00096   char*                 _destination;
00097   bool                  _isEnabled;
00098   unsigned int          _events;
00099 
00100 private:
00101 
00102   // Not implemented.
00103   AppStream( const AppStream& );
00104   AppStream& operator=( const AppStream& );
00105 
00106 };
00107 
00108 #endif

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002