ROOT
Version v6.34
master
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
▼
core
►
base
►
clingutils
►
cont
►
dictgen
►
foundation
►
gui
▼
imt
►
inc
▼
src
base.cxx
►
ROpaqueTaskArena.hxx
RSlotStack.cxx
►
RTaskArena.cxx
TExecutor.cxx
►
TImplicitMT.cxx
►
TTaskGroup.cxx
►
TThreadExecutor.cxx
►
macosx
►
meta
►
metacling
►
multiproc
►
rint
►
testsupport
►
thread
►
unix
►
winnt
►
zip
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
v6-34-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
RSlotStack.cxx
Go to the documentation of this file.
1
// Author: Enrico Guiraud, Danilo Piparo CERN 03/2017
2
3
/*************************************************************************
4
* Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5
* All rights reserved. *
6
* *
7
* For the licensing terms see $ROOTSYS/LICENSE. *
8
* For the list of contributors see $ROOTSYS/README/CREDITS. *
9
*************************************************************************/
10
11
#include <
ROOT/TSeq.hxx
>
12
#include <
ROOT/RSlotStack.hxx
>
13
14
#include <cassert>
15
#include <mutex>
// std::lock_guard
16
17
ROOT::Internal::RSlotStack::RSlotStack
(
unsigned
int
size
) :
fSize
(
size
)
18
{
19
for
(
auto
i :
ROOT::TSeqU
(
size
))
20
fStack
.push(i);
21
}
22
23
void
ROOT::Internal::RSlotStack::ReturnSlot
(
unsigned
int
slot
)
24
{
25
std::lock_guard<ROOT::TSpinMutex> guard(fMutex);
26
assert
(fStack.size() <
fSize
&&
"Trying to put back a slot to a full stack!"
);
27
(void)
fSize
;
28
fStack.push(
slot
);
29
}
30
31
unsigned
int
ROOT::Internal::RSlotStack::GetSlot
()
32
{
33
std::lock_guard<ROOT::TSpinMutex> guard(fMutex);
34
assert
(!fStack.empty() &&
"Trying to pop a slot from an empty stack!"
);
35
const
auto
slot
= fStack.top();
36
fStack.pop();
37
return
slot
;
38
}
fSize
dim_t fSize
Definition
DeclareExecutors.h:184
RSlotStack.hxx
size
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
TSeq.hxx
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Internal::RSlotStack::GetSlot
unsigned int GetSlot()
Definition
RSlotStack.cxx:31
ROOT::Internal::RSlotStack::RSlotStack
RSlotStack()=delete
ROOT::Internal::RSlotStack::fStack
std::stack< unsigned int > fStack
Definition
RSlotStack.hxx:33
ROOT::Internal::RSlotStack::ReturnSlot
void ReturnSlot(unsigned int slotNumber)
Definition
RSlotStack.cxx:23
ROOT::TSeqU
TSeq< unsigned int > TSeqU
Definition
TSeq.hxx:204
core
imt
src
RSlotStack.cxx
ROOT tags/6-34-04 - Reference Guide Generated on Sat Mar 15 2025 14:35:05 (GVA Time) using Doxygen 1.10.0