//-------------------------------------------------------------------------- // File and Version Information: // $Id: AppXXXStream.hh,v 1.3 2002/01/28 00:10:48 rico Exp $ // // Description: // The XXX output stream class; derives from FileOutputStream // // Author List: // Kevin McFarland Original Author // //------------------------------------------------------------------------ #ifndef APPXXXSTREAM_HH #define APPXXXSTREAM_HH //----------------------- // Experiment Headers -- //----------------------- #include "BaBar/Experiment.hh" //------------- // C Headers -- //------------- #include //--------------- // C++ Headers -- //--------------- #ifndef CDF #include #else #ifdef USE_CDFEDM2 class AbstractFile ; #else class TRY_Abstract_File; #endif #endif //---------------------- // Base Class Headers -- //---------------------- #include "Framework/AppStream.hh" // --------------------- // -- Class Interface -- // --------------------- class AppXXXStream : public AppStream { //-------------------- // Instance Members -- //-------------------- public: // Constructors AppXXXStream( const char* const theName, const char* const theFile = NULL, const char* const theDescription = NULL ); // Destructor virtual ~AppXXXStream( ); // Selectors (const) const char* filename( ) const; bool isOpen ( ) const; // Modifiers void setFilename( const char* const theName ); // Operations bool open ( ); void close( ); protected: bool writeToDestination( AbsEvent*& aNode ); #ifndef CDF fstream _file; #else //note the change in lifetime, for BABAR the file object lives for //the life of the AppFileInputModule, CDF's files are virtual because //we want their types to be run-time selectable. In order to be able //to change file types between opens and closes the objects //get created when the file is opened and deleted when closed. #ifdef USE_CDFEDM2 AbstractFile* _file ; #else TRY_Abstract_File* _file ; #endif // USE_CDFEDM2 #endif }; #endif