Skip to content
Snippets Groups Projects
Commit d59ed51a authored by adrien-matta's avatar adrien-matta
Browse files

* further progress to nptool-wizard* further progress to

* nptool-wizard
parent d26d1530
No related branches found
No related tags found
No related merge requests found
......@@ -71,11 +71,14 @@ MACRO(subdirlist result curdir)
IF(IS_DIRECTORY ${curdir}/${child})
string(COMPARE EQUAL "${child}" "CMakeFiles" r0)
string(COMPARE EQUAL "${child}" ".DS_Store" r1)
set(det "")
string(REPLACE "Detectors/" "" det ${child})
IF(NOT r0 AND NOT r1)
string(COMPARE EQUAL "${DETLIST}" "" r2)
IF(r2)
LIST(APPEND dirlist ${child})
ELSEIF(${DETLIST} MATCHES ".*${child}.*" )
ELSEIF(${DETLIST} MATCHES ".*${det}.*" )
LIST(APPEND dirlist ${child})
ENDIF()
ENDIF()
......
......@@ -54,13 +54,15 @@ class TDETECTORNAMEData : public TObject {
public: // Getters and Setters
// Prefere inline declaration to avoid unnecessary called of
// frequently used methods
// add //! to avoid root to create dictionnary to the method
// add //! to avoid root to create dictionnary for the method
///////////////////// SETTERS ////////////////////////
inline void SetE_DetectorNbr(const UShort_t& DetNbr)
{fDETECTORNAME_E_DetectorNbr.push_back(DetNbr);} //!
inline void Set_Energy(const Double_t& Energy)
{fDETECTORNAME_Energy.push_back(Energy);}//!
// Prefer global stter that guaranty the vector are al the same size
inline void SetEnergy(const UShort_t& DetNbr,const Double_t& Energy) {
SetE_DetectorNbr(DetNbr);
Set_Energy(Energy);
......@@ -72,6 +74,7 @@ class TDETECTORNAMEData : public TObject {
{fDETECTORNAME_Time.push_back(Time);}//!
// Prefer global stter that guaranty the vector are al the same size
inline void SetTime(const UShort_t& DetNbr,const Double_t& Time) {
SetT_DetectorNbr(DetNbr);
Set_Time(Time);
......
......@@ -52,48 +52,49 @@ int main(int argc , char** argv){
std::string command,command2;
// Dict
command = "ls ./*/*Dict* > /dev/null 2>/dev/null";
command = "ls ./*/*/*Dict* > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/*Dict* > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/*Dict* > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// DetectorClassList
command = "ls ./DetectorClassList.txt > /dev/null 2>/dev/null";
command = "ls ./ClassList.txt > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./DetectorClassList.txt > /dev/null 2>/dev/null";
command2 = "rm -f ./ClassList.txt > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// pcm
command = "ls ./*/*.pcm > /dev/null 2>/dev/null";
command = "ls ./*/*/*.pcm > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/*.pcm > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/*.pcm > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// rootmap
command = "ls ./*/*.rootmap > /dev/null 2>/dev/null";
command = "ls ./*/*/*.rootmap > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/*.rootmap > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/*.rootmap > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// Makefile
command = "ls ./*/Makefile > /dev/null 2>/dev/null";
command = "ls ./*/*/Makefile > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/Makefile > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/Makefile > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// ninja
command = "ls ./*.ninja > /dev/null 2>/dev/null";
command = "ls ./*/*/.ninja > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*.ninja > /dev/null 2>/dev/null";
// Prefer global stter that guaranty the vector are al the same size
command2 = "rm -f ./*/*/.ninja > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// lib
......@@ -111,10 +112,10 @@ int main(int argc , char** argv){
return_value=system(command2.c_str());
}
// CMakeFiles
command = "ls ./*/CMakeFiles > /dev/null 2>/dev/null";
command = "ls ./*/*/CMakeFiles > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f .Rf ./*/CMakeFiles > /dev/null 2>/dev/null";
command2 = "rm -f .Rf ./*/*/CMakeFiles > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
command2 = "rm -f .Rf ./CMakeFiles > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
......@@ -152,17 +153,17 @@ int main(int argc , char** argv){
return_value=system(command2.c_str());
}
// so
command = "ls ./*/*.so > /dev/null 2>/dev/null";
command = "ls ./*/*/*.so > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/*.so > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/*.so > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
// dylib
command = "ls ./*/*.dylib > /dev/null 2>/dev/null";
command = "ls ./*/*/*.dylib > /dev/null 2>/dev/null";
return_value=system(command.c_str());
if(!return_value){
command2 = "rm -f ./*/*.dylib > /dev/null 2>/dev/null";
command2 = "rm -f ./*/*/*.dylib > /dev/null 2>/dev/null";
return_value=system(command2.c_str());
}
//bin
......
......@@ -95,10 +95,10 @@ int main(int argc , char** argv){
return_value = system(command.c_str());
// Edit npl file
command = "sed -i '' -e \"s/DETECTORNAME/"+ answer +"/g\" "
command = "sed -i '' -e \"s/DETECTORNAME/"+ answer +"/g\" "
+ pathNPL + answer +"/* > /dev/null 2> /dev/null";
return_value = system(command.c_str());
command = "sed -i '' -e \"s/XAUTHORX/"+ author+"/g\" "
+ pathNPL + answer +"/* > /dev/null 2> /dev/null";
return_value = system(command.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment