DESY Hbb Analysis Framework
AnalysisMetadataExample.cc
Go to the documentation of this file.
1 #include <string>
2 #include <iostream>
3 #include <vector>
4 
5 #include "TFile.h"
6 #include "TFileCollection.h"
7 #include "TChain.h"
8 #include "TH1.h"
9 
11 
12 using namespace std;
13 using namespace analysis;
14 using namespace analysis::tools;
15 
16 
17 // =============================================================================================
18 int main(int argc, char * argv[])
19 {
20  TH1::SetDefaultSumw2(); // proper treatment of errors when scaling histograms
21 
22  // Input files list
23  std::string inputList = "rootFileList.txt";
24  Analysis analysis(inputList);
25 
26 
27  // Analysis of events
28  std::cout << "This analysis has " << analysis.size() << " events" << std::endl;
29  std::cout << "Printing EventFilter info from Metadata \n\n";
30 
31  FilterResults evtFilter = analysis.eventFilter("MssmHbb/Metadata/EventFilter");
32 
33  std::cout << "Total events = " << evtFilter.total << std::endl;
34  std::cout << "Filtered events = " << evtFilter.filtered << std::endl;
35  std::cout << "Filter efficiency = " << evtFilter.efficiency << std::endl;
36 
37 //
38 }
39 
FilterResults eventFilter(const std::string &path)
Definition: Analysis.cc:348
int main(int argc, char *argv[])