Skip to content

Commit

Permalink
Protect include statements
Browse files Browse the repository at this point in the history
Don't include the headers when using the cling interpreter. For some not yet
understood reason the macro compilation crashes when including the headers
with cling,
  • Loading branch information
fuhlig1 committed Jun 26, 2023
1 parent dfd4128 commit 5eeeac8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/compare_seed_value.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairBaseParSet.h"

#include <RtypesCore.h>
Expand All @@ -13,6 +14,7 @@

#include <iostream>
#include <memory>
#endif

int compare_seed_value(TString filename, UInt_t initial_seed) {

Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/create_digis.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairFileSource.h"
#include "FairParAsciiFileIo.h"
#include "FairParRootFileIo.h"
Expand All @@ -23,6 +24,7 @@

#include <iostream>
#include <memory>
#endif

using std::cout;
using std::endl;
Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/create_digis_mixed.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairMixedSource.h"
#include "FairParAsciiFileIo.h"
#include "FairParRootFileIo.h"
Expand All @@ -22,6 +23,7 @@
#include <TSystem.h>
#include <iostream>
#include <memory>
#endif

using std::cout;
using std::endl;
Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/read_digis.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairBaseParSet.h"
#include "FairFileSource.h"
#include "FairParAsciiFileIo.h"
Expand All @@ -22,6 +23,7 @@
#include <TString.h>
#include <iostream>
#include <memory>
#endif

using std::cout;
using std::endl;
Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/run_background.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairBoxGenerator.h"
#include "FairCave.h"
#include "FairDetector.h"
Expand All @@ -25,6 +26,7 @@

#include <iostream>
#include <memory>
#endif

using std::cout;
using std::endl;
Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/run_signal.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairBoxGenerator.h"
#include "FairCave.h"
#include "FairDetector.h"
Expand All @@ -23,6 +24,7 @@
#include <TString.h>
#include <TSystem.h>
#include <memory>
#endif

using std::cout;
using std::endl;
Expand Down
2 changes: 2 additions & 0 deletions examples/simulation/Tutorial2/macros/run_tutorial2.C
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/

#if !defined(__CLING__) || defined(__ROOTCLING__)
#include "FairBoxGenerator.h"
#include "FairCave.h"
#include "FairDetector.h"
Expand All @@ -24,6 +25,7 @@
#include <TString.h>
#include <TSystem.h>
#include <memory>
#endif

void run_tutorial2(Int_t nEvents = 10, TString mcEngine = "TGeant4",
Bool_t isMT = true, UInt_t initial_seed=98989)
Expand Down

0 comments on commit 5eeeac8

Please sign in to comment.