Commit 947fd3eb authored by Stezowski Olivier's avatar Stezowski Olivier
Browse files

Merge branch 'preprod' into 'master'

Merge preprod to master

See merge request !66
parents 90763052 c4087ae0
Pipeline #140328 passed with stage
in 9 minutes and 58 seconds
image: gitlab-registry.in2p3.fr/ipnl_gamma/docker_gamma:latest
image: gitlab-registry.in2p3.fr/ipnl_gamma/docker_gamma:ubuntu18
stages:
- build
......
......@@ -43,10 +43,15 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin_)
#if(APPLE)
# set(CMAKE_MACOSX_RPATH 1)
#endif()
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#cmake_policy(SET CMP0077 NEW)
#cmake_policy(SET CMP0068 NEW)
# FIX Warning with rpath on macosx
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#
# ROOT MANDATORY
#
......
......@@ -14,6 +14,6 @@ sonar.cxx.cppcheck.reportPath=./cppcheck_output/
#sonar.cxx.coverage.forceZeroCoverage=true
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.host.url=https://sonar.ipnl.in2p3.fr
sonar.host.url=https://sonar.ip2i.in2p3.fr
sonar.scm.provider=git
sonar.exclusions=**/*.xml,config/**,cmake/**,debug/**,demos/**,doc/**,doxyfiles/**,macros/**,ndb/**,scripts/**,**/*.in
......@@ -27,6 +27,7 @@
#include <iostream>
#include <iomanip>
#include <fstream>
#include <algorithm>
using namespace ADF;
......@@ -68,6 +69,12 @@ Bool_t BasicAFP::NewFile()
std::cout << " -BasicAFP: the input file has just been closed " << fCurrentFileName << std::endl;
}
if(fListOfIndividualFiles.size()) {
if(fCurrentFileNumber<fListOfIndividualFiles.size()) fCurrentFileName = fListOfIndividualFiles.at(fCurrentFileNumber);
else fCurrentFileName.clear();
fCurrentFileNumber++;
}
else {
// open the first file to be ready to be run
std::string tmp = fPath;
if ( tmp.size() > 0 && !(tmp.at(tmp.size()-1) == '/') )
......@@ -78,6 +85,7 @@ Bool_t BasicAFP::NewFile()
<< std::setfill('0') << std::setw(4) << fCurrentFileNumber++ << std::setfill(' ')
<< ".adf";
fCurrentFileName = filename.str();
}
fCurrentFile = ::fopen(fCurrentFileName.c_str(),"rb");
if ( fCurrentFile != 0x0 ) {
......@@ -93,7 +101,7 @@ Bool_t BasicAFP::NewFile()
ok = true;
}
else {
Log << "Could not open input file " << fCurrentFileName << nline;
if(fCurrentFileName.length()) Log << "Could not open input file " << fCurrentFileName << nline;
GetFrameIO().SetStatus(BaseFrameIO::kFinished);
ok = false;
}
......@@ -182,6 +190,22 @@ void BasicAFP::process_initialise (UInt_t *error_code)
std::ifstream filein(conffile.data());
if ( filein.is_open() == true ) {
// check with the first line if the files are given one by one
std::string line;
std::getline(filein,line);
int nblank = std::count(line.begin(), line.end(),' ');
filein.seekg(0);
// case where a list of files is given
if(nblank==0) {
while(filein.good()) {
std::getline(filein,line);
if(line.length()) fListOfIndividualFiles.push_back(line);
}
fCurrentFileNumber = 0;
std::cout << "BasicAFP::process_initialise => list of files to process:" << std::endl;
for(auto &i: fListOfIndividualFiles) std::cout << " -- " << i << std::endl;
}
else {
std::string pathforfiles, basename;
UInt_t starting_number;
......@@ -193,6 +217,7 @@ void BasicAFP::process_initialise (UInt_t *error_code)
std::cout << "BasicAFP::process_initialise " << pathforfiles << " " << basename << " " << starting_number << std::endl;
}
}
}
filein.close();
// open the first file
......
......@@ -48,6 +48,8 @@ private:
std::string fPath;
//! base for all the files produced
std::string fBaseForName;
//! in case files are given one by one
std::vector<std::string> fListOfIndividualFiles;
//! current file
FILE *fCurrentFile;
//! current file number
......
......@@ -41,7 +41,7 @@ LINK_DIRECTORIES( ${ROOT_LIBRARY_DIR} )
SET(EXTRA_EXTERNAL_LIBRARIES ${EXTRA_EXTERNAL_LIBRARIES} Matrix Rint)
# gw
set(EXTRA_INTERNAL_LIBRARIES GWPHYSICS )
set(EXTRA_INTERNAL_LIBRARIES GWPHYSICS GWTOOLS)
####################
### define files ###
......@@ -72,7 +72,7 @@ ROOT_GENERATE_DICTIONARY(G__${Lib_NAME} ${headers} MODULE ${Lib_NAME} LINKDEF ${
#####################
#---Create a shared library with geneated dictionary
add_library(${Lib_NAME} SHARED ${sources} G__${Lib_NAME}.cxx)
add_library(${Lib_NAME} SHARED ${sources} ${headers} G__${Lib_NAME}.cxx)
target_link_libraries(${Lib_NAME} ${EXTRA_EXTERNAL_LIBRARIES} ${EXTRA_INTERNAL_LIBRARIES})
#####################
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
How to create/update the database
1) dowload, in the DataBase/LevelScheme/Downloads folder (create it if not existing), the zip files (3 files) from: https://www.nndc.bnl.gov/ensarchivals/
1) download, in the DataBase/LevelScheme/Downloads folder (create it if not existing), the zip files (3 files) from: https://www.nndc.bnl.gov/ensarchivals/
ex: for the data from 01/11/2018
ex: for the data from 04/10/2019
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_099.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_199.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_299.zip -P Downloads/
mkdir -p $GWSYS/DataBase/LevelScheme/Downloads
cd $GWSYS/DataBase/LevelScheme/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_099.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_199.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_300.zip -P Downloads/
2) execute the ExtractFiles script, giving the files to process in argument:
chmod u+w src/compile.sh
src/compile.sh
chmod u+x src/compile.sh
./src/compile.sh
./ExtractFiles Downloads/ensdf_181101_*.zip
......@@ -2,4 +2,4 @@
NAME=ExtractFiles
NAME2=src/ExtractFiles.cpp
g++ $NAME2 -o $NAME -O6 -g `root-config --cflags` `root-config --cflags --libs` -lProof
g++ $NAME2 -o $NAME -O3 -g `root-config --cflags` `root-config --cflags --libs` -lProof
53.156
79.623
80.999
160.609
223.116
276.404
302.858
356.014
383.859
475.36
563.27
569.30
604.68
795.78
801.86
1038.53
1167.89
1365.17
121.7793
244.6927
344.2724
411.111
443.979
778.890
964.014
1085.793
#1089.700
1112.070
1407.993
186.211
241.981
295.213
351.921
609.312
768.356
934.061
1120.287
1238.110
1377.669
1509.228
1729.595
1764.494
1847.420
2118.551
2204.215
2447.810
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment