test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PattRecoTree.h
Go to the documentation of this file.
1 
11 #ifndef DataFormats_JetReco_PattRecoTree_h
12 #define DataFormats_JetReco_PattRecoTree_h
13 
15 
16 namespace reco {
17  template<typename ScaleType, class Cluster>
19  {
20  public:
22 
23  inline PattRecoTree() : sparse_(false) {}
24 
25  // Inspectors
26  inline bool isSparse() const {return sparse_;}
27  inline const std::vector<Node>& getNodes() const {return nodes_;}
28  inline const std::vector<ScaleType>& getScales() const
29  {return scales_;}
30 
31  // Modifiers
32  inline void setSparse(const bool b) {sparse_ = b;}
33 
34  inline void clear()
35  {nodes_.clear(); scales_.clear(); sparse_ = false;}
36 
37  inline void reserveNodes(const unsigned n) {nodes_.reserve(n);}
38  inline void reserveScales(const unsigned n) {scales_.reserve(n);}
39  inline void addNode(const Node& node) {nodes_.push_back(node);}
40  inline void addScale(const double s)
41  {scales_.push_back(static_cast<ScaleType>(s));}
42 
43  private:
44  std::vector<Node> nodes_;
45  std::vector<ScaleType> scales_;
46  bool sparse_;
47  };
48 }
49 
50 #endif // JetReco_PattRecoTree_h
void reserveNodes(const unsigned n)
Definition: PattRecoTree.h:37
void setSparse(const bool b)
Definition: PattRecoTree.h:32
Tree nodes for storing FFTJet preclusters.
Definition: PattRecoNode.h:16
bool isSparse() const
Definition: PattRecoTree.h:26
std::vector< ScaleType > scales_
Definition: PattRecoTree.h:45
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:18
void addScale(const double s)
Definition: PattRecoTree.h:40
void reserveScales(const unsigned n)
Definition: PattRecoTree.h:38
const std::vector< Node > & getNodes() const
Definition: PattRecoTree.h:27
const std::vector< ScaleType > & getScales() const
Definition: PattRecoTree.h:28
std::vector< Node > nodes_
Definition: PattRecoTree.h:44
double b
Definition: hdecay.h:120
PattRecoNode< Cluster > Node
Definition: PattRecoTree.h:21
volatile std::atomic< bool > shutdown_flag false
void addNode(const Node &node)
Definition: PattRecoTree.h:39