CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDStreamer.h
Go to the documentation of this file.
1 #ifndef DD_DDStreamer_h
2 #define DD_DDStreamer_h
3 
4 #include <iostream>
5 class DDCompactView;
6 
8 
42 {
43 public:
45  DDStreamer();
46 
48  DDStreamer(std::istream & readFrom);
49 
51  DDStreamer(std::ostream & writeTo);
52 
54  virtual ~DDStreamer();
55 
57  void write();
58 
60  void read();
61 
63  void write(std::ostream & os);
64 
66  void read(std::istream & is);
67 
69  void setInput(std::istream & i) { i_ = &i; }
70 
72  void setOutput(std::ostream & o) { o_ = &o; }
73 
74 protected:
76  void names_write();
77 
79  void names_read();
80 
82  void materials_write();
83 
85  void materials_read();
86 
88  void solids_write();
89 
91  void solids_read();
92 
94  void parts_write();
95 
97  void parts_read();
98 
100  void rots_write();
101 
103  void rots_read();
104 
106  void pos_write();
107 
109  void pos_read();
110 
112  void specs_write();
113 
115  void specs_read();
116 
118  void vars_write();
119 
121  void vars_read();
122 
123 private:
125  std::ostream * o_;
126  std::istream * i_;
127 };
128 #endif
void materials_write()
write all instances of DDMaterial
Definition: DDStreamer.cc:255
void solids_write()
write all instances of DDSolid
Definition: DDStreamer.cc:345
int i
Definition: DBlmapReader.cc:9
void read()
populate DDD transient objects from the std::istream refetrred to by member i_
Definition: DDStreamer.cc:120
void pos_write()
write the graph structure of DDCompactView::graph()
Definition: DDStreamer.cc:609
void vars_write()
write the dictionary of ClhepEvaluator
Definition: DDStreamer.cc:887
Streaming the DDD transient store from/into a std::istream/std::ostream */.
Definition: DDStreamer.h:41
void specs_write()
write all instances of DDSpecifics
Definition: DDStreamer.cc:773
void names_read()
read all instances of DDName
Definition: DDStreamer.cc:189
void parts_write()
write all instances of DDLogicalPart
Definition: DDStreamer.cc:492
virtual ~DDStreamer()
does nothing; usefull only if another streamer derives from DDStreamer
Definition: DDStreamer.cc:48
type of data representation of DDCompactView
Definition: DDCompactView.h:76
void vars_read()
read the dictionlary of ClhepEvaluator
Definition: DDStreamer.cc:911
void write()
stream all DDD transient objects to the std::ostream referred to by member o_
Definition: DDStreamer.cc:110
void solids_read()
read all instances of DDSolid
Definition: DDStreamer.cc:405
std::istream * i_
Definition: DDStreamer.h:126
void specs_read()
read all instances of
Definition: DDStreamer.cc:823
const DDCompactView * cpv_
Definition: DDStreamer.h:124
void rots_read()
read all instances of DDRotation
Definition: DDStreamer.cc:586
void names_write()
write all instances of DDName
Definition: DDStreamer.cc:170
void parts_read()
read all instances of DDLogicalPart
Definition: DDStreamer.cc:513
void pos_read()
read the graph structure for DDCompactView::graph()
Definition: DDStreamer.cc:675
void materials_read()
read all instances of DDMaterial
Definition: DDStreamer.cc:284
std::ostream * o_
Definition: DDStreamer.h:125
void rots_write()
write all instances of DDRotation
Definition: DDStreamer.cc:557
void setInput(std::istream &i)
set the istream for DDStreamer::read()
Definition: DDStreamer.h:69
DDStreamer()
constructs a streamer object with yet undefined std::istream and std::ostream
Definition: DDStreamer.cc:21
void setOutput(std::ostream &o)
set the std::ostream for DDStreamer::write()
Definition: DDStreamer.h:72