diff --git a/modules/interface/helper.h b/modules/interface/helper.h new file mode 100644 index 0000000..06c4f72 --- /dev/null +++ b/modules/interface/helper.h @@ -0,0 +1,18 @@ +/* + * helper.h + * + * Created on: 8 Apr 2017 + * Author: jkiesele + */ + +#ifndef DEEPJET_MODULES_INTERFACE_HELPER_H_ +#define DEEPJET_MODULES_INTERFACE_HELPER_H_ + + +#include +#include +#include "TString.h" + +TString prependXRootD(const TString& path); + +#endif /* DEEPJET_MODULES_INTERFACE_HELPER_H_ */ diff --git a/modules/src/helper.cpp b/modules/src/helper.cpp new file mode 100644 index 0000000..6d6e177 --- /dev/null +++ b/modules/src/helper.cpp @@ -0,0 +1,23 @@ +/* + * helper.cpp + * + * Created on: 8 Apr 2017 + * Author: jkiesele + */ + + +#include "../interface/helper.h" + + +TString prependXRootD(const TString& path){ + + TString full_path = realpath(path, NULL); + if(full_path.BeginsWith("/eos/cms/")){ + TString append="root://eoscms.cern.ch//"; + TString s_remove="/eos/cms/"; + TString newpath (full_path(s_remove.Length(),full_path.Length())); + newpath=append+newpath; + return newpath; + } + return path; +}