Belle II Software  release-08-01-10
FiltersContainer< point_t > Class Template Reference

This class contains everything needed by the VXDTF that is not going to change during a RUN, i.e. More...

#include <FiltersContainer.h>

Collaboration diagram for FiltersContainer< point_t >:

Public Types

using setupNameToFilters_t = std::unordered_map< std::string, Belle2::VXDTFFilters< point_t > * >
 typedef for better readability. Index is name of the setup.
 

Public Member Functions

virtual ~FiltersContainer ()
 Destructor deleting all filters stored.
 
VXDTFFilters< point_t > * getFilters (const std::string &setupName)
 Gives access to the sector map and filters of a given setup.
 
const setupNameToFilters_tgetAllSetups (void)
 returns all the available setups.
 
void assignFilters (const std::string &setupName, VXDTFFilters< point_t > *filters)
 assigns filters. More...
 

Static Public Member Functions

static FiltersContainergetInstance ()
 one and only way to access the singleton object More...
 

Private Member Functions

 FiltersContainer (const FiltersContainer &filtersContainer)=delete
 Copies of this class, which is a singleton, are not allowed so the copy constructor method is deleted.
 
FiltersContaineroperator= (const FiltersContainer &)=delete
 dont allow copies
 
 FiltersContainer ()
 Singleton so use a hidden Constructor.
 

Private Attributes

setupNameToFilters_t m_allSetupsFilters
 Container of all the Filters indexed by their setupNames.
 

Detailed Description

template<class point_t>
class Belle2::FiltersContainer< point_t >

This class contains everything needed by the VXDTF that is not going to change during a RUN, i.e.

IP position, B field @ IP, static sectors, 2 space points filters, 3 space points filters, etc. etc. It is a singleton and is shared by all other processes This class owns her members and she is in charge for their deletions.

Definition at line 27 of file FiltersContainer.h.

Member Function Documentation

◆ assignFilters()

void assignFilters ( const std::string &  setupName,
VXDTFFilters< point_t > *  filters 
)
inline

assigns filters.

The ownership of filters is taken by FiltersContainer!

Definition at line 87 of file FiltersContainer.h.

89  {
90  // case there is already a filter with this name in the container, we delete that filter!
91  if (m_allSetupsFilters.count(setupName)) {
92  B2INFO("FiltersContainer: Replacing existing filter for setup name: " << setupName);
93  if (m_allSetupsFilters[ setupName ] && filters != m_allSetupsFilters[ setupName ]) delete m_allSetupsFilters[ setupName ];
94  }
95  m_allSetupsFilters[ setupName ] = filters;
96  }
setupNameToFilters_t m_allSetupsFilters
Container of all the Filters indexed by their setupNames.

◆ getInstance()

static FiltersContainer& getInstance ( )
inlinestatic

one and only way to access the singleton object

the unique_ptr takes care for the deletion of the object!

Definition at line 53 of file FiltersContainer.h.


The documentation for this class was generated from the following file: