Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Javier Galan
rest-framework
Commits
a97df517
Commit
a97df517
authored
Nov 21, 2020
by
nkx Nicholas
Browse files
Merge branch 'development' of
https://lfna.unizar.es/rest-development/REST_v2
into development
parents
895ca346
c1cab4d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
source/metadata/readout/inc/TRestReadoutChannel.h
View file @
a97df517
...
...
@@ -44,18 +44,23 @@ enum TRestReadoutChannelType {
/// It allows to integrate any number of independent readout pixels.
class
TRestReadoutChannel
:
public
TObject
{
private:
Int_t
fDaqID
;
///< Defines the corresponding daq channel id. See decoding
///< details at TRestReadout.
Int_t
fDaqID
;
///< Defines the corresponding daq channel id. See decoding
///< details at TRestReadout.
std
::
vector
<
TRestReadoutPixel
>
fReadoutPixel
;
///< A vector storing the different TRestReadoutPixel
///< definitions.
Short_t
fChannelId
=
-
1
;
///< It stores the corresponding physical readout channel
void
Initialize
();
protected:
public:
/// Returns the corresponding daq channel id
Int_t
GetDaqID
()
{
return
fDaqID
;
}
/// Returns the corresponding channel id
Int_t
GetChannelId
()
{
return
fChannelId
;
}
/// Returns the total number of pixels inside the readout channel
Int_t
GetNumberOfPixels
()
{
return
fReadoutPixel
.
size
();
}
...
...
@@ -79,18 +84,21 @@ class TRestReadoutChannel : public TObject {
/// Sets the daq channel number id
void
SetDaqID
(
Int_t
id
)
{
fDaqID
=
id
;
}
/// Sets the readout channel number id
void
SetChannelID
(
Int_t
id
)
{
fChannelId
=
id
;
}
/// Adds a new pixel to the readout channel
void
AddPixel
(
TRestReadoutPixel
pix
)
{
fReadoutPixel
.
push_back
(
pix
);
}
Int_t
isInside
(
Double_t
x
,
Double_t
y
);
void
Print
(
int
DetailLevel
=
0
,
int
index
=
-
1
);
void
Print
(
int
DetailLevel
=
0
);
// Construtor
TRestReadoutChannel
();
// Destructor
virtual
~
TRestReadoutChannel
();
ClassDef
(
TRestReadoutChannel
,
2
);
// REST run class
ClassDef
(
TRestReadoutChannel
,
3
);
// REST run class
};
#endif
source/metadata/readout/src/TRestReadout.cxx
View file @
a97df517
...
...
@@ -563,6 +563,7 @@ void TRestReadout::InitFromConfigFile() {
// WRONG version before -->
// fModuleDefinitions[mid].GetChannel(ch)->SetID( rChannel[ch] );
fModuleDefinitions
[
mid
].
GetChannel
(
rChannel
[
ch
])
->
SetDaqID
(
dChannel
[
ch
]);
fModuleDefinitions
[
mid
].
GetChannel
(
rChannel
[
ch
])
->
SetChannelID
(
rChannel
[
ch
]);
#pragma endregion
addedChannels
++
;
...
...
source/metadata/readout/src/TRestReadoutChannel.cxx
View file @
a97df517
...
...
@@ -74,9 +74,9 @@ Int_t TRestReadoutChannel::isInside(Double_t x, Double_t y) {
/// \brief Prints the details of the readout channel including pixel
/// coordinates.
///
void
TRestReadoutChannel
::
Print
(
int
DetailLevel
,
int
index
)
{
void
TRestReadoutChannel
::
Print
(
int
DetailLevel
)
{
if
(
DetailLevel
>=
0
)
{
metadata
<<
"++++ Channel : "
<<
index
<<
" Daq channel : "
<<
GetDaqID
()
<<
endl
;
metadata
<<
"++++ Channel : "
<<
GetChannelId
()
<<
" Daq channel : "
<<
GetDaqID
()
<<
endl
;
string
typestr
;
if
(
GetType
()
==
Channel_NoType
)
...
...
source/metadata/readout/src/TRestReadoutModule.cxx
View file @
a97df517
...
...
@@ -550,6 +550,6 @@ void TRestReadoutModule::Print(Int_t DetailLevel) {
metadata
<<
"-- Total channels : "
<<
GetNumberOfChannels
()
<<
endl
;
metadata
<<
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
<<
endl
;
for
(
int
n
=
0
;
n
<
GetNumberOfChannels
();
n
++
)
fReadoutChannel
[
n
].
Print
(
DetailLevel
-
1
,
n
);
for
(
int
n
=
0
;
n
<
GetNumberOfChannels
();
n
++
)
fReadoutChannel
[
n
].
Print
(
DetailLevel
-
1
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment