StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Sti
StiDetectorGroup.h
1
#ifndef StiDetectorGroup_H_INCLUDED
2
#define StiDetectorGroup_H_INCLUDED
3
4
#include <stdexcept>
5
6
#include "Sti/StiGenericDetectorGroup.h"
7
#include "Sti/Base/Factory.h"
8
#include "
Sti/StiToolkit.h
"
9
template
<
class
Event,
class
Detector>
class
StiHitLoader
;
10
11
template
<
class
Event>
12
class
StiDetectorGroup
:
public
StiGenericDetectorGroup
13
{
14
public
:
15
17
virtual
StiHitLoader<Event,StiDetectorBuilder>
*
getHitLoader
();
18
StiHitLoader<Event,StiDetectorBuilder>
*hitLoader() {
return
_hitLoader;}
19
20
protected
:
21
22
StiDetectorGroup
(
const
string
& name);
23
StiDetectorGroup
(
const
string
& name,
24
StiHitLoader<Event,StiDetectorBuilder>
* hitLoader,
25
StiDetectorBuilder
* detectorBuilder);
26
~
StiDetectorGroup
();
27
StiHitLoader<Event,StiDetectorBuilder>
* _hitLoader;
28
};
29
30
31
template
<
class
Event>
32
StiDetectorGroup<Event>::StiDetectorGroup
(
const
string
& name,
33
StiHitLoader<Event,StiDetectorBuilder>
* hitLoader,
34
StiDetectorBuilder
* detectorBuilder)
35
:
StiGenericDetectorGroup
(name,detectorBuilder),
36
_hitLoader(hitLoader)
37
{
38
// If a loader was specified, make sure it uses the selected detector builder.
39
if
(_hitLoader)
40
{
41
_hitLoader->setDetector(detectorBuilder);
42
}
43
initialize();
44
}
45
46
template
<
class
Event>
47
StiDetectorGroup<Event>::StiDetectorGroup
(
const
string
& name)
48
:
StiGenericDetectorGroup
(name),
49
_hitLoader(0)
50
{
51
initialize();
52
}
53
54
template
<
class
Event>
55
StiDetectorGroup<Event>::~StiDetectorGroup
()
56
{
57
delete
_hitLoader;
58
}
59
61
template
<
class
Event>
62
StiHitLoader<Event,StiDetectorBuilder>
*
StiDetectorGroup<Event>::getHitLoader
()
63
{
64
if
(_detectorBuilder==0)
65
{
66
string
message =
"StiDetectorGroup::getHitLoader() - ERROR - Hit loader requested for non active detector:"
;
67
message += getName();
68
// throw logic_error(message.c_str());
69
}
70
/* if (_hitLoader==0)
71
{
72
string message = "StiDetectorGroup::getHitLoader() - ERROR - Hit loader == 0 for detector:";
73
message += getName();
74
throw logic_error(message.c_str());
75
}*/
76
return
_hitLoader;
77
}
78
#endif
79
StiHitLoader
Definition:
StiDetectorGroup.h:9
StiGenericDetectorGroup
Definition:
StiGenericDetectorGroup.h:11
StiToolkit.h
Abstract interface for a STI toolkit.
StiDetectorBuilder
Definition:
StiDetectorBuilder.h:42
StiDetectorGroup
Definition:
StiDetectorGroup.h:12
StiDetectorGroup::getHitLoader
virtual StiHitLoader< Event, StiDetectorBuilder > * getHitLoader()
Get a hit loader appropriate for this detector group.
Definition:
StiDetectorGroup.h:62
Generated by
1.8.5