ATLAS Offline Software
Loading...
Searching...
No Matches
mergeProphecy4f.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#include "Prophecy4fMerger.h"
5#include <iostream>
7
8using namespace asg::msgUserCode;
9
10int main(int argc, char*argv[]){
11
12 if(argc<5){
13 ANA_MSG_INFO(" Prophecy4fMerger: merge Powheg and Prophecy LHE files! ");
14 ANA_MSG_INFO(" Usage: ./Prophecy4fMerger [Options]");
15 ANA_MSG_INFO(" Nedeed options:");
16 ANA_MSG_INFO(" --inPowheg [Powheg lhe file]");
17 ANA_MSG_INFO(" --inProphecy4e [Prophecy4f lhe file with 4e decays]");
18 ANA_MSG_INFO(" --inProphecy4mu [Prophecy4f lhe file with 4mu decays]");
19 ANA_MSG_INFO(" --inProphecy2e2mu [Prophecy4f lhe file with 2e2mu decays]");
20 ANA_MSG_INFO(" --outLHE [Outupt lhe file]");
21 ANA_MSG_INFO(" --randomSeed [the seed]");
22 ANA_MSG_INFO(" Additional options:");
23 ANA_MSG_INFO(" --debug [Enable debug mode]");
24 return 0;
25 }
26 std::string powheg, prophecy4e, prophecy4mu, prophecy2e2mu, out;
27 unsigned long long seed = 0;
28 bool debug=false;
29 for(int a=1; a<argc; a++){
30 if(!strcmp(argv[a],"--inPowheg")){
31 powheg = argv[a+1];
32 }
33 else if(!strcmp(argv[a],"--inProphecy4e")){
34 prophecy4e = argv[a+1];
35 }
36 else if(!strcmp(argv[a],"--inProphecy4mu")){
37 prophecy4mu = argv[a+1];
38 }
39 else if(!strcmp(argv[a],"--inProphecy2e2mu")){
40 prophecy2e2mu = argv[a+1];
41 }
42 else if(!strcmp(argv[a],"--outLHE")){
43 out = argv[a+1];
44 }
45 else if(!strcmp(argv[a],"--randomSeed")){
46 seed = std::stoull(argv[a+1]);
47 }
48 else if(!strcmp(argv[a],"--debug")){
49 debug = true;
50 }
51 }
52
53 Prophecy4fMerger merger;
54 merger.setIO(powheg, prophecy4e, prophecy4mu, prophecy2e2mu, out, debug);
55 merger.setRandomSeed(seed);
56 try{
57 merger.merge();
58 } catch (const std::runtime_error & e){
59 ANA_MSG_ERROR("Prophecy4fMerger: Exception thrown in merger.merge() step: " << e.what());
60 return 1;
61 }
62
63 return 0;
64
65}
macros for messaging and checking status codes
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
static Double_t a
const bool debug
void setIO(const std::string &powheg, const std::string &prophecy4e, const std::string &prophecy4mu, const std::string &prophecy2e2mu, const std::string &outlhe, bool debug)
void setRandomSeed(unsigned long long seed)
int main()
Definition hello.cxx:18