Selaa lähdekoodia

Adds calculation of Top Mass from generator objects as well as saving function implementations to output file

Caleb Fangmeier 7 vuotta sitten
vanhempi
commit
1a706b5a62
3 muutettua tiedostoa jossa 15 lisäystä ja 2 poistoa
  1. 2 2
      api.hpp
  2. 9 0
      dataset.hpp
  3. 4 0
      value.hpp

+ 2 - 2
api.hpp

@@ -70,8 +70,8 @@ namespace fv{
 
     template <typename... ArgTypes>
     Value<std::tuple<ArgTypes...>>*
-    tuple(Value<ArgTypes>*... args, const std::string& alias=""){
-        return new Tuple<ArgTypes...>(args..., alias);
+    tuple(Value<ArgTypes>*... args){
+        return new Tuple<ArgTypes...>(args..., "");
     }
 
     template <size_t N, typename... ArgTypes>

+ 9 - 0
dataset.hpp

@@ -67,6 +67,15 @@ class DataSet{
                 value_map[container.first] = container.second->get_value_name();
             return value_map;
         }
+
+        std::map<std::string,std::string> get_function_name_impl_map(){
+            std::map<std::string, std::string> impl_map;
+            for(auto fn : GenFunction::function_registry)
+                if (fn.second != nullptr){
+                    impl_map[fn.first] = GenFunction::format_code(fn.second->get_impl());
+                }
+            return impl_map;
+        }
     public:
         void process(bool silent=false){
             int events, current_event;

+ 4 - 0
value.hpp

@@ -164,6 +164,10 @@ class GenFunction {
             return name;
         }
 
+        std::string& get_impl(){
+            return impl;
+        }
+
         /**
          * Attempt to invoke clang-format for the purpose of printing out
          * nicely formatted functions to the log file. If clang-format is not