LOGO

RestFrames  v1.0.1
RestFrames HEP Event Analysis Software Library
InvisibleFrame.cc
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 
33 
34 namespace RestFrames {
35 
37  // InvisibleFrame class
39  template <class T>
40  InvisibleFrame<T>::InvisibleFrame(const std::string& sname,
41  const std::string& stitle)
42  : T(sname, stitle)
43  {
44  T::m_Type = kInvisibleFrame;
45  }
46 
47  template <class T>
49 
50  template <class T>
51  bool InvisibleFrame<T>::IsSoundBody() const {
52  if(RFBase::IsSoundBody())
53  return true;
54  if(!RestFrame::IsSoundBody())
55  return T::SetBody(false);
56 
57  int Nchild = T::GetNChildren();
58  if(Nchild > 0 || T::GetParentFrame().IsEmpty()){
59  T::m_Log << LogWarning << "Problem with parent or child frames" << LogEnd;
60  return T::SetBody(false);
61  }
62  return T::SetBody(true);
63  }
64 
65  template class InvisibleFrame<ReconstructionFrame>;
66  template class InvisibleFrame<GeneratorFrame>;
67 
68 }
69 
70 
ReconstructionFrame.hh
RestFrames::InvisibleFrame
Definition: InvisibleFrame.hh:43
RestFrames::InvisibleFrame::InvisibleFrame
InvisibleFrame(const std::string &sname, const std::string &stitle)
Standard constructor.
Definition: InvisibleFrame.cc:40
GeneratorFrame.hh
InvisibleFrame.hh