make PSI bulk MusrRoot files accessible if the file name is generated from the run-number, year, etc.
This commit is contained in:
parent
341fa9f77c
commit
c6c7deec9c
@ -704,12 +704,16 @@ std::string dump_create_fln(std::string runNo, std::string year, std::string fil
|
|||||||
|
|
||||||
char fln[64];
|
char fln[64];
|
||||||
char ptatdc[8];
|
char ptatdc[8];
|
||||||
|
memset(ptatdc, '\0', sizeof(ptatdc));
|
||||||
if (pta)
|
if (pta)
|
||||||
strcpy(ptatdc, "pta");
|
strcpy(ptatdc, "pta");
|
||||||
else
|
else
|
||||||
strcpy(ptatdc, "tdc");
|
strcpy(ptatdc, "tdc");
|
||||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT")) {
|
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT")) {
|
||||||
|
if (instrument == "") // i.e. LEM
|
||||||
snprintf(fln, sizeof(fln), "lem%02d_his_%04d.root", yearShort, iRunNo);
|
snprintf(fln, sizeof(fln), "lem%02d_his_%04d.root", yearShort, iRunNo);
|
||||||
|
else
|
||||||
|
snprintf(fln, sizeof(fln), "deltat_%s_%s_%s_%04d.root", ptatdc, instrument.c_str(), year.c_str(), iRunNo);
|
||||||
} else if (boost::iequals(fileFormat, "NeXus")) {
|
} else if (boost::iequals(fileFormat, "NeXus")) {
|
||||||
snprintf(fln, sizeof(fln), "%s.nxs", runNo.c_str());
|
snprintf(fln, sizeof(fln), "%s.nxs", runNo.c_str());
|
||||||
} else if (boost::iequals(fileFormat, "PSI-BIN")) {
|
} else if (boost::iequals(fileFormat, "PSI-BIN")) {
|
||||||
@ -975,7 +979,10 @@ int main(int argc, char *argv[])
|
|||||||
for (unsigned int i=0; i<pathList.size(); i++) {
|
for (unsigned int i=0; i<pathList.size(); i++) {
|
||||||
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT") ||
|
if (boost::iequals(fileFormat, "MusrRoot") || boost::iequals(fileFormat, "ROOT") ||
|
||||||
boost::iequals(fileFormat, "WKM")) {
|
boost::iequals(fileFormat, "WKM")) {
|
||||||
|
if (instrument == "") // i.e. LEM
|
||||||
pathFln = pathList[i] + "/" + year + "/" + fileName;
|
pathFln = pathList[i] + "/" + year + "/" + fileName;
|
||||||
|
else
|
||||||
|
pathFln = pathList[i] + "/d" + year + "/tdc/root/" + fileName;
|
||||||
} else {
|
} else {
|
||||||
if (pta)
|
if (pta)
|
||||||
pathFln = pathList[i] + "/d" + year + "/pta/" + fileName;
|
pathFln = pathList[i] + "/d" + year + "/pta/" + fileName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user