ROOT
6.06/09
Reference Guide
ROOT Home Page
Main Page
Related Pages
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
montecarlo
vmc
src
TVirtualMCApplication.cxx
Go to the documentation of this file.
1
// @(#)root/vmc:$Id$
2
// Author: Ivana Hrivnacova, 27/03/2002
3
4
/*************************************************************************
5
* Copyright (C) 2006, Rene Brun and Fons Rademakers. *
6
* Copyright (C) 2002, ALICE Experiment at CERN. *
7
* All rights reserved. *
8
* *
9
* For the licensing terms see $ROOTSYS/LICENSE. *
10
* For the list of contributors see $ROOTSYS/README/CREDITS. *
11
*************************************************************************/
12
13
#include "
TVirtualMCApplication.h
"
14
#include "
TError.h
"
15
16
//______________________________________________________________________________
17
//
18
// Interface to a user Monte Carlo application.
19
//______________________________________________________________________________
20
21
ClassImp
(
TVirtualMCApplication
)
22
23
TMCThreadLocal
TVirtualMCApplication
*
TVirtualMCApplication
::fgInstance = 0;
24
25
////////////////////////////////////////////////////////////////////////////////
26
///
27
/// Standard constructor
28
///
29
30
TVirtualMCApplication
::
TVirtualMCApplication
(const
char
*name,
31
const
char
*title)
32
:
TNamed
(name,title)
33
{
34
if
(fgInstance) {
35
Fatal
(
"TVirtualMCApplication"
,
36
"Attempt to create two instances of singleton."
);
37
}
38
39
fgInstance =
this
;
40
}
41
42
////////////////////////////////////////////////////////////////////////////////
43
///
44
/// Default constructor
45
///
46
47
TVirtualMCApplication::TVirtualMCApplication
()
48
:
TNamed
()
49
{
50
fgInstance =
this
;
51
}
52
53
////////////////////////////////////////////////////////////////////////////////
54
///
55
/// Destructor
56
///
57
58
TVirtualMCApplication::~TVirtualMCApplication
()
59
{
60
fgInstance = 0;
61
}
62
63
////////////////////////////////////////////////////////////////////////////////
64
///
65
/// Static access method
66
///
67
68
TVirtualMCApplication
*
TVirtualMCApplication::Instance
()
69
{
70
return
fgInstance
;
71
}
72
Fatal
void Fatal(const char *location, const char *msgfmt,...)
TVirtualMCApplication::fgInstance
static TMCThreadLocal TVirtualMCApplication * fgInstance
Definition:
TVirtualMCApplication.h:114
TVirtualMCApplication.h
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition:
TNamed.h:33
TVirtualMCApplication::~TVirtualMCApplication
virtual ~TVirtualMCApplication()
Destructor.
Definition:
TVirtualMCApplication.cxx:58
TError.h
TVirtualMCApplication
Definition:
TVirtualMCApplication.h:30
TMCThreadLocal
#define TMCThreadLocal
Definition:
TMCtls.h:59
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
TVirtualMCApplication::Instance
static TVirtualMCApplication * Instance()
Static access method.
Definition:
TVirtualMCApplication.cxx:68
TVirtualMCApplication::TVirtualMCApplication
TVirtualMCApplication()
Default constructor.
Definition:
TVirtualMCApplication.cxx:47