CMS 3D CMS Logo

Macros | Functions
TestHelper.h File Reference

Go to the source code of this file.

Macros

#define RUNTEST()
 

Functions

int ptomaine (int argc, char *argv[], char **env)
 

Macro Definition Documentation

◆ RUNTEST

#define RUNTEST ( )
Value:
extern "C" char** environ; \
int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }

Definition at line 29 of file TestHelper.h.

Function Documentation

◆ ptomaine()

int ptomaine ( int  argc,
char *  argv[],
char **  env 
)

Definition at line 179 of file TestHelper.cc.

179  {
180  int rc = 1;
181  // Standalone executable, prints exception message
182  CMS_SA_ALLOW try { rc = do_work(argc, argv, env); } catch (edm::Exception& x) {
183  std::cerr << "Caught an edm::Exception in " << argv[0] << '\n' << x;
184  } catch (cms::Exception& x) {
185  std::cerr << "Caught a cms::Exception in " << argv[0] << '\n' << x;
186  } catch (std::exception& x) {
187  std::cerr << "Caught a std::exception in " << argv[0] << '\n' << x.what();
188  } catch (...) {
189  std::cerr << "Caught an unknown exception in " << argv[0];
190  }
191  return rc;
192 }

References dir2webdir::argc, cmsBatch::argv, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, CMS_SA_ALLOW, do_work(), web.browse_db::env, cppFunctionSkipper::exception, and genVertex_cff::x.

cmsBatch.argv
argv
Definition: cmsBatch.py:279
dir2webdir.argc
argc
Definition: dir2webdir.py:39
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::Exception
Definition: EDMException.h:77
ptomaine
int ptomaine(int argc, char *argv[], char **env)
Definition: TestHelper.cc:179
web.browse_db.env
env
Definition: browse_db.py:18
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
genVertex_cff.x
x
Definition: genVertex_cff.py:12
cms::Exception
Definition: Exception.h:70
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
do_work
int do_work(int argc, char *argv[], char **env)
Definition: TestHelper.cc:56
magneticFieldFilterJSON.main
def main(argv=None)
Definition: magneticFieldFilterJSON.py:22