diff --git a/cmake/MacroRootDict.cmake b/cmake/MacroRootDict.cmake index c57fd1b15..67be4144f 100644 --- a/cmake/MacroRootDict.cmake +++ b/cmake/MacroRootDict.cmake @@ -69,13 +69,58 @@ MACRO(GEN_ROOT_DICT_LINKDEF_HEADER _namespace) SET(_input_headers ${ARGN}) SET(_linkdef_header "${ROOT_DICT_OUTPUT_DIR}/${_namespace}_Linkdef.h") + #message ( STATUS "${_input_headers}" ) + + ######### This code is used to identify and add std:: lists that use a struct to LinkDef + file (STRINGS "${_input_headers}" lines) + string(FIND "${lines}" "struct" FOUND_STRUCT ) + set ( _structName "NONE" ) + if ( FOUND_STRUCT GREATER 0 ) + string(SUBSTRING "${lines}" ${FOUND_STRUCT} 50 subline) + string(FIND "${subline}" "{" FOUND_OPEN_BRACE ) + # It helps to filter some undesired occurences of struct. But it limits the size of the struct name + if ( FOUND_OPEN_BRACE GREATER 0 AND FOUND_OPEN_BRACE LESS 30 ) + string( SUBSTRING "${subline}" 7 ${FOUND_OPEN_BRACE} _structName) + string( FIND "${_structName}" " {" FOUND_OPEN_BRACE ) + string( SUBSTRING "${_structName}" 0 ${FOUND_OPEN_BRACE} _structName) + endif ( FOUND_OPEN_BRACE GREATER 0 AND FOUND_OPEN_BRACE LESS 30 ) + endif ( FOUND_STRUCT GREATER 0 ) + + set ( FOUND_STD_STRUCT "NO" ) + if( NOT _structName MATCHES "NONE" ) + #message( STATUS "Found::${_structName}::" ) + while(lines) + list(POP_FRONT lines LINE) + # message( STATUS "This is line::${LINE}::" ) + string( FIND "${LINE}" "${_structName}" FOUND_STRUCT_NAME ) + string( FIND "${LINE}" "std::" FOUND_STD ) + if ( FOUND_STRUCT_NAME GREATER 0 AND FOUND_STD GREATER 0 ) + string( SUBSTRING "${LINE}" ${FOUND_STD} -1 LINE) + string( FIND "${LINE}" ">" FOUND_END REVERSE) + if ( FOUND_END GREATER 0 AND FOUND_END LESS 80 ) + MATH(EXPR FOUND_END "${FOUND_END}+1") + string( SUBSTRING "${LINE}" 0 ${FOUND_END} LINE) + message( STATUS "Adding ${LINE} to the dictionary!" ) + set ( FOUND_STD_STRUCT "${LINE}" ) + endif ( FOUND_END GREATER 0 AND FOUND_END LESS 80 ) + endif ( FOUND_STRUCT_NAME GREATER 0 AND FOUND_STD GREATER 0 ) + + string(FIND LINE "${_structName}" FOUND_STRUCT_NAME ) + endwhile() + endif( NOT _structName MATCHES "NONE" ) + ######### This code is used to identify and add std:: lists that use a struct to LinkDef + FOREACH (_header ${_input_headers}) - SET(${_namespace}_file_contents "${${_namespace}_file_contents}#ifdef __CINT__" \n) + SET(${_namespace}_file_contents "${${_namespace}_file_contents}#ifdef __ROOTCLING__" \n) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link off all globals\;" \n) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link off all classes\;" \n) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link off all functions\;" \n) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ nestedclasses\;" \n) - SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ nestedclasses\;" \n) + SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ nestedtypedef\;" \n) + if( NOT FOUND_STD_STRUCT MATCHES "NO" ) + SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ class ${_structName}+\;" \n) + SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ class ${FOUND_STD_STRUCT}+\;" \n) + endif( NOT FOUND_STD_STRUCT MATCHES "NO" ) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#pragma link C++ class ${_namespace}+\;" \n) SET(${_namespace}_file_contents "${${_namespace}_file_contents}#endif" \n) ENDFOREACH () diff --git a/source/framework/core/inc/TRestAnalysisPlot.h b/source/framework/core/inc/TRestAnalysisPlot.h index c85329760..0c4b39d1f 100644 --- a/source/framework/core/inc/TRestAnalysisPlot.h +++ b/source/framework/core/inc/TRestAnalysisPlot.h @@ -147,13 +147,11 @@ class TRestAnalysisPlot : public TRestMetadata { std::vector fPlotNamesCheck; //! -#ifndef __CINT__ TRestRun* fRun; //! TRestRun to handle output file std::vector fRunInputFileName; //! TRestRun to handle input file TCanvas* fCombinedCanvas; //! Output canvas Long64_t fDrawNEntries; //! Long64_t fDrawFirstEntry; //! -#endif void AddFileFromExternalRun(); void AddFileFromEnv(); diff --git a/source/framework/core/inc/TRestBrowser.h b/source/framework/core/inc/TRestBrowser.h index ba1ad87c2..c4b31f0ac 100644 --- a/source/framework/core/inc/TRestBrowser.h +++ b/source/framework/core/inc/TRestBrowser.h @@ -23,7 +23,6 @@ /// Event browser for different input file class TRestBrowser { protected: -#ifndef __CINT__ TGMainFrame* frmMain = nullptr; //! TGMainFrame* frmBot = nullptr; //! @@ -62,12 +61,10 @@ class TRestBrowser { TBrowser* fBrowser = nullptr; //! TRestRun* fRestRun = nullptr; //! -#endif private: -#ifndef __CINT__ - Bool_t pureAnalysis; - TString fInputFileName; + Bool_t pureAnalysis; //! + TString fInputFileName; //! TRestEventViewer* fEventViewer = nullptr; //! @@ -77,7 +74,6 @@ class TRestBrowser { void SetBottomPanelButtons(); Bool_t LoadEventId(Int_t eventID, Int_t subEventID = -1); Bool_t LoadEventEntry(Int_t n); -#endif public: // tool method diff --git a/source/framework/core/inc/TRestEvent.h b/source/framework/core/inc/TRestEvent.h index 2c3e3dd6d..95359886a 100644 --- a/source/framework/core/inc/TRestEvent.h +++ b/source/framework/core/inc/TRestEvent.h @@ -47,10 +47,8 @@ class TRestEvent : public TObject { Bool_t fOk; ///< Flag to be used by processes to define an event status. fOk=true is the default. TRestRun* fRun = nullptr; //! -#ifndef __CINT__ TPad* fPad; //! -#endif void RestartPad(Int_t nElements);