CMS 3D CMS Logo

DDStreamer.h
Go to the documentation of this file.
1 #ifndef DD_DDStreamer_h
2 #define DD_DDStreamer_h
3 
4 #include <iostream>
5 
6 class DDCompactView;
7 
9 
43 {
44 public:
46  DDStreamer();
47 
49  DDStreamer(std::istream & readFrom);
50 
52  DDStreamer(std::ostream & writeTo);
53 
55  virtual ~DDStreamer();
56 
58  void write();
59 
61  void read();
62 
64  void write(std::ostream & os);
65 
67  void read(std::istream & is);
68 
70  void setInput(std::istream & i) { i_ = &i; }
71 
73  void setOutput(std::ostream & o) { o_ = &o; }
74 
75 protected:
77  void names_write();
78 
80  void names_read();
81 
83  void materials_write();
84 
86  void materials_read();
87 
89  void solids_write();
90 
92  void solids_read();
93 
95  void parts_write();
96 
98  void parts_read();
99 
101  void rots_write();
102 
104  void rots_read();
105 
107  void pos_write();
108 
110  void pos_read();
111 
113  void specs_write();
114 
116  void specs_read();
117 
119  void vars_write();
120 
122  void vars_read();
123 
124 private:
125  std::ostream * o_;
126  std::istream * i_;
127 };
128 #endif
void materials_write()
write all instances of DDMaterial
Definition: DDStreamer.cc:269
void solids_write()
write all instances of DDSolid
Definition: DDStreamer.cc:352
void read()
populate DDD transient objects from the std::istream refetrred to by member i_
Definition: DDStreamer.cc:136
void pos_write()
write the graph structure of DDCompactView::graph()
Definition: DDStreamer.cc:605
void vars_write()
write the dictionary of ClhepEvaluator
Definition: DDStreamer.cc:874
Streaming the DDD transient store from/into a std::istream/std::ostream */.
Definition: DDStreamer.h:42
void specs_write()
write all instances of DDSpecifics
Definition: DDStreamer.cc:764
void names_read()
read all instances of DDName
Definition: DDStreamer.cc:204
void parts_write()
write all instances of DDLogicalPart
Definition: DDStreamer.cc:495
virtual ~DDStreamer()
does nothing; usefull only if another streamer derives from DDStreamer
Definition: DDStreamer.cc:64
type of data representation of DDCompactView
Definition: DDCompactView.h:90
void vars_read()
read the dictionlary of ClhepEvaluator
Definition: DDStreamer.cc:898
void write()
stream all DDD transient objects to the std::ostream referred to by member o_
Definition: DDStreamer.cc:126
void solids_read()
read all instances of DDSolid
Definition: DDStreamer.cc:409
std::istream * i_
Definition: DDStreamer.h:126
void specs_read()
read all instances of
Definition: DDStreamer.cc:813
void rots_read()
read all instances of DDRotation
Definition: DDStreamer.cc:584
void names_write()
write all instances of DDName
Definition: DDStreamer.cc:186
void parts_read()
read all instances of DDLogicalPart
Definition: DDStreamer.cc:515
void pos_read()
read the graph structure for DDCompactView::graph()
Definition: DDStreamer.cc:670
void materials_read()
read all instances of DDMaterial
Definition: DDStreamer.cc:295
std::ostream * o_
Definition: DDStreamer.h:125
void rots_write()
write all instances of DDRotation
Definition: DDStreamer.cc:556
void setInput(std::istream &i)
set the istream for DDStreamer::read()
Definition: DDStreamer.h:70
DDStreamer()
constructs a streamer object with yet undefined std::istream and std::ostream
Definition: DDStreamer.cc:37
void setOutput(std::ostream &o)
set the std::ostream for DDStreamer::write()
Definition: DDStreamer.h:73