27#include "hist2workspaceCommandLineOptionsHelp.h"
33 namespace HistFactory {
37 std::vector< HistFactory::Measurement > measurement_list;
48 for(
unsigned int i = 0; i < measurement_list.size(); ++i) {
69int main(
int argc,
char** argv) {
72 std::cerr <<
"need input file" << std::endl;
77 gROOT->SetMustClean(
false);
81 std::string input(argv[1]);
82 if ( input ==
"-h" || input ==
"--help"){
83 fprintf(stderr, kCommandLineOptionsHelp);
90 catch(
const std::string &str) {
91 std::cerr <<
"hist2workspace - Caught exception: " << str << std::endl ;
94 catch(
const std::exception&
e ) {
95 std::cerr <<
"hist2workspace - Caught Exception: " <<
e.what() << std::endl;
105 std::string flag(argv[1]);
106 std::string input(argv[2]);
108 if(flag==
"-standard_form") {
112 catch(
const std::string &str) {
113 std::cerr <<
"hist2workspace - Caught exception: " << str << std::endl ;
116 catch(
const std::exception&
e ) {
117 std::cerr <<
"hist2workspace - Caught Exception: " <<
e.what() << std::endl;
121 std::cerr <<
"hist2workspace - Caught Exception" << std::endl;
126 else if(flag==
"-number_counting_form") {
127 std::cout <<
"ERROR: 'number_counting_form' is now deprecated." << std::endl;
143 std::cerr <<
"Unrecognized flag. " << std::endl;
std::vector< RooStats::HistFactory::Measurement > GetMeasurementsFromXML(std::string input)
The "main" method.
The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple R...
void CollectHistograms()
The most common way to add histograms to channels is to have them stored in ROOT files and to give Hi...
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add objects like histograms, TGraph2D, etc in memory.
int main(int argc, char **argv)
main function of the hist2workspace executable.
RooWorkspace * MakeModelAndMeasurementFast(RooStats::HistFactory::Measurement &measurement)
void fastDriver(std::string input)
Namespace for the RooStats classes.