13.07.2015 Views

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Classes<strong>Examples</strong> from CLHEPB&N: “Scientific and engineering problems arerarely posed directly in terms of <strong>the</strong> computer’sintrinsic types: bits, bytes, integers and floatingpoint numbers”Shocking statement?In a detector’s tracking code, for example, <strong>the</strong>problem is posed in terms of…• tracks• points• list of points• chamber• cylinders• layers<strong>C++</strong> with its mechanism of classes allows definingnew types and <strong>the</strong> operations on <strong>the</strong>se typesWhen we do object-oriented programming with <strong>C++</strong>we will be writing and using classesClass Library for High Energy PhysicsWhy?• Provide some classes are specific to HEP• Encourage code sharing between experiments andbetween experimentalists and <strong>the</strong>orists.• Reduce redundant workWho?• Leif Lönnblad, NBI (via CERN, DESY and Lund)• Paul Rensing, CERN (via SLAC)• Anders Nilsson (Lund), Dag Brück (LIT), and o<strong>the</strong>rsUse• examples of use at/usr/local/doc/programming/<strong>C++</strong>class/SciEng/examples/clhep• header files: /usr/local/lib/include/CLHEP• library file for gcc: /usr/local/lib/libCLHEP.a<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 66 Paul F. Kunz<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 67 Paul F. Kunz

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!