LDMX Software
framework Namespace Reference

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

Namespaces

namespace  config
 python execution and parameter extraction
 

Classes

class  AbortEventException
 Specific exception used to abort an event. More...
 
class  Analyzer
 Base class for a module which does not produce a data product. More...
 
class  Bus
 A map of bus passengers. More...
 
class  Conditions
 Container and cache for conditions and conditions providers. More...
 
class  ConditionsIOV
 Class which defines the run/event/type range for which a given condition is valid, including for all time. More...
 
class  ConditionsObject
 Base class for all conditions objects, very simple. More...
 
class  ConditionsObjectProvider
 Base class for all providers of conditions objects. More...
 
class  Event
 Implements an event buffer system for storing event data. More...
 
class  EventFile
 This class manages all ROOT file input/output operations. More...
 
class  EventProcessor
 Base class for all event processing components. More...
 
class  Factory
 Factory to dynamically create objects derived from a specific prototype class. More...
 
class  FactoryWithWarehouse
 A Factory with a warehouse to hold created objects. More...
 
class  HistogramPool
 Class for holding an EventProcessor's histogram pointers and making sure that they all end up in the same directory in the output histogram file. More...
 
class  NtupleManager
 Singleton class used to manage the creation and pooling of ntuples. More...
 
class  Process
 Class which represents the process under execution. More...
 
class  Producer
 Base class for a module which produces a data product. More...
 
class  ProductTag
 Defines the identity of a product and can be used for searches. More...
 
class  RandomNumberSeedService
 System for consistent seeding of random number generators. More...
 
class  RunHeaderAnalyzer
 
class  StorageControl
 Class which encapsulates storage control functionality, used by the Process class. More...
 

Typedefs

typedef std::unique_ptr< ProcessProcessHandle
 A handle to the current process Used to pass a process from ConfigurePython to fire.cxx.
 

Functions

 DEFINE_FACTORY (ConditionsObjectProvider)
 
static regex_t constructRegex (const std::string &pattern, bool full_string_match)
 Construct an actual regex from the pass pattern (and full-string flag)
 
 DEFINE_FACTORY (EventProcessor)
 
std::tuple< std::size_t, double, double > categoryBins (const std::vector< std::string > &categories, int offset=0)
 
void labelAxis (TAxis *axis, const std::vector< std::string > &categories)
 

Variables

constexpr StorageControl::Hint HINT_SHOULD_KEEP
 storage control hint alias for backwards compatibility
 
constexpr StorageControl::Hint HINT_SHOULD_DROP
 storage control hint alias for backwards compatibility
 
static const int SEED_EXTERNAL = 2
 
static const int SEED_RUN = 3
 
static const int SEED_TIME = 4
 

Detailed Description

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

Typedef Documentation

◆ ProcessHandle

typedef std::unique_ptr<Process> framework::ProcessHandle

A handle to the current process Used to pass a process from ConfigurePython to fire.cxx.

Definition at line 233 of file Process.h.

Function Documentation

◆ categoryBins()

std::tuple< std::size_t, double, double > framework::categoryBins ( const std::vector< std::string > & categories,
int offset = 0 )

Definition at line 57 of file HistogramPool.cxx.

58 {
59 std::size_t n_categories = categories.size();
60 double min = offset - 0.5;
61 double max = offset + n_categories + 0.5;
62 return std::make_tuple(n_categories, min, max);
63}

◆ constructRegex()

static regex_t framework::constructRegex ( const std::string & pattern,
bool full_string_match )
static

Construct an actual regex from the pass pattern (and full-string flag)

If the pattern is the empty string, then we generate the match-all regex .*.

If the pattern is not empty and we want to match on full-strings, then we prepend the pattern with ^ and append the pattern with $ to inform regex that the pattern should match the entire string.

Parameters
[in]patterna regex pattern string
[in]full_string_matchflag if we want full-string matches only (true) or if we can include sub-strings (false)
Returns
generated regex structure, expecting user to call regfree on it when done

Definition at line 47 of file Event.cxx.

48 {
49 std::string pattern_regex{pattern};
50 if (pattern_regex.empty())
51 pattern_regex = ".*";
52 else if (full_string_match)
53 pattern_regex = "^" + pattern_regex + "$";
54
55 regex_t reg;
56 if (regcomp(&reg, pattern_regex.c_str(),
57 REG_EXTENDED | REG_ICASE | REG_NOSUB)) {
58 // use input value in exception since we expect our code above evolving
59 // the regex to be accurate
60 EXCEPTION_RAISE("InvalidRegex", "The passed regex '" + pattern +
61 "' is not a valid regular expression.");
62 }
63 return reg;
64}

Referenced by framework::Event::searchProducts().

◆ labelAxis()

void framework::labelAxis ( TAxis * axis,
const std::vector< std::string > & categories )

Definition at line 65 of file HistogramPool.cxx.

65 {
66 for (std::size_t ibin{1}; ibin <= categories.size(); ibin++) {
67 axis->SetBinLabel(ibin, categories[ibin - 1].c_str());
68 }
69}

Variable Documentation

◆ HINT_SHOULD_DROP

◆ HINT_SHOULD_KEEP

◆ SEED_EXTERNAL

const int framework::SEED_EXTERNAL = 2
static

Definition at line 14 of file RandomNumberSeedService.cxx.

◆ SEED_RUN

const int framework::SEED_RUN = 3
static

Definition at line 15 of file RandomNumberSeedService.cxx.

◆ SEED_TIME

const int framework::SEED_TIME = 4
static

Definition at line 16 of file RandomNumberSeedService.cxx.