LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ScheduleContext_service.cc
Go to the documentation of this file.
1
#include "
art/Framework/Services/System/ScheduleContext.h
"
2
3
#include "
art/Framework/Core/detail/ScheduleTask.h
"
4
#include "
canvas/Utilities/Exception.h
"
5
#include "cetlib/ProvideFilePathMacro.h"
6
7
#include "tbb/task.h"
8
9
art::ScheduleID
10
art::ScheduleContext::currentScheduleID
()
const
11
{
12
if
(!
in_context_
.load()) {
13
return
ScheduleID
{};
14
}
// Not in schedule-running context.
15
tbb::task* ct = &tbb::task::self();
16
detail::ScheduleTask
* st{
nullptr
};
17
while
(ct !=
nullptr
&&
18
(st = dynamic_cast<detail::ScheduleTask*>(ct)) ==
nullptr
) {
19
ct = ct->parent();
20
}
21
return
(st ? st->scheduleID() :
ScheduleID
());
22
}
23
24
// ===============================
25
CET_PROVIDE_FILE_PATH()
26
// ===============================
ScheduleTask.h
art::ScheduleContext::currentScheduleID
ScheduleID currentScheduleID() const
Definition:
ScheduleContext_service.cc:10
ScheduleContext.h
art::ScheduleContext::in_context_
std::atomic< flag_type > in_context_
Definition:
ScheduleContext.h:32
art::ScheduleID
Definition:
ScheduleID.h:20
art::detail::ScheduleTask
Definition:
ScheduleTask.h:20
Exception.h
art
Framework
Services
System
ScheduleContext_service.cc
Generated on Wed Dec 12 2018 14:42:34 for LArSoft by
1.8.11