Skip to content

Commit dae9dbf

Browse files
committed
runMassFitter: add main() function and missing header
1 parent fa29e45 commit dae9dbf

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

PWGHF/D2H/Macros/runMassFitter.C

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
#include "HFInvMassFitter.h"
2323

2424
// if .h file not found, please include your local rapidjson/document.h and rapidjson/filereadstream.h here
25+
#include <TCanvas.h>
26+
#include <TDatabasePDG.h>
27+
#include <TFile.h>
28+
#include <TH2F.h>
29+
2530
#include <rapidjson/document.h>
2631
#include <rapidjson/filereadstream.h>
2732

@@ -30,10 +35,6 @@
3035
#include <string> // std::string
3136
#include <vector> // std::vector
3237

33-
#include <TDatabasePDG.h>
34-
#include <TFile.h>
35-
#include <TH2F.h>
36-
3738
#endif
3839

3940
using namespace rapidjson;
@@ -672,3 +673,16 @@ void divideCanvas(TCanvas* canvas, int nSliceVarBins)
672673
}
673674
}
674675
}
676+
677+
int main(int argc, char* argv[])
678+
{
679+
if (argc < 2) {
680+
throw std::runtime_error("Not enough arguments. Please use\n./runMassFitter configFileName");
681+
}
682+
683+
const std::string configFileName = argv[1];
684+
685+
runMassFitter(configFileName);
686+
687+
return 0;
688+
}

0 commit comments

Comments
 (0)