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

LCDG4_SIOglobal Class Reference

#include <LCDG4_SIOglobal.hh>

Collaboration diagram for LCDG4_SIOglobal:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCDG4_SIOglobal (char *sio_file, char *det_id)
 Constructor.

 ~LCDG4_SIOglobal ()
SIO_streamgetStream () const
 Return SIO_stream* for SIO output.


Protected Member Functions

 LCDG4_SIOglobal (const LCDG4_SIOglobal &sio)

Private Attributes

SIO_streamstream

Constructor & Destructor Documentation

LCDG4_SIOglobal::LCDG4_SIOglobal const LCDG4_SIOglobal sio  )  [inline, protected]
 

Definition at line 13 of file LCDG4_SIOglobal.hh.

00013 {};

LCDG4_SIOglobal::LCDG4_SIOglobal char *  sio_file,
char *  det_id
 

Constructor.

Definition at line 17 of file LCDG4_SIOglobal.cc.

References SIO_blockManager::add(), SIO_recordManager::add(), SIO_streamManager::add(), SIO_record::connect(), SIO_stream::open(), SIO_recordManager::remove(), LCD_detector_CVS::setCRC(), LCD_detector_CVS::setHeader(), LCD_detector_ID::setMajor(), LCD_detector_ID::setMinor(), LCD_detector_ID::setType(), SIO_blockManager::setVerbosity(), SIO_recordManager::setVerbosity(), SIO_streamManager::setVerbosity(), SIO_KBYTE, SIO_MODE_WRITE_NEW, SIO_SILENT, stream, and SIO_stream::write().

00018 {
00019   //SIO output stuff
00020   SIO_streamManager::setVerbosity(SIO_SILENT);
00021   SIO_recordManager::setVerbosity(SIO_SILENT);
00022   SIO_blockManager::setVerbosity(SIO_SILENT);
00023 
00024   stream = SIO_streamManager::add("output",512*SIO_KBYTE);
00025   stream->open(sio_file,SIO_MODE_WRITE_NEW);
00026   SIO_record *record = SIO_recordManager::add("LCD_LCDG4_Detector");
00027   //record->setCompress(true);
00028 
00029   LCD_detector_ID *det_ID = new LCD_detector_ID("LCD_detector_ID");
00030   LCD_detector_CVS *det_CVS = new LCD_detector_CVS("LCD_detector_CVS");
00031 
00032   det_ID->setMajor(1);
00033   det_ID->setMinor(0);
00034   det_ID->setType(det_id);
00035 
00036   det_CVS->setCRC(1);
00037   det_CVS->setHeader((char*)"test");
00038 
00039   SIO_blockManager::add(det_ID);
00040   SIO_blockManager::add(det_CVS);
00041 
00042   record->connect(det_ID);
00043   record->connect(det_CVS);
00044 
00045   stream->write(record);
00046 
00047   delete det_ID;
00048   delete det_CVS;
00049   SIO_recordManager::remove(record);
00050 }

LCDG4_SIOglobal::~LCDG4_SIOglobal  ) 
 

Definition at line 12 of file LCDG4_SIOglobal.cc.

References SIO_stream::close(), and stream.

00013 {
00014   stream->close();
00015 }


Member Function Documentation

SIO_stream* LCDG4_SIOglobal::getStream  )  const [inline]
 

Return SIO_stream* for SIO output.

Definition at line 21 of file LCDG4_SIOglobal.hh.

References stream.

Referenced by main().

00021 { return stream; }


Member Data Documentation

SIO_stream* LCDG4_SIOglobal::stream [private]
 

Definition at line 9 of file LCDG4_SIOglobal.hh.

Referenced by getStream(), LCDG4_SIOglobal(), and ~LCDG4_SIOglobal().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:04 2004 for LCDG4 by doxygen 1.3.4