Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:13

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // ROOT include files
0015 #include "TInterpreter.h"
0016 
0017 // C/C++ include files
0018 #include <string>
0019 
0020 
0021 // Run a ROOT macro
0022 void run(const char* macro)  {
0023   int status;
0024   char cmd[1024];
0025   const char* dd4hep_install = getenv("DD4hepINSTALL");
0026   if ( dd4hep_install )  {
0027     ::sprintf(cmd,".L %s/examples/DDG4/examples/initAClick.C+",dd4hep_install);
0028   }
0029   else  {
0030     ::sprintf(cmd,".L examples/DDG4/examples/initAClick.C+");
0031   }
0032   status = gInterpreter->ProcessLine(cmd); 
0033   ::printf("Status(%s) = %d\n",cmd,status);
0034   status = gInterpreter->ProcessLine("initAClick()");
0035   ::printf("Status(%s) = %d\n",cmd,status);
0036   ::sprintf(cmd,"processMacro(\"%s\",true)",macro);
0037   status = gInterpreter->ProcessLine(cmd);
0038   ::printf("Status(%s) = %d\n",cmd,status);
0039 }