LOGO

RestFrames  v1.0.1
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 
48  ReconstructionFrame(const std::string& sname, const std::string& stitle);
49 
52  virtual ~ReconstructionFrame();
53 
55  virtual void Clear();
56 
66  virtual void AddChildFrame(RestFrame& frame);
67 
76  virtual void RemoveChildFrame(RestFrame& frame);
77 
82  void RemoveChildFrames();
83 
93  virtual void SetParentFrame(RestFrame& frame =
95 
102  virtual ReconstructionFrame const& GetParentFrame() const;
103 
112  virtual ReconstructionFrame& GetChildFrame(int i = 0) const;
113 
122  virtual void SetGroup(Group& group = Group::Empty());
123 
130  Group& GetGroup() const;
131 
135  GroupList GetListGroups() const;
136 
140  static ReconstructionFrame& Empty();
141 
142  protected:
144  bool ClearEventRecursive();
145  bool AnalyzeEventRecursive();
146 
147  virtual bool ResetRecoFrame();
148  virtual bool ReconstructFrame();
149 
150  virtual StateList const& GetChildStates(int i = 0) const;
151  virtual StateList const& GetChildStates(const RestFrame& child) const;
152 
153  private:
154  Group* m_GroupPtr;
155  mutable std::map<const RestFrame*, StateList > m_ChildStates;
156 
157  bool InitializeVisibleStates();
158  bool InitializeGroupStates();
159  void FillListGroupsRecursive(GroupList& groups) const;
160 
161  };
162 
163 }
164 
165 #endif
RestFrames::ReconstructionFrame::AnalyzeEventRecursive
bool AnalyzeEventRecursive()
Recursively analyze event in this frame and its children.
Definition: ReconstructionFrame.cc:300
RestFrames::ReconstructionFrame::ClearEventRecursive
bool ClearEventRecursive()
Recursively clear event information from this frame and its children.
Definition: ReconstructionFrame.cc:245
RestFrames::ReconstructionFrame::GetParentFrame
virtual ReconstructionFrame const & GetParentFrame() const
Returns the parent of this frame.
Definition: ReconstructionFrame.cc:97
RestFrames::Group::Empty
static Group & Empty()
Returns empty Group.
Definition: Group.cc:58
RestFrames::ReconstructionFrame::InitializeAnalysisRecursive
bool InitializeAnalysisRecursive()
Recursively initialize this frame and its children for analysis.
Definition: ReconstructionFrame.cc:218
RestFrames::RestFrame
abstract base class for all Frame objects
Definition: RestFrame.hh:45
RestFrames::Group
abstract base class for all Group objects
Definition: Group.hh:46
RestFrames::ReconstructionFrame::SetParentFrame
virtual void SetParentFrame(RestFrame &frame=RestFrame::Empty())
Set the parent frame for this frame.
Definition: ReconstructionFrame.cc:91
RestFrames::RFList< Group >
RestFrames::ReconstructionFrame::AddChildFrame
virtual void AddChildFrame(RestFrame &frame)
Add a child RestFrame to this frame.
Definition: ReconstructionFrame.cc:66
RestFrames::ReconstructionFrame::ReconstructionFrame
ReconstructionFrame()
Empty constructor.
Definition: ReconstructionFrame.cc:49
RestFrames::ReconstructionFrame::GetChildFrame
virtual ReconstructionFrame & GetChildFrame(int i=0) const
Get the frame of the i th child.
Definition: ReconstructionFrame.cc:105
RestFrames::ReconstructionFrame::RemoveChildFrame
virtual void RemoveChildFrame(RestFrame &frame)
Remove a child of this frame.
Definition: ReconstructionFrame.cc:72
RestFrames::ReconstructionFrame::SetGroup
virtual void SetGroup(Group &group=Group::Empty())
Sets group of this frame.
Definition: ReconstructionFrame.cc:124
RestFrames::ReconstructionFrame::GetListGroups
GroupList GetListGroups() const
Returns a list of groups (GroupList) of this class.
Definition: ReconstructionFrame.cc:149
RestFrames::RestFrame::Empty
static RestFrame & Empty()
Returns empty RestFrame.
Definition: RestFrame.cc:62
RestFrames::ReconstructionFrame::Empty
static ReconstructionFrame & Empty()
Returns empty ReconstructionFrame.
Definition: ReconstructionFrame.cc:62
RestFrames::ReconstructionFrame::GetGroup
Group & GetGroup() const
Returns group of this class.
Definition: ReconstructionFrame.cc:142
RestFrames::ReconstructionFrame::RemoveChildFrames
void RemoveChildFrames()
Remove all the children of this frame.
Definition: ReconstructionFrame.cc:82
RestFrames::ReconstructionFrame
Definition: ReconstructionFrame.hh:41
Group.hh
RestFrame.hh
RestFrames::ReconstructionFrame::Clear
virtual void Clear()
Clears ReconstructionFrame of all connections to other objects.
Definition: ReconstructionFrame.cc:56