LDMX Software
Classes | Namespaces | Macros | Typedefs
EventProcessor.h File Reference

Base classes for all user event processing components to extend. More...

#include "Framework/Conditions.h"
#include "Framework/Configure/Parameters.h"
#include "Framework/Event.h"
#include "Framework/Exception/Exception.h"
#include "Framework/Histograms.h"
#include "Framework/Logger.h"
#include "Framework/NtupleManager.h"
#include "Framework/RunHeader.h"
#include "Framework/StorageControl.h"
#include <any>
#include <map>

Go to the source code of this file.

Classes

class  framework::AbortEventException
 Specific exception used to abort an event. More...
 
class  framework::EventProcessor
 Base class for all event processing components. More...
 
class  framework::Producer
 Base class for a module which produces a data product. More...
 
class  framework::Analyzer
 Base class for a module which does not produce a data product. More...
 

Namespaces

namespace  framework
 All classes in the ldmx-sw project use this namespace.
 

Macros

#define DECLARE_PRODUCER(CLASS)
 Macro which allows the framework to construct a producer given its name during configuration.
 
#define DECLARE_ANALYZER(CLASS)
 Macro which allows the framework to construct an analyzer given its name during configuration.
 
#define DECLARE_PRODUCER_NS(NS, CLASS)
 Macro which allows the framework to construct a producer given its name during configuration.
 
#define DECLARE_ANALYZER_NS(NS, CLASS)
 Macro which allows the framework to construct an analyzer given its name during configuration.
 

Typedefs

typedef EventProcessorframework::EventProcessorMaker(const std::string &name, Process &process)
 Typedef for EventProcessorFactory use.
 

Detailed Description

Base classes for all user event processing components to extend.

Author
Jeremy Mans, University of Minnesota

Definition in file EventProcessor.h.

Macro Definition Documentation

◆ DECLARE_ANALYZER

#define DECLARE_ANALYZER (   CLASS)
Value:
framework::EventProcessor *CLASS##_ldmx_make(const std::string &name, \
framework::Process &process) { \
return new CLASS(name, process); \
} \
__attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
framework::EventProcessor::declare( \
#CLASS, ::framework::Analyzer::CLASSTYPE, &CLASS##_ldmx_make); \
}
Base class for all event processing components.
Class which represents the process under execution.
Definition Process.h:36

Macro which allows the framework to construct an analyzer given its name during configuration.

Parameters
CLASSThe name of the class to register, which must not be in a namespace. If the class is in a namespace, use DECLARE_PRODUCER_NS()
Attention
Every Analyzer class must call this macro or DECLARE_ANALYZER_NS() in the associated implementation (.cxx) file.

Definition at line 352 of file EventProcessor.h.

354 { \
355 return new CLASS(name, process); \
356 } \
357 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
358 framework::EventProcessor::declare( \
359 #CLASS, ::framework::Analyzer::CLASSTYPE, &CLASS##_ldmx_make); \
360 }

◆ DECLARE_ANALYZER_NS

#define DECLARE_ANALYZER_NS (   NS,
  CLASS 
)
Value:
framework::EventProcessor *CLASS##_ldmx_make(const std::string &name, \
framework::Process &process) { \
return new NS::CLASS(name, process); \
} \
__attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
framework::EventProcessor::declare( \
std::string(#NS) + "::" + std::string(#CLASS), \
::framework::Analyzer::CLASSTYPE, &CLASS##_ldmx_make); \
}

Macro which allows the framework to construct an analyzer given its name during configuration.

Parameters
NSThe full namespace specification for the Analyzer
CLASSThe name of the class to register
Attention
Every Analyzer class must call this macro or DECLARE_ANALYZER() in the associated implementation (.cxx) file.

Definition at line 391 of file EventProcessor.h.

393 { \
394 return new NS::CLASS(name, process); \
395 } \
396 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
397 framework::EventProcessor::declare( \
398 std::string(#NS) + "::" + std::string(#CLASS), \
399 ::framework::Analyzer::CLASSTYPE, &CLASS##_ldmx_make); \
400 }

◆ DECLARE_PRODUCER

#define DECLARE_PRODUCER (   CLASS)
Value:
framework::EventProcessor *CLASS##_ldmx_make(const std::string &name, \
framework::Process &process) { \
return new CLASS(name, process); \
} \
__attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
framework::EventProcessor::declare( \
#CLASS, ::framework::Producer::CLASSTYPE, &CLASS##_ldmx_make); \
}

Macro which allows the framework to construct a producer given its name during configuration.

Parameters
CLASSThe name of the class to register, which must not be in a namespace. If the class is in a namespace, use DECLARE_PRODUCER_NS()
Attention
Every Producer class must call this macro or DECLARE_PRODUCER_NS() in the associated implementation (.cxx) file.

Definition at line 333 of file EventProcessor.h.

335 { \
336 return new CLASS(name, process); \
337 } \
338 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
339 framework::EventProcessor::declare( \
340 #CLASS, ::framework::Producer::CLASSTYPE, &CLASS##_ldmx_make); \
341 }

◆ DECLARE_PRODUCER_NS

#define DECLARE_PRODUCER_NS (   NS,
  CLASS 
)
Value:
framework::EventProcessor *CLASS##_ldmx_make(const std::string &name, \
framework::Process &process) { \
return new NS::CLASS(name, process); \
} \
__attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
framework::EventProcessor::declare( \
std::string(#NS) + "::" + std::string(#CLASS), \
::framework::Producer::CLASSTYPE, &CLASS##_ldmx_make); \
}

Macro which allows the framework to construct a producer given its name during configuration.

Parameters
NSThe full namespace specification for the Producer
CLASSThe name of the class to register
Attention
Every Producer class must call this macro or DECLARE_PRODUCER() in the associated implementation (.cxx) file.

Definition at line 371 of file EventProcessor.h.

373 { \
374 return new NS::CLASS(name, process); \
375 } \
376 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
377 framework::EventProcessor::declare( \
378 std::string(#NS) + "::" + std::string(#CLASS), \
379 ::framework::Producer::CLASSTYPE, &CLASS##_ldmx_make); \
380 }