LOGO

RestFrames  v1.0.0
RestFrames HEP Event Analysis Software Library
ReconstructionFrame.hh
Go to the documentation of this file.
1 // RestFrames: particle physics event analysis library
3 // --------------------------------------------------------------------
4 // Copyright (c) 2014-2016, Christopher Rogan
14 // This file is part of RestFrames.
15 //
16 // RestFrames is free software; you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation; either version 2 of the License, or
19 // (at your option) any later version.
20 //
21 // RestFrames is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // along with RestFrames. If not, see <http://www.gnu.org/licenses/>.
29 
30 #ifndef ReconstructionFrame_HH
31 #define ReconstructionFrame_HH
32 
33 #include "RestFrames/RestFrame.hh"
34 #include "RestFrames/Group.hh"
35 
36 namespace RestFrames {
37 
39  // ReconstructionFrame class
41  class ReconstructionFrame : public RestFrame {
42  public:
43  ReconstructionFrame(const std::string& sname, const std::string& stitle);
45  virtual ~ReconstructionFrame();
46 
48  virtual void Clear();
49 
57  virtual void AddChildFrame(RestFrame& frame);
58 
65  virtual void RemoveChildFrame(RestFrame& frame);
66 
71  void RemoveChildFrames();
72 
79  virtual void SetParentFrame(RestFrame& frame =
80  RestFrame::Empty());
81 
87  virtual ReconstructionFrame const& GetParentFrame() const;
88 
90  virtual ReconstructionFrame& GetChildFrame(int i = 0) const;
91 
92  virtual void SetGroup(Group& group = Group::Empty());
93  Group& GetGroup() const;
94  GroupList GetListGroups() const;
95 
96  static ReconstructionFrame& Empty();
97 
98  protected:
99  bool InitializeAnalysisRecursive();
100  bool ClearEventRecursive();
101  bool AnalyzeEventRecursive();
102 
103  virtual bool ResetRecoFrame();
104  virtual bool ReconstructFrame();
105 
106  virtual StateList const& GetChildStates(int i = 0) const;
107  virtual StateList const& GetChildStates(const RestFrame& child) const;
108 
109  private:
110  Group* m_GroupPtr;
111  mutable std::map<const RestFrame*, StateList > m_ChildStates;
112 
113  bool InitializeVisibleStates();
114  bool InitializeGroupStates();
115  void FillListGroupsRecursive(GroupList& groups) const;
116 
117  };
118 
119 }
120 
121 #endif
virtual void Clear()
Clears ReconstructionFrame of all connections to other objects.
virtual void RemoveChildFrame(RestFrame &frame)
Remove a child of this frame.
virtual void AddChildFrame(RestFrame &frame)
Add a child RestFrame to this frame.
abstract base class for all Group objects
Definition: Group.hh:46
abstract base class for all Frame objects
virtual ReconstructionFrame & GetChildFrame(int i=0) const
Get the frame of the i th child.
void RemoveChildFrames()
Remove all the children of this frame.
virtual ReconstructionFrame const & GetParentFrame() const
Returns the parent of this frame.
virtual void SetParentFrame(RestFrame &frame=RestFrame::Empty())
Set the parent frame for this frame.