CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/DetectorDescription/Core/interface/DDStreamer.h

Go to the documentation of this file.
00001 #ifndef DD_DDStreamer_h
00002 #define DD_DDStreamer_h
00003 
00004 #include <iostream>
00005 class DDCompactView;
00006 
00008 
00041 class DDStreamer
00042 {
00043 public:
00045   DDStreamer();
00046   
00048   DDStreamer(std::istream & readFrom);
00049   
00051   DDStreamer(std::ostream & writeTo);
00052   
00054   virtual ~DDStreamer(); 
00055   
00057   void write();
00058   
00060   void read();
00061   
00063   void write(std::ostream & os);
00064   
00066   void read(std::istream & is);
00067   
00069   void setInput(std::istream & i) { i_ = &i; }
00070   
00072   void setOutput(std::ostream & o) { o_ = &o; }
00073   
00074 protected:  
00076   void names_write();
00077   
00079   void names_read();
00080   
00082   void materials_write();
00083   
00085   void materials_read();
00086   
00088   void solids_write();
00089   
00091   void solids_read();
00092 
00094   void parts_write();
00095   
00097   void parts_read();
00098   
00100   void rots_write();
00101   
00103   void rots_read();
00104   
00106   void pos_write();
00107   
00109   void pos_read();
00110   
00112   void specs_write();
00113   
00115   void specs_read(); 
00116   
00118   void vars_write();
00119   
00121   void vars_read();  
00122 
00123 private:  
00124   const DDCompactView * cpv_;
00125   std::ostream * o_; 
00126   std::istream * i_; 
00127 };
00128 #endif