|
@@ -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();
|
|
|
}
|
|
|
|