#include <ActsExCellWriterSvc.h>
|
| std::shared_ptr< RootExCellWriter< Acts::TrackParameters > > | m_rootEccWriter |
| std::deque< queue_item_t > | m_queue |
| std::mutex | m_chargedMutex |
| std::thread | m_writeThread |
| std::atomic< bool > | m_doEnd |
| Gaudi::Property< std::string > | m_filePath {this, "FilePath", "excells_charged.root", "Output root file for charged particle"} |
| Gaudi::Property< std::string > | m_treeName {this, "TreeName", "extrapolation_charged", ""} |
| Gaudi::Property< bool > | m_writeBoundary {this, "WriteBoundary", true, ""} |
| Gaudi::Property< bool > | m_writeMaterial {this, "WriteMaterial", true, ""} |
| Gaudi::Property< bool > | m_writeSensitive {this, "WriteSensitive", true, ""} |
| Gaudi::Property< bool > | m_writePassive {this, "WritePassive", true, ""} |
Definition at line 34 of file ActsExCellWriterSvc.h.
◆ ExCellCharged
◆ queue_item_t
◆ ActsExCellWriterSvc()
| ActsExCellWriterSvc::ActsExCellWriterSvc |
( |
const std::string & | name, |
|
|
ISvcLocator * | svc ) |
◆ doWrite()
| void ActsExCellWriterSvc::doWrite |
( |
| ) |
|
|
private |
Definition at line 65 of file ActsExCellWriterSvc.cxx.
66{
67 using namespace std::chrono_literals;
68
70 std::this_thread::sleep_for(2s);
72 }
73
74 while(true) {
76
78 lock.unlock();
80 std::this_thread::sleep_for(0.5s);
81 continue;
82 } else {
83 ATH_MSG_INFO(
"Writer thread caught termination signal. Shutting down.");
85 return;
86 }
87 }
88
91
92 lock.unlock();
93
94 size_t eventNum = queue_item.first;
96
98 }
99
100
101
102
103
104
105
106
107
108
109
111
112
113
114
115
116
118
119
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138}
std::deque< queue_item_t > m_queue
std::mutex m_chargedMutex
Acts::ExtrapolationCell< Acts::TrackParameters > ExCellCharged
std::shared_ptr< RootExCellWriter< Acts::TrackParameters > > m_rootEccWriter
std::atomic< bool > m_doEnd
std::pair< size_t, ExCellCharged > queue_item_t
◆ finalize()
| StatusCode ActsExCellWriterSvc::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| StatusCode ActsExCellWriterSvc::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 20 of file ActsExCellWriterSvc.cxx.
21{
22 RootExCellWriter<Acts::TrackParameters>::Config reccWriterConfig;
30 = std::make_shared<RootExCellWriter<Acts::TrackParameters>>(
31 reccWriterConfig);
32
36
37 return StatusCode::SUCCESS;
38}
Gaudi::Property< bool > m_writeMaterial
Gaudi::Property< bool > m_writeBoundary
Gaudi::Property< std::string > m_treeName
Gaudi::Property< bool > m_writeSensitive
Gaudi::Property< bool > m_writePassive
Gaudi::Property< std::string > m_filePath
◆ store()
Definition at line 52 of file ActsExCellWriterSvc.cxx.
53{
54
55 const auto& ctx = Gaudi::Hive::currentContext();
56
58
59 for(
size_t i=0;
i<ecells.size();++
i) {
60 m_queue.emplace_back(ctx.eventID().event_number(), std::move(ecells[i]));
61 }
62}
◆ m_chargedMutex
| std::mutex ActsExCellWriterSvc::m_chargedMutex |
|
private |
◆ m_doEnd
| std::atomic<bool> ActsExCellWriterSvc::m_doEnd |
|
private |
◆ m_filePath
| Gaudi::Property<std::string> ActsExCellWriterSvc::m_filePath {this, "FilePath", "excells_charged.root", "Output root file for charged particle"} |
|
private |
Definition at line 59 of file ActsExCellWriterSvc.h.
59{this, "FilePath", "excells_charged.root", "Output root file for charged particle"};
◆ m_queue
◆ m_rootEccWriter
| std::shared_ptr<RootExCellWriter<Acts::TrackParameters> > ActsExCellWriterSvc::m_rootEccWriter |
|
private |
◆ m_treeName
| Gaudi::Property<std::string> ActsExCellWriterSvc::m_treeName {this, "TreeName", "extrapolation_charged", ""} |
|
private |
◆ m_writeBoundary
| Gaudi::Property<bool> ActsExCellWriterSvc::m_writeBoundary {this, "WriteBoundary", true, ""} |
|
private |
◆ m_writeMaterial
| Gaudi::Property<bool> ActsExCellWriterSvc::m_writeMaterial {this, "WriteMaterial", true, ""} |
|
private |
◆ m_writePassive
| Gaudi::Property<bool> ActsExCellWriterSvc::m_writePassive {this, "WritePassive", true, ""} |
|
private |
◆ m_writeSensitive
| Gaudi::Property<bool> ActsExCellWriterSvc::m_writeSensitive {this, "WriteSensitive", true, ""} |
|
private |
◆ m_writeThread
| std::thread ActsExCellWriterSvc::m_writeThread |
|
private |
The documentation for this class was generated from the following files: