Berkeley Nuclear Data Software
CutManager.h
Go to the documentation of this file.
1 #ifndef _CUT_MANAGER_H_
2 #define _CUT_MANAGER_H_
3 
4 //project includes
5 #include "CutClasses.h"
6 
7 //root includes
8 #include "TCutG.h"
9 
10 //c++ includes
11 #include <string>
12 #include <map>
13 #include <iostream>
14 #include <vector>
15 
21 {
22 public:
25  CutManager();
26  //copy constructor for ensuring deep copies
27  CutManager(const CutManager& a_rhs);
28  CutManager& operator=(const CutManager& a_rhs);
29 
33  void addOrModCut(std::string a_name,
34  CutBase* a_cut
35  );
36 
39  std::vector<std::string > getCutNameList();
42  bool passesCut(std::string a_name,
43  double a_X,
44  const std::vector<double>& a_Ys={}
45  ) const;
46  virtual std::ostream& print( std::ostream& a_stream = std::cout ) const;
47 
50  virtual std::ostream& genJSON(TCutG* a_cut,
51  std::ostream& a_stream = std::cout ) const;
56  virtual void genTCutGs(double a_minX,double a_maxX);
57  //clean up cuts
58  virtual ~CutManager();
59 private:
60  //stores pointers to the NSD cuts
61  std::map<std::string , CutBase*> m_cuts;
62  //stores pointers to the TCutG representations of the NSD Cuts
63  std::map<std::string , TCutG*> m_rootCuts;
64 
65 };
66 
67 #endif
Definition: CutClasses.h:70
Definition: CutManager.h:21
std::vector< std::string > getCutNameList()
Definition: CutManager.cpp:50
void addOrModCut(std::string a_name, CutBase *a_cut)
Definition: CutManager.cpp:33
virtual std::ostream & genJSON(TCutG *a_cut, std::ostream &a_stream=std::cout) const
Definition: CutManager.cpp:92
virtual void genTCutGs(double a_minX, double a_maxX)
Definition: CutManager.cpp:123
virtual ~CutManager()
Definition: CutManager.cpp:134
CutManager()
Definition: CutManager.cpp:4
virtual std::ostream & print(std::ostream &a_stream=std::cout) const
Definition: CutManager.cpp:81
bool passesCut(std::string a_name, double a_X, const std::vector< double > &a_Ys={}) const
Definition: CutManager.cpp:62
CutManager & operator=(const CutManager &a_rhs)
Definition: CutManager.cpp:18