1 #ifndef PhysicsTools_MVATrainer_TrainerMonitoring_h 2 #define PhysicsTools_MVATrainer_TrainerMonitoring_h 9 #include <boost/type_traits.hpp> 10 #include <boost/mpl/bool.hpp> 11 #include <boost/mpl/or.hpp> 16 #include <TDirectory.h> 56 template<
typename T,
typename T1>
63 template<
typename T,
typename T1,
typename T2>
65 T *
obj =
new T(a1, a2);
70 template<
typename T,
typename T1,
typename T2,
typename T3>
72 T *
obj =
new T(a1, a2, a3);
77 template<
typename T,
typename T1,
typename T2,
typename T3,
80 T *
obj =
new T(a1, a2, a3, a4);
85 template<
typename T,
typename T1,
typename T2,
typename T3,
86 typename T4,
typename T5>
88 T *
obj =
new T(a1, a2, a3, a4, a5);
93 template<
typename T,
typename T1,
typename T2,
typename T3,
94 typename T4,
typename T5,
typename T6>
96 T *
obj =
new T(a1, a2, a3, a4, a5, a6);
101 template<
typename T,
typename T1,
typename T2,
typename T3,
102 typename T4,
typename T5,
typename T6,
typename T7>
104 T *
obj =
new T(a1, a2, a3, a4, a5, a6, a7);
105 this->
reg(name, obj);
109 template<
typename T,
typename T1,
typename T2,
typename T3,
110 typename T4,
typename T5,
typename T6,
typename T7,
113 T *
obj =
new T(a1, a2, a3, a4, a5, a6, a7, a8);
114 this->
reg(name, obj);
118 template<
typename T,
typename T1,
typename T2,
typename T3,
119 typename T4,
typename T5,
typename T6,
typename T7,
120 typename T8,
typename T9>
122 T *
obj =
new T(a1, a2, a3, a4, a5, a6, a7, a8, a9);
123 this->
reg(name, obj);
141 std::map<std::string, std::shared_ptr<Object> >
data;
154 virtual void write(TDirectory *
dir) = 0;
164 Object(name), object(object) {}
169 dir->WriteObjectAny(
object.
get(),
170 TClass::GetClass(
typeid(
T)),
180 std::map<std::string, std::shared_ptr<Module> >
modules;
184 template<
typename T,
bool B>
190 {
object->SetDirectory(
nullptr); }
198 boost::is_base_of<TH1, T>,
199 boost::is_base_of<TTree, T> >());
200 this->
book(name,
object);
205 #endif // PhysicsTools_MVATrainer_TrainerMonitoring_h