|
|
#include "../Paths.hpp"
//Overloaded in case year is int or string
//g++ getPathForPython.cc `root-config --libs --cflags` -o getPathForPython
int main(int argc, char* argv[]) {
char *command = argv[1]; string year(argv[2]); int Run = int(argv[3][0]-48); //48 is zero, not ideall, but if it works...
string magnet(argv[4]);
int Preselected = int(argv[5][0]-48); int MC = int(argv[6][0]-48); int ReferenceChannel = int(argv[7][0]-48); int PHSP = int(argv[8][0]-48); int KshortDecayInVelo = int(argv[9][0]-48); int Selection = int(argv[10][0]-48); int UseLowQ2Range = int(argv[11][0]-48);
// ofstream myfileOutput(thePath+"/tmpPathForPython.txt",ios::trunc); //rewrites the old content
if (strcmp(command, "input") == 0){ cout << GetInputFile(year,magnet,Preselected,MC,ReferenceChannel,PHSP,false, false, false, false) <<endl; // myfileOutput << GetInputFile(year,magnet,Preselected,MC,ReferenceChannel,PHSP,false) << endl;
return 0; } else if (strcmp(command, "BDTinput") == 0){ cout <<GetBDTinputFile(year,MC,ReferenceChannel,PHSP,KshortDecayInVelo)<<endl; // myfileOutput << GetBDTinputFile(year,MC,ReferenceChannel,PHSP,KshortDecayInVelo) << endl;
return 0; } else if (strcmp(command, "inputBkg") == 0){ // TODO myfileOutput << GetInputFileBkg() << endl;
} else if (strcmp(command, "BDToutput") == 0){ cout << GetBDToutputFile(year,Run,MC,ReferenceChannel,PHSP,KshortDecayInVelo,UseLowQ2Range, false) <<endl; // myfileOutput << GetBDToutputFile (year,Run,Selection,MC,ReferenceChannel,PHSP,UseLowQ2Range) << endl;
return 0; } else return 1; //in python, 0 is OK, 1 is wroooong
}
|