19 const std::filesystem::path &path ) {
20 return (std::filesystem::path(
"/")
21 += proc->
name()) += path;
26 template<
typename HistT>
29 const std::filesystem::path &path,
30 const std::string_view &name) {
33 storeManager.
getKey(path, name));
40 const std::filesystem::path &path,
41 const std::string_view &name,
42 const std::string_view &title,
57 const std::filesystem::path &path,
58 const std::string_view &name ) {
59 return getObject<Hist1F>(
68 const std::filesystem::path &path,
69 const std::string_view &name,
70 const std::string_view &title,
78 {&axisconfigX, &axisconfigY},
86 const std::filesystem::path &path,
87 const std::string_view &name ) {
88 return getObject<Hist2F>(
97 const std::filesystem::path &path,
98 const std::string_view &name,
99 const std::string_view &title,
108 {&axisconfigX, &axisconfigY, &axisconfigZ},
116 const std::filesystem::path &path,
117 const std::string_view &name ) {
118 return getObject<Hist3F>(
127 const std::filesystem::path &path,
128 const std::string_view &name,
129 const std::string_view &title,
144 const std::filesystem::path &path,
145 const std::string_view &name ) {
146 return getObject<Hist1D>(
155 const std::filesystem::path &path,
156 const std::string_view &name,
157 const std::string_view &title,
165 {&axisconfigX, &axisconfigY},
173 const std::filesystem::path &path,
174 const std::string_view &name ) {
175 return getObject<Hist2D>(
184 const std::filesystem::path &path,
185 const std::string_view &name,
186 const std::string_view &title,
195 {&axisconfigX, &axisconfigY, &axisconfigZ},
203 const std::filesystem::path &path,
204 const std::string_view &name ) {
205 return getObject<Hist3D>(
214 const std::filesystem::path &path,
215 const std::string_view &name,
216 const std::string_view &title,
231 const std::filesystem::path &path,
232 const std::string_view &name ) {
233 return getObject<Hist1I>(
242 const std::filesystem::path &path,
243 const std::string_view &name,
244 const std::string_view &title,
252 {&axisconfigX, &axisconfigY},
260 const std::filesystem::path &path,
261 const std::string_view &name ) {
262 return getObject<Hist2I>(
271 const std::filesystem::path &path,
272 const std::string_view &name,
273 const std::string_view &title,
282 {&axisconfigX, &axisconfigY, &axisconfigZ},
290 const std::filesystem::path &path,
291 const std::string_view &name ) {
292 return getObject<Hist3I>(
325 if(
nullptr == randomSeeds ) {
328 return randomSeeds->randomSeed( proc ) ;
335 if(
nullptr == procConds ) {
338 return procConds->set( proc, value ) ;
345 if(
nullptr == procConds ) {
348 return procConds->set( proc, name, value ) ;
360 proc->
log<WARNING>() <<
"Skipping current event !" << std::endl ;
367 proc->
log<WARNING>() <<
"Stopping application: " << reason << std::endl ;
static bool isFirstEvent(EventStore *event)
Whether the event is the first event to be processed.
Data selection to identify and manage an Entry.
static H3DEntry getHist3D(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 3D, double type.
static H1IEntry getHist1I(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 1D, integer type.
const std::string & name() const
Get the component name.
ProcessorConditionsExtension class Event extension providing access to processor runtime conditions (...
book::Handle< book::Entry< HistT > > bookHist(const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const std::array< const AxisConfig< typename HistT::Precision_t > *, HistT::Dimension > &axesconfig, const BookFlag_t &flags)
Book a histogram 1D, float type.
static H1DEntry getHist1D(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 1D, double type.
static H3FEntry bookHist3F(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const AxisConfigD &axisconfigZ, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 3D, float type.
constexpr unsigned long long value(const Flag_t &flag)
static H1IEntry bookHist1I(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfig, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 1D, integer type.
BookStoreManager & bookStoreManager()
Get book store manager.
std::filesystem::path constructPath(const Processor *proc, const std::filesystem::path &path)
construct absolute path from relative path and processor.
static H1FEntry bookHist1F(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfig, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 1D, float type.
RandomSeedExtension class Event extension providing access to random seeds.
static H2DEntry bookHist2D(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 2D, double type.
const RandomSeedManager & randomSeedManager() const
Get the random seed manager.
Flag type for flags in marlinmt::book.
static H2IEntry getHist2I(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 2D, integer type.
Generalized histogram class.
static H2FEntry bookHist2F(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 2D, float type.
#define MARLINMT_THROW(message)
book::Handle< book::Entry< T > > getObject(const book::EntryKey &key) const
access object managed by this store.
static H3IEntry bookHist3I(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const AxisConfigD &axisconfigZ, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 3D, integer type.
static unsigned int getRandomSeed(const Processor *const proc, EventStore *event)
Get a random seed from the event.
void removeFromWrite(const book::EntryKey &key)
remove entry key from write list.
static void write(Processor *proc, const std::filesystem::path &path, const std::string_view &name)
register Object to write it at end of lifetime.
static void abort(const Processor *const proc, const std::string &reason)
Abort program execution properly.
collection for Axis Description
static H1DEntry bookHist1D(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfig, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 1D, double type.
#define MARLINMT_SKIP_EVENT(proc)
Logging::StreamType log() const
Log a message with specific log level.
const Application & application() const
Get the application in which the component is registered.
void addEntry(HashResult entry)
Add an entry to the random seed manager.
static H2IEntry bookHist2I(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 2D, integer type.
static H3IEntry getHist3I(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 3D, integer type.
const book::EntryKey & getKey(const std::filesystem::path &path, const std::string_view &name) const
receive key from Entry with given path and name.
static H2FEntry getHist2F(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 2D, float type.
book::Handle< book::Entry< HistT > > getObject(const BookStoreManager &storeManager, const std::filesystem::path &path, const std::string_view &name)
static H3DEntry bookHist3D(Processor *proc, const std::filesystem::path &path, const std::string_view &name, const std::string_view &title, const AxisConfigD &axisconfigX, const AxisConfigD &axisconfigY, const AxisConfigD &axisconfigZ, const BookFlag_t &flags=BookFlags::Default)
Book a histogram 3D, double type.
void addToWrite(const book::EntryKey &key)
add entry key to write list.
static void skipCurrentEvent(const Processor *const proc)
Notify the application to skip the current event processing and go directly to the next event by skip...
static H2DEntry getHist2D(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 2D, double type.
static H1FEntry getHist1F(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 1D, float type.
static void dontWrite(Processor *proc, const std::filesystem::path &path, const std::string_view &name)
cancels writing of Object at end of lifetime.
static void setReturnValue(const Processor *const proc, EventStore *event, bool value)
Set the processor return value.
static H3FEntry getHist3F(const Processor *proc, const std::filesystem::path &path, const std::string_view &name)
Get handle for booked histogram 3D, float type.
static void registerForRandomSeeds(Processor *const proc)
Register the processor to get random seeds.
#define MARLINMT_STOP_PROCESSING(proc)