|
RAPIDO
Repeatable Analysis Programming for Interpretability, Durability, and Organization
|
#include <histflow.h>
Public Member Functions | |
| Histflow (std::string new_name) | |
| Histflow (std::string new_name, Cut *new_root) | |
| ~Histflow () | |
| template<typename THist1D > | |
| void | bookHist1D (std::string target_cut_name, THist1D *hist, std::function< bool()> eval_lambda, std::function< double()> fill_lambda) |
| template<typename THist1D > | |
| void | bookHist1D (Cut *target_cut, THist1D *hist, std::function< bool()> eval_lambda, std::function< double()> fill_lambda) |
| template<typename THist1D > | |
| void | bookHist1D (std::string target_cut_name, THist1D *hist, std::function< double()> fill_lambda) |
| template<typename THist1D > | |
| void | bookHist1D (Cut *target_cut, THist1D *hist, std::function< double()> fill_lambda) |
| template<typename THist2D > | |
| void | bookHist2D (std::string target_cut_name, THist2D *hist, std::function< bool()> eval_lambda, std::function< std::pair< double, double >()> fill_lambda) |
| template<typename THist2D > | |
| void | bookHist2D (Cut *target_cut, THist2D *hist, std::function< bool()> eval_lambda, std::function< std::pair< double, double >()> fill_lambda) |
| template<typename THist2D > | |
| void | bookHist2D (std::string target_cut_name, THist2D *hist, std::function< std::pair< double, double >()> fill_lambda) |
| template<typename THist2D > | |
| void | bookHist2D (Cut *target_cut, THist2D *hist, std::function< std::pair< double, double >()> fill_lambda) |
| template<typename THist3D > | |
| void | bookHist3D (std::string target_cut_name, THist3D *hist, std::function< bool()> eval_lambda, std::function< std::tuple< double, double, double >()> fill_lambda) |
| template<typename THist3D > | |
| void | bookHist3D (Cut *target_cut, THist3D *hist, std::function< bool()> eval_lambda, std::function< std::tuple< double, double, double >()> fill_lambda) |
| template<typename THist3D > | |
| void | bookHist3D (std::string target_cut_name, THist3D *hist, std::function< std::tuple< double, double, double >()> fill_lambda) |
| template<typename THist3D > | |
| void | bookHist3D (Cut *target_cut, THist3D *hist, std::function< std::tuple< double, double, double >()> fill_lambda) |
| void | writeHists (TFile *tfile) |
Public Member Functions inherited from Cutflow | |
| Cutflow () | |
| Cutflow (std::string new_name) | |
| Cutflow (std::string new_name, Cut *new_root) | |
| ~Cutflow () | |
| void | setRoot (Cut *new_root) |
| void | insert (std::string target_cut_name, Cut *new_cut, Direction direction) |
| void | insert (Cut *target_cut, Cut *new_cut, Direction direction) |
| void | replace (std::string target_cut_name, Cut *new_cut) |
| void | replace (Cut *target_cut, Cut *new_cut) |
| void | remove (std::string target_cut_name) |
| void | remove (Cut *target_cut) |
| virtual bool | run () |
| bool | run (Cut *target_cut) |
| bool | run (std::string target_cut_name) |
| std::vector< bool > | run (std::vector< Cut * > target_cuts) |
| std::vector< bool > | run (std::vector< std::string > target_cuts) |
| bool | isProgeny (std::string parent_cut_name, std::string target_cut_name, Direction direction) |
| bool | isProgeny (Cut *parent_cut, Cut *target_cut, Direction direction) |
| Cut * | findTerminus (std::string starting_cut_name) |
| Cut * | findTerminus (Cut *starting_cut) |
| void | print (bool show_timing=false) |
| void | write (std::string output_dir="") |
| void | writeCSV (std::string output_dir="") |
| void | writeMermaid (std::string output_dir="", std::string orientation="TD") |
| void | setDebugLambda (std::function< void(Cut *)> new_debugger) |
Protected Member Functions | |
| bool | recursiveEvaluate (Cut *cut) override |
| template<typename THist > | |
| THist * | bookHist (std::string target_cut_name, THist *hist) |
Protected Member Functions inherited from Cutflow | |
| Cut * | getCut (std::string cut_name) |
| bool | recursiveSearchProgeny (Cut *cut, Cut *target_cut) |
| Cut * | recursiveFindTerminus (Cut *cut) |
| void | recursivePrint (std::string tabs, Cut *cut, Direction direction, bool show_timing=false) |
| void | recursiveWrite (Cut *cut, std::ofstream &ofstream, std::string output_cflow) |
| void | recursiveWriteCSV (std::string output_dir, Cut *cut, Direction direction, int csv_idx, Utilities::CSVFiles csv_files) |
| void | recursiveWriteMermaid (Cut *cut, std::ofstream &ofstream, std::string output_mmd) |
| void | recursiveDelete (Cut *cut) |
Protected Attributes | |
| std::map< std::string, std::vector< std::function< void(double)> > > | fill_schedule |
| std::map< TString, std::function< void()> > | hist_writers |
Protected Attributes inherited from Cutflow | |
| Cut * | root |
| std::map< std::string, Cut * > | cut_record |
| std::function< void(Cut *)> | debugger |
| bool | debugger_is_set |
Additional Inherited Members | |
Public Attributes inherited from Cutflow | |
| std::string | name |
| Utilities::Variables | globals |
Modified Cutflow object that fills booked histograms after passing a given set of cuts
| Histflow::Histflow | ( | std::string | new_name | ) |
| Histflow::Histflow | ( | std::string | new_name, |
| Cut * | new_root ) |
Histflow overload constructor
| new_name | name of histflow |
| new_root | pointer to cut object to use as root node |
| Histflow::~Histflow | ( | ) |
Histflow destructor
|
protected |
(PROTECTED) Handle internal scheduling for Histflow::bookHist1D and Histflow::bookHist2D
| target_cut_name | target node name |
| hist | pointer to 1D ROOT histogram to schedule |
| void Histflow::bookHist1D | ( | Cut * | target_cut, |
| THist1D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< double()> | fill_lambda ) |
Schedule a ROOT 1D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to 1D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the value used to fill the histogram |
| void Histflow::bookHist1D | ( | Cut * | target_cut, |
| THist1D * | hist, | ||
| std::function< double()> | fill_lambda ) |
Schedule a ROOT 1D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to 1D ROOT histogram to schedule |
| fill_lambda | lambda function that computes the value used to fill the histogram |
| void Histflow::bookHist1D | ( | std::string | target_cut_name, |
| THist1D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< double()> | fill_lambda ) |
Schedule a ROOT 1D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to 1D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the value used to fill the histogram |
| void Histflow::bookHist1D | ( | std::string | target_cut_name, |
| THist1D * | hist, | ||
| std::function< double()> | fill_lambda ) |
Schedule a ROOT 1D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to 1D ROOT histogram to schedule |
| fill_lambda | lambda function that computes the value used to fill the histogram |
| void Histflow::bookHist2D | ( | Cut * | target_cut, |
| THist2D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< std::pair< double, double >()> | fill_lambda ) |
Schedule a ROOT 2D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to 2D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist2D | ( | Cut * | target_cut, |
| THist2D * | hist, | ||
| std::function< std::pair< double, double >()> | fill_lambda ) |
Schedule a ROOT 2D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to ROOT 2D histogram to schedule |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist2D | ( | std::string | target_cut_name, |
| THist2D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< std::pair< double, double >()> | fill_lambda ) |
Schedule a ROOT 2D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to 2D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist2D | ( | std::string | target_cut_name, |
| THist2D * | hist, | ||
| std::function< std::pair< double, double >()> | fill_lambda ) |
Schedule a ROOT 2D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to ROOT 2D histogram to schedule |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist3D | ( | Cut * | target_cut, |
| THist3D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< std::tuple< double, double, double >()> | fill_lambda ) |
Schedule a ROOT 3D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to 3D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist3D | ( | Cut * | target_cut, |
| THist3D * | hist, | ||
| std::function< std::tuple< double, double, double >()> | fill_lambda ) |
Schedule a ROOT 3D histogram for a given cut
| target_cut | pointer to target node |
| hist | pointer to ROOT 3D histogram to schedule |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist3D | ( | std::string | target_cut_name, |
| THist3D * | hist, | ||
| std::function< bool()> | eval_lambda, | ||
| std::function< std::tuple< double, double, double >()> | fill_lambda ) |
Schedule a ROOT 3D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to 3D ROOT histogram to schedule |
| eval_lambda | lambda function that computes whether histogram should be filled |
| fill_lambda | lambda function that computes the values used to fill the histogram |
| void Histflow::bookHist3D | ( | std::string | target_cut_name, |
| THist3D * | hist, | ||
| std::function< std::tuple< double, double, double >()> | fill_lambda ) |
Schedule a ROOT 3D histogram for a given cut
| target_cut_name | target node name |
| hist | pointer to ROOT 3D histogram to schedule |
| fill_lambda | lambda function that computes the values used to fill the histogram |
|
overrideprotectedvirtual |
(PROTECTED) Additional definition that recursively evaluates cuts in cutflow and fills scheduled histograms when appropriate cuts are passed
| cut | pointer to current cut |
Reimplemented from Cutflow.
| void Histflow::writeHists | ( | TFile * | tfile | ) |
Write all histograms to a given TFile
| tfile | pointer to ROOT TFile to write histograms to |
|
protected |
"Schedule" dictating when to fill certain histograms
|
protected |
Collection of functions that write histograms to opened TFile