/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/eformat/eformat-00-00-04/eformat/write/ROSFragment.h

Go to the documentation of this file.
00001 //Dear emacs, this is -*- c++ -*-
00002 
00013 #ifndef EFORMAT_WRITE_ROSFRAGMENT_H
00014 #define EFORMAT_WRITE_ROSFRAGMENT_H
00015 
00016 #include "eformat/write/ROBFragment.h"
00017 
00018 namespace eformat {
00019 
00020   namespace write {
00021 
00022     class SubDetectorFragment; 
00023 
00027     class ROSFragment {
00028 
00029     public:
00030 
00039       ROSFragment (uint32_t source_id, uint32_t run_no,
00040                    uint32_t lvl1_id, uint32_t bc_id);
00041 
00048       ROSFragment (uint32_t* ros);
00049 
00060       ROSFragment (eformat::write::node_t* ros);
00061 
00066       ROSFragment ();
00067 
00079       ROSFragment (const ROSFragment& other);
00080 
00084       virtual ~ROSFragment () {}
00085 
00097       ROSFragment& operator= (const ROSFragment& other);
00098 
00106       void status (uint32_t n, const uint32_t* status);
00107 
00111       inline uint32_t nstatus (void) const { return m_node[0].base[5]; }
00112 
00116       inline const uint32_t* status (void) const { return m_node[1].base; }
00117 
00123       inline void minor_version (uint16_t v) 
00124       { m_node[0].base[3] = eformat::DEFAULT_VERSION | v; }
00125 
00129       inline uint16_t minor_version (void) const 
00130       { return 0xffff & m_node[0].base[3]; }
00131 
00137       inline void source_id (uint32_t s) 
00138       { m_node[0].base[4] = s; }
00139 
00143       inline uint32_t source_id (void) const 
00144       { return m_node[0].base[4]; }
00145 
00151       inline void run_no (uint32_t s) 
00152       { m_node[2].base[1] = s; }
00153 
00157       inline uint32_t run_no (void) const 
00158       { return m_node[2].base[1]; }
00159 
00165       inline void lvl1_id (uint32_t s) 
00166       { m_node[2].base[2] = s; }
00167 
00171       inline uint32_t lvl1_id (void) const 
00172       { return m_node[2].base[2]; }
00173 
00179       inline void bc_id (uint32_t s) 
00180       { m_node[2].base[3] = s; }
00181 
00185       inline uint32_t bc_id (void) const 
00186       { return m_node[2].base[3]; }
00187 
00193       inline uint32_t meta_size_word (void) const
00194       { return m_node[0].base[2]; }
00195 
00199       inline uint32_t size_word (void) const
00200       { return m_node[0].base[1]; }
00201       
00215       void append (eformat::write::ROBFragment* rob);
00216 
00222       inline const ROBFragment* first_child (void) const { return m_child; }
00223 
00231       void size_change (uint32_t o, uint32_t n);
00232 
00236       inline const SubDetectorFragment* parent (void) const 
00237       { return m_parent; }
00238 
00244       inline void parent (eformat::write::SubDetectorFragment* sd)
00245       { m_parent = sd; }
00246 
00250       inline const ROSFragment* next (void) const { return m_next; }
00251 
00257       inline void next (const ROSFragment* n) { m_next = n; }
00258 
00268       uint32_t page_count (void) const;
00269 
00275       const eformat::write::node_t* bind (void);
00276 
00281       const eformat::write::node_t* extra(void){return & m_extra;};
00282 
00283     private: //representation
00284 
00285       uint32_t m_header[10]; 
00286       eformat::write::node_t m_node[3]; 
00287       eformat::write::SubDetectorFragment* m_parent; 
00288       eformat::write::ROBFragment* m_child; 
00289       eformat::write::ROBFragment* m_last; 
00290       const eformat::write::ROSFragment* m_next; 
00291       eformat::write::node_t m_extra; 
00292       uint32_t m_extra_count; 
00293     };
00294 
00295   }
00296 
00297 }
00298 
00299 #endif /* EFORMAT_WRITE_ROSFRAGMENT_H */

Generated on Tue Nov 29 22:58:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7