00001 #ifndef DAQXML_DAQXMLSTREAM_H
00002 #define DAQXML_DAQXMLSTREAM_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <ostream>
00013 #include <string>
00014
00015 namespace DybDaq {
00016 class FadcData;
00017 class FadcFoot;
00018 class FadcHead;
00019 class FadcReadout;
00020 class FeeHit;
00021 class FeeFoot;
00022 class FeeHead;
00023 class FeeReadout;
00024 class LtbFrame;
00025 class LtbFoot;
00026 class LtbHead;
00027 class LtbReadout;
00028 class CbltBody;
00029 class CbltFoot;
00030 class CbltHead;
00031 class CbltReadout;
00032 class RomHeader;
00033 class RomFragment;
00034 class EventHeader;
00035 class EventReadout;
00036 class FileEndRecord;
00037 class DataSeparatorRecord;
00038 class CalibrationParametersRecord;
00039 class RunParametersRecord;
00040 class MetadataStrings;
00041 class FileNameStrings;
00042 class FileStartRecord;
00043 class FileBuffer;
00044 }
00045
00046 namespace DybDaq {
00047
00048 class DaqXmlStream {
00049
00050 public:
00051
00055 DaqXmlStream(std::ostream& output,
00056 const std::string& indent,
00057 bool strict);
00058
00062 virtual ~DaqXmlStream();
00063
00064 void dumpElement(const DybDaq::FadcData& data) const;
00065
00066 void dumpElement(const DybDaq::FadcData& data,
00067 const std::string& indent) const;
00068
00069 void dumpElement(const DybDaq::FadcFoot& foot) const;
00070
00071 void dumpElement(const DybDaq::FadcFoot& foot,
00072 const std::string& indent) const;
00073
00074 void dumpElement(const DybDaq::FadcHead& head) const ;
00075
00076 void dumpElement(const DybDaq::FadcHead& head,
00077 const std::string& indent) const ;
00078
00079 void dumpElement(const DybDaq::FadcReadout& readout) const ;
00080
00081 void dumpElement(const DybDaq::FadcReadout& readout,
00082 const std::string& indent) const ;
00083
00084 void dumpElement(const DybDaq::FeeHit& hit) const;
00085
00086 void dumpElement(const DybDaq::FeeHit& hit,
00087 const std::string& indent) const;
00088
00089 void dumpElement(const DybDaq::FeeFoot& foot) const;
00090
00091 void dumpElement(const DybDaq::FeeFoot& foot,
00092 const std::string& indent) const;
00093
00094 void dumpElement(const DybDaq::FeeHead& head) const ;
00095
00096 void dumpElement(const DybDaq::FeeHead& head,
00097 const std::string& indent) const ;
00098
00099 void dumpElement(const DybDaq::FeeReadout& readout) const ;
00100
00101 void dumpElement(const DybDaq::FeeReadout& readout,
00102 const std::string& indent) const ;
00103
00104 void dumpElement(const DybDaq::LtbFrame& frame) const ;
00105
00106 void dumpElement(const DybDaq::LtbFrame& frame,
00107 const std::string& indent) const ;
00108
00109 void dumpElement(const DybDaq::LtbFoot& foot) const ;
00110
00111 void dumpElement(const DybDaq::LtbFoot& foot,
00112 const std::string& indent) const ;
00113
00114 void dumpElement(const DybDaq::LtbHead& head) const ;
00115
00116 void dumpElement(const DybDaq::LtbHead& head,
00117 const std::string& indent) const ;
00118
00119 void dumpElement(const DybDaq::LtbReadout& readout) const ;
00120
00121 void dumpElement(const DybDaq::LtbReadout& readout,
00122 const std::string& indent) const ;
00123
00124 void dumpElement(const DybDaq::CbltBody& body) const ;
00125
00126 void dumpElement(const DybDaq::CbltBody& body,
00127 const std::string& indent) const ;
00128
00129 void dumpElement(const DybDaq::CbltFoot& foot) const ;
00130
00131 void dumpElement(const DybDaq::CbltFoot& foot,
00132 const std::string& indent) const ;
00133
00134 void dumpElement(const DybDaq::CbltHead& head) const ;
00135
00136 void dumpElement(const DybDaq::CbltHead& head,
00137 const std::string& indent) const ;
00138
00139 void dumpElement(const DybDaq::CbltReadout& readout) const ;
00140
00141 void dumpElement(const DybDaq::CbltReadout& readout,
00142 const std::string& indent) const ;
00143
00144 void dumpElement(const DybDaq::RomHeader& header) const ;
00145
00146 void dumpElement(const DybDaq::RomHeader& header,
00147 const std::string& indent) const ;
00148
00149 void dumpElement(const DybDaq::RomFragment& fragment) const;
00150
00151 void dumpElement(const DybDaq::RomFragment& fragment,
00152 const std::string& indent) const;
00153
00154 void dumpElement(const DybDaq::EventHeader& header) const ;
00155
00156 void dumpElement(const DybDaq::EventHeader& header,
00157 const std::string& indent) const ;
00158
00159 void dumpElement(const DybDaq::EventReadout& readout) const;
00160
00161 void dumpElement(const DybDaq::EventReadout& readout,
00162 const std::string& indent) const;
00163
00164 void dumpElement(const DybDaq::FileEndRecord& record) const ;
00165
00166 void dumpElement(const DybDaq::FileEndRecord& record,
00167 const std::string& indent) const ;
00168
00169 void dumpElement(const DybDaq::DataSeparatorRecord& record) const ;
00170
00171 void dumpElement(const DybDaq::DataSeparatorRecord& record,
00172 const std::string& indent) const ;
00173
00174 void dumpElement(const DybDaq::CalibrationParametersRecord& record) const ;
00175
00176 void dumpElement(const DybDaq::CalibrationParametersRecord& record,
00177 const std::string& indent) const ;
00178
00179 void dumpElement(const DybDaq::RunParametersRecord& record) const ;
00180
00181 void dumpElement(const DybDaq::RunParametersRecord& record,
00182 const std::string& indent) const ;
00183
00184 void dumpElement(const DybDaq::MetadataStrings& record) const ;
00185
00186 void dumpElement(const DybDaq::MetadataStrings& record,
00187 const std::string& indent) const ;
00188
00189 void dumpElement(const DybDaq::FileNameStrings& record) const ;
00190
00191 void dumpElement(const DybDaq::FileNameStrings& record,
00192 const std::string& indent) const ;
00193
00194 void dumpElement(const DybDaq::FileStartRecord& record) const ;
00195
00196 void dumpElement(const DybDaq::FileStartRecord& record,
00197 const std::string& indent) const ;
00198
00199 void dumpElement(const DybDaq::FileBuffer& record) const ;
00200
00201 void dumpElement(const DybDaq::FileBuffer& record,
00202 const std::string& indent) const ;
00203 private:
00204
00208 DaqXmlStream();
00209
00213 DaqXmlStream(DaqXmlStream& rhs);
00214
00218 DaqXmlStream& operator=(DaqXmlStream& rhs);
00219
00223 std::ostream* m_output;
00224
00228 std::string* m_indent;
00229
00233 bool m_strict;
00234 };
00235
00236 }
00237
00238 #endif // DAQXML_DAQXMLSTREAM_H