Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SIO_record.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CVS $Id: SIO_record.h,v 1.2 2004/12/23 13:24:07 gaede Exp $
00003 // ----------------------------------------------------------------------------
00004 // => Controller for an SIO record.                                
00005 // ----------------------------------------------------------------------------
00006 //
00007 // General Description:
00008 //
00009 // Each SIO_record controls one record type.                
00010 //
00011 // ----------------------------------------------------------------------------
00012 
00013 #ifndef SIO_RECORD_H
00014 #define SIO_RECORD_H 1
00015 
00016 #include <map>
00017 #include <string>
00018 
00019 #include "SIO_definitions.h"
00020 
00021 class SIO_stream;
00022 class SIO_block;
00023 
00024 typedef std::map< std::string, SIO_block* >           connectMap_c;
00025 typedef std::map< std::string, SIO_block* >::iterator connectMap_i;
00026 
00027 #define SIO_OPT_COMPRESS   0x00000001
00028 
00029 // ----------------------------------------------------------------------------
00030 // Class SIO_record.
00031 // ----------------------------------------------------------------------------
00032 class SIO_record
00033 {
00034 public:
00035     unsigned int              connect( const char* );
00036     unsigned int              connect( SIO_block*  );
00037     unsigned int           disconnect( const char* );
00038     unsigned int           disconnect( SIO_block*  );
00039 
00040   //fg20041222 -- added for multiple write streams
00041     unsigned int           disconnectAll() ;
00042 
00043 
00044     SIO_block*             getConnect( const char* );
00045     bool                   getCompress();
00046     std::string*           getName();
00047     bool                   getUnpack();
00048     SIO_verbosity          getVerbosity();  
00049     bool                   setCompress( bool );           
00050     bool                   setUnpack( bool );
00051     SIO_verbosity          setVerbosity( SIO_verbosity );  
00052 
00053 private:
00054     SIO_record( const char*, SIO_verbosity );
00055    ~SIO_record();
00056 
00057     unsigned int              connect( std::string*, SIO_block* );
00058     unsigned int           disconnect( std::string*, SIO_block* );
00059     unsigned int           getOptions();  
00060     unsigned int           read(  SIO_stream*, unsigned int );
00061     unsigned int           write( SIO_stream* );
00062 
00063     connectMap_c           connectMap;    // Map of connected blocks
00064     std::string            name;          // Record name
00065     unsigned int           options;       // Options (flag word)         
00066     bool                   unpack;        // Unpack incoming records?
00067     SIO_verbosity          verbosity;     // Reporting level
00068 
00069 friend class SIO_recordManager;           // Access to constructor/destructor
00070 friend class SIO_stream;                  // Access to read/write/getOptions
00071 }; 
00072 #endif

Generated on Sun Jun 3 06:32:01 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1