![](https://csdnimg.cn/release/download_crawler_static/9486073/bg10.jpg)
your collaborators to solve your domain specific problems.
Programming outside of a framework may be compared to living in the country. In order to have transportation and
water, you will have to build a road and dig a well. To have services like telephone and electricity you will need to
route the wires to your home. In addition, you cannot build some things yourself. For example, you cannot build a
commercial airport on your patch of land. From a global perspective, it would make no sense for everyone to build
their own airport. You see you will be very busy building the infrastructure (or framework) before you can use the
phone to communicate with your collaborators and have a drink of water at the same time. In software engineering,
it is much the same way. In a framework, the basic utilities and services, such as I/O and graphics, are provided. In
addition, ROOT being a HEP analysis framework, it provides a large selection of HEP specific utilities such as
histograms and fitting. The drawback of a framework is that you are constrained to it, as you are constraint to use
the routing algorithm provided by your telephone service. You also have to learn the framework interfaces, which in
this analogy is the same as learning how to use a telephone.
If you are interested in doing physics, a good HEP framework will save you much work. Next is a list of the more
commonly used components of ROOT: Command Line Interpreter, Histograms and Fitting, Writing a Graphical User
Interface, 2D Graphics, Input/Output , Collection Classes, Script Processor.
There are also less commonly used components, as: 3D Graphics, Parallel Processing (PROOF), Run Time Type
Identification (RTTI), Socket and Network Communication, Threads.
The benefits of frameworks can be summarized as follows:
Less code to write - the programmer should be able to use and reuse the majority of the existing code. Basic
functionality, such as fitting and histogramming are implemented and ready to use and customize.
More reliable and robust code - the code inherited from a framework has already been tested and integrated
with the rest of the framework.
More consistent and modular code - the code reuse provides consistency and common capabilities between
programs, no matter who writes them. Frameworks make it easier to break programs into smaller pieces.
More focus on areas of expertise - users can concentrate on their particular problem domain. They do not have
to be experts at writing user interfaces, graphics, or networking to use the frameworks that provide those
services.
Object-Oriented Programming offers considerable benefits compared to Procedure-Oriented Programming:
Encapsulation enforces data abstraction and increases opportunity for reuse.
Sub classing and inheritance make it possible to extend and modify objects.
Class hierarchies and containment containment hierarchies provide a flexible mechanism for modeling real-world
objects and the relationships among them.
Complexity is reduced because there is little growth of the global state, the state is contained within each object,
rather than scattered through the program in the form of global variables.
Objects may come and go, but the basic structure of the program remains relatively static, increases opportunity
for reuse of design.
To install ROOT you will need to go to the ROOT website at: http://root.cern.ch/root/Availability.html. You have a
choice to download the binaries or the source. The source is quicker to transfer since it is only ~22 MB, but you will
need to compile and link it. The binaries compiled with no degug information range from ~35 MB to ~45 MB
depending on the target platform.
The installation and building of ROOT is described in Appendix A: Install and Build ROOT. You can download the
binaries, or the source. The GNU g++ compiler on most UNIX platforms can compile ROOT.
Before downloading a binary version make sure your machine contains the right run-time environment. In most cases it
is not possible to run a version compiled with, e.g., gcc4.0 on a platform where only gcc 3.2 is installed. In such
cases you’ll have to install ROOT from source.
ROOT is currently running on the following platforms: supported platforms
GNU/Linux x86-32 (IA32) and x86-64 (AMD64)(GCC,Intel/icc, Portland/PGCC,KAI/KCC)
Intel Itanium (IA64) GNU/Linux (GCC, Intel/ecc, SGI/CC)
FreeBSD and OpenBSD (GCC)
GNU/Hurd (GCC)
1.4.1.1 Advantages of Frameworks
1.4.2 Why Object-Oriented?
1.5 Installing ROOT