BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmStsModule.cxx
Go to the documentation of this file.
1
/** @file CbmStsModule.cxx
2
** @author Volker Friese <v.friese@gsi.de>
3
** @date 14.05.2013
4
**/
5
6
#include "
setup/CbmStsModule.h
"
7
8
#include "FairLogger.h"
9
#include "
setup/CbmStsAddress.h
"
10
#include "
setup/CbmStsSensorType.h
"
11
12
// ----- Default constructor -------------------------------------------
13
CbmStsModule::CbmStsModule
()
14
:
CbmStsElement
()
15
,
fSensors
()
16
,
fBuffer
()
17
{}
18
// -------------------------------------------------------------------------
19
20
// ----- Standard constructor ------------------------------------------
21
CbmStsModule::CbmStsModule
(
const
char
* name,
const
char
* title,
TGeoPhysicalNode
* node)
22
:
CbmStsElement
(name, title,
kStsModule
, node)
23
,
fSensors
()
24
,
fBuffer
()
25
{}
26
// -------------------------------------------------------------------------
27
28
// --- Destructor --------------------------------------------------------
29
CbmStsModule::~CbmStsModule
() {}
30
// -------------------------------------------------------------------------
31
32
// ----- Add a sensor -----------------------------------------------------
33
void
CbmStsModule::AddSensor
(
CbmStsSenzor
* sensor)
34
{
35
36
// TODO: Unify adding elements from base class and adding sensors
37
// If AddDaughter is used, compatibility of sensor types is not assured.
38
// Still unclear how sensor types are assigned when setup is read from
39
// geometry.
40
41
// Check compatibility with already present sensors
42
if
(!
fSensors
.empty()) {
43
if
(sensor->
GetType
() !=
fSensors
[0]->GetType()) {
44
LOG(error) <<
"Sensor type "
<< sensor->
GetType
()->
GetTypeId
() <<
" incompatible with sensor type "
45
<<
fSensors
[0]->GetType()->GetTypeId();
46
return
;
47
}
48
}
49
50
// Add sensor to the array
51
fSensors
.push_back(sensor);
52
53
// Set sensor address and pointer to module
54
Int_t
sensorId =
fDaughters
.size() - 1;
55
UInt_t address =
CbmStsAddress::SetElementId
(
fAddress
,
kStsSensor
, sensorId);
56
sensor->
SetAddress
(address);
57
sensor->
SetModule
(
this
);
58
59
return
;
60
}
61
// -------------------------------------------------------------------------
62
63
// ----- Add a signal to the buffer ------------------------------------
64
void
CbmStsModule::AddSignal
(
Int_t
channel,
Double_t
time,
Double_t
charge)
65
{
66
67
// TODO: implementation
68
}
69
// -------------------------------------------------------------------------
CbmStsAddress.h
kStsModule
@ kStsModule
Module.
Definition
CbmStsAddress.h:25
kStsSensor
@ kStsSensor
Sensor.
Definition
CbmStsAddress.h:26
CbmStsModule.h
CbmStsSensorType.h
Int_t
int Int_t
Double_t
double Double_t
CbmStsAddress::SetElementId
static UInt_t SetElementId(UInt_t address, Int_t level, Int_t newId)
Set the index of an element leaving the other element levels untouched.
Definition
CbmStsAddress.h:116
CbmStsElement::fAddress
UInt_t fAddress
Unique address.
Definition
CbmStsElement.h:85
CbmStsElement::fDaughters
vector< CbmStsElement * > fDaughters
Array of daughters.
Definition
CbmStsElement.h:88
CbmStsElement::CbmStsElement
CbmStsElement()
Default constructor.
Definition
CbmStsElement.cxx:13
CbmStsModule::AddSignal
void AddSignal(Int_t channel, Double_t time, Double_t charge)
Add an analogue signal to the buffer.
Definition
CbmStsModule.cxx:64
CbmStsModule::AddSensor
void AddSensor(CbmStsSenzor *sensor)
Add a sensor to the module.
Definition
CbmStsModule.cxx:33
CbmStsModule::fSensors
vector< CbmStsSenzor * > fSensors
Array of sensors.
Definition
CbmStsModule.h:74
CbmStsModule::CbmStsModule
CbmStsModule()
Default constructor.
Definition
CbmStsModule.cxx:13
CbmStsModule::~CbmStsModule
virtual ~CbmStsModule()
Destructor.
Definition
CbmStsModule.cxx:29
CbmStsModule::fBuffer
map< Int_t, pair< Double_t, Double_t > > fBuffer
Buffer for the analogue signals.
Definition
CbmStsModule.h:78
CbmStsSensorType::GetTypeId
Int_t GetTypeId() const
Type identifier.
Definition
CbmStsSensorType.h:38
CbmStsSenzor
Class representing an instance of a sensor in the CBM-STS.
Definition
CbmStsSenzor.h:28
CbmStsSenzor::SetModule
void SetModule(CbmStsModule *module)
Set a pointer to the mother module.
Definition
CbmStsSenzor.h:64
CbmStsSenzor::GetType
CbmStsSensorType * GetType() const
Pointer to sensor type.
Definition
CbmStsSenzor.h:47
CbmStsSenzor::SetAddress
void SetAddress(UInt_t address)
Set the sensor address.
Definition
CbmStsSenzor.h:59
TGeoPhysicalNode
detectors
sts
setup
CbmStsModule.cxx
Generated on
for BmnRoot by
1.17.0