Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/sg/event_action is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_sg_event_action
0005 #define tools_sg_event_action
0006 
0007 #include "matrix_action"
0008 
0009 #include "event"
0010 
0011 namespace tools {
0012 namespace sg {
0013 
0014 class event_action : public matrix_action {
0015   TOOLS_ACTION(event_action,tools::sg::event_action,matrix_action)
0016 public:
0017   event_action(std::ostream& a_out,unsigned int a_ww,unsigned int a_wh,event& a_event)
0018   :matrix_action(a_out,a_ww,a_wh)
0019   ,m_event(a_event)
0020   ,m_do_switch_children(false)
0021 
0022   ,m_done(false)
0023   {}
0024   virtual ~event_action(){}
0025 public:
0026   event_action(const event_action& a_from)
0027   :matrix_action(a_from)
0028   ,m_event(a_from.m_event)
0029   ,m_do_switch_children(a_from.m_do_switch_children)
0030 
0031   ,m_done(false)
0032   {}
0033   event_action& operator=(const event_action& a_from){
0034     matrix_action::operator=(a_from);
0035     m_do_switch_children = a_from.m_do_switch_children;
0036 
0037     m_done = false;
0038     return *this;
0039   }
0040 public:
0041   void reset() {
0042     matrix_action::reset();
0043     m_done = false;
0044   }
0045 
0046   const event& get_event() const {return m_event;}
0047   event& get_event() {return m_event;}
0048 
0049   void set_done(bool a_value) {m_done = a_value;}
0050   bool done() const {return m_done;}
0051 
0052   void set_do_switch_children(bool a_value) {m_do_switch_children = a_value;}
0053   bool do_switch_children() const {return m_do_switch_children;}
0054 protected:
0055   event& m_event;
0056   bool m_do_switch_children;
0057   bool m_done;
0058 };
0059 
0060 }}
0061 
0062 #endif