Skip to content
Snippets Groups Projects
Commit 00b90452 authored by Markus Frank's avatar Markus Frank
Browse files

Add code documentation

parent 2f71d4ec
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,11 @@ ...@@ -12,8 +12,11 @@
// //
//========================================================================== //==========================================================================
// C/C++ include files
#include <string> #include <string>
#include <cerrno> #include <cerrno>
// ROOT include files
#include "TError.h" #include "TError.h"
#include "TSystem.h" #include "TSystem.h"
......
...@@ -25,7 +25,11 @@ namespace DD4hep { namespace Simulation { ...@@ -25,7 +25,11 @@ namespace DD4hep { namespace Simulation {
typedef Geant4HitData SimpleHit; typedef Geant4HitData SimpleHit;
}} }}
#else #else
// C/C++ include files
#include <typeinfo> #include <typeinfo>
// ROOT include files
#include "TROOT.h" #include "TROOT.h"
#include "TClass.h" #include "TClass.h"
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
// //
//==================================================================== //====================================================================
#include "DD4hep/LCDD.h" #include "DD4hep/LCDD.h"
// ROOT include files
#include "TGeoManager.h" #include "TGeoManager.h"
#include "TEveGeoNode.h" #include "TEveGeoNode.h"
#include "TGLViewer.h" #include "TGLViewer.h"
......
// $Id: $
//==========================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author : M.Frank
//
//==========================================================================
// ROOT include files
#include "TInterpreter.h" #include "TInterpreter.h"
#include "TSystem.h" #include "TSystem.h"
#include "RVersion.h" #include "RVersion.h"
// C/C++ include files
#include <iostream> #include <iostream>
#include <string> #include <string>
...@@ -14,6 +31,7 @@ string make_str(const char* data) { ...@@ -14,6 +31,7 @@ string make_str(const char* data) {
return string(data); return string(data);
} }
/// Process a single command in the ROOT interpreter
int processCommand(const char* command, bool end_process) { int processCommand(const char* command, bool end_process) {
int status; int status;
// Disabling auto-parse is a hack required by a bug in ROOT // Disabling auto-parse is a hack required by a bug in ROOT
...@@ -27,6 +45,7 @@ int processCommand(const char* command, bool end_process) { ...@@ -27,6 +45,7 @@ int processCommand(const char* command, bool end_process) {
return status; return status;
} }
/// Process a ROOT AClick given a file
int processMacro(const char* macro, bool end_process) { int processMacro(const char* macro, bool end_process) {
int status; int status;
string cmd = ".X "; string cmd = ".X ";
...@@ -35,6 +54,7 @@ int processMacro(const char* macro, bool end_process) { ...@@ -35,6 +54,7 @@ int processMacro(const char* macro, bool end_process) {
return processCommand(cmd.c_str(), end_process); return processCommand(cmd.c_str(), end_process);
} }
/// Initialize the ROOT environment to compile and execute a ROOT AClick
int initAClick(const char* command=0) { int initAClick(const char* command=0) {
string rootsys = make_str(gSystem->Getenv("ROOTSYS")); string rootsys = make_str(gSystem->Getenv("ROOTSYS"));
string g4_base = make_str(gSystem->Getenv("G4INSTALL")); string g4_base = make_str(gSystem->Getenv("G4INSTALL"));
......
// $Id: $
//==========================================================================
// AIDA Detector description implementation for LCD
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author : M.Frank
//
//==========================================================================
// ROOT include files
#include "TInterpreter.h" #include "TInterpreter.h"
// C/C++ include files
#include <string> #include <string>
// Run a ROOT macro
void run(const char* macro) { void run(const char* macro) {
char cmd[1024]; char cmd[1024];
const char* dd4hep_install = getenv("DD4hepINSTALL"); const char* dd4hep_install = getenv("DD4hepINSTALL");
......
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