ソースを参照

Disables event_coutn and xsection parts of dataset since they are
specific to the Minitree data format

Caleb Fangmeier 7 年 前
コミット
f455a5d61f
共有1 個のファイルを変更した22 個の追加23 個の削除を含む
  1. 22 23
      root/dataset.hpp

+ 22 - 23
root/dataset.hpp

@@ -73,28 +73,27 @@ class TreeDataSet : public DataSet{
             return next_entry-1;
         }
 
-        void save_event_count_and_xsection(){
-            return; //TODO: Rewrite
-            std::map<std::string,int> event_counts;
-            std::map<std::string,float> xsecs;
-            string fname, label;
-            for(auto& p : input_labels){
-                std::tie(fname, label) = p;
-                TFile f(fname.c_str());
-                TH1D* count = (TH1D*)f.Get("Count");
-                event_counts[label] = (int)count->GetBinContent(1);
-
-                TTree* tree = (TTree*)f.Get("tree");
-                TBranch* b = tree->GetBranch("xsec");
-                float xsec;
-                b->SetAddress(&xsec);
-                b->GetEntry(1);
-                xsecs[label] = xsec;
-            }
-            output_file->cd();
-            gDirectory->WriteObjectAny(&event_counts, "std::map<std::string,int>", "_event_counts");
-            gDirectory->WriteObjectAny(&xsecs, "std::map<std::string,float>", "_xsecs");
-        }
+        /* void save_event_count(){ */
+        /*     std::map<std::string,int> event_counts; */
+        /*     std::map<std::string,float> xsecs; */
+        /*     string fname, label; */
+        /*     for(auto& p : input_labels){ */
+        /*         std::tie(fname, label) = p; */
+        /*         TFile f(fname.c_str()); */
+        /*         TH1D* count = (TH1D*)f.Get("Count"); */
+        /*         event_counts[label] = (int)count->GetBinContent(1); */
+
+        /*         TTree* tree = (TTree*)f.Get("tree"); */
+        /*         TBranch* b = tree->GetBranch("xsec"); */
+        /*         float xsec; */
+        /*         b->SetAddress(&xsec); */
+        /*         b->GetEntry(1); */
+        /*         xsecs[label] = xsec; */
+        /*     } */
+        /*     output_file->cd(); */
+        /*     gDirectory->WriteObjectAny(&event_counts, "std::map<std::string,int>", "_event_counts"); */
+        /*     gDirectory->WriteObjectAny(&xsecs, "std::map<std::string,float>", "_xsecs"); */
+        /* } */
 
     public:
 
@@ -117,7 +116,7 @@ class TreeDataSet : public DataSet{
           }
 
         ~TreeDataSet(){
-            save_event_count_and_xsection();
+            /* save_event_count_and_xsection(); */
             output_file->Close();
         }