Common class for groups of components of the Event hierarchy. More...
#include "evt/ComponentGroup.h"
Classes | |
struct | SecondResolver |
Public Types | |
typedef boost::transform_iterator < ConstComponentResolver, PairConstIterator > | ComponentConstIterator |
Alias for constant iterator over contained components. More... | |
typedef boost::transform_iterator < ComponentResolver, PairIterator > | ComponentIterator |
Alias for non-constant iterator over contained components. More... | |
Public Member Functions | |
ComponentIterator | Begin () |
ComponentConstIterator | Begin () const |
Check (i, e, id) | |
ComponentIterator | End () |
ComponentConstIterator | End () const |
Component & | Get (const int id) |
Retrieve by id. More... | |
int | GetNumberOf () const |
Query quantity. More... | |
bool | Has (const int id) const |
Query existence. More... | |
void | Make (int id) |
Construct by id. More... | |
Public Attributes | |
const Component & | const |
Retrieve by id. More... | |
const PairConstIterator | e = fComponents.end() |
return *i | second |
Private Types | |
typedef SecondResolver < MappedReference, Reference > | ComponentResolver |
typedef SecondResolver < ConstMappedReference, ConstReference > | ConstComponentResolver |
typedef InternalComponentCollection::const_mapped_reference | ConstMappedReference |
typedef const Component * | ConstMappedType |
typedef InternalComponentCollection::const_reference | ConstReference |
typedef boost::ptr_map< int, Component > | InternalComponentCollection |
typedef InternalComponentCollection::key_type | KeyType |
typedef InternalComponentCollection::mapped_reference | MappedReference |
typedef InternalComponentCollection::mapped_type | MappedType |
typedef InternalComponentCollection::const_iterator | PairConstIterator |
typedef InternalComponentCollection::iterator | PairIterator |
typedef InternalComponentCollection::reference | Reference |
Private Attributes | |
InternalComponentCollection | fComponents |
Static Private Attributes | |
static constexpr const ConstComponentResolver | kConstResolver = ConstComponentResolver() |
Instance of the (stateless) helper class (stored on a class for the containing class) for const component resolving. More... | |
static constexpr const ComponentResolver | kResolver = ComponentResolver() |
Non-const resolving. More... | |
Common class for groups of components of the Event hierarchy.
Groups elements of the event hierarchy and responds to the has/make/get interface.
Component | The actual type of the component. Its instances are constructed here with the following expression |
Since the objects will be owned, they must be feasible to be destructed. In particular, given the innards of this class the destruction is perfomed, at last, by
template<class T> void boost::checked_delete(T*);
so the destructor must be accesible at least by that function.
Definition at line 80 of file Event/ComponentGroup.h.
typedef boost::transform_iterator<ConstComponentResolver, PairConstIterator> evt::ComponentGroup< Component >::ComponentConstIterator |
Alias for constant iterator over contained components.
Definition at line 140 of file Event/ComponentGroup.h.
typedef boost::transform_iterator<ComponentResolver, PairIterator> evt::ComponentGroup< Component >::ComponentIterator |
Alias for non-constant iterator over contained components.
Definition at line 146 of file Event/ComponentGroup.h.
|
private |
Definition at line 122 of file Event/ComponentGroup.h.
|
private |
Definition at line 121 of file Event/ComponentGroup.h.
|
private |
Definition at line 114 of file Event/ComponentGroup.h.
|
private |
Definition at line 112 of file Event/ComponentGroup.h.
|
private |
Definition at line 115 of file Event/ComponentGroup.h.
|
private |
Given the usage context where id-lookup is performed then seems better to introduce a map instead of a vector and using linear-search. On the other hand the iteration over the map should be still equally performing than the one over the vector. Then the map holds the relation id->Component.
Since the objects will be heap-allocated (and owned) favor Boost's ptr container instead a home-cooked raw * container.
Definition at line 108 of file Event/ComponentGroup.h.
|
private |
Definition at line 110 of file Event/ComponentGroup.h.
|
private |
Definition at line 113 of file Event/ComponentGroup.h.
|
private |
Definition at line 111 of file Event/ComponentGroup.h.
|
private |
Definition at line 117 of file Event/ComponentGroup.h.
|
private |
Definition at line 118 of file Event/ComponentGroup.h.
|
private |
Definition at line 116 of file Event/ComponentGroup.h.
|
inline |
Definition at line 208 of file Event/ComponentGroup.h.
Referenced by mevt::Module::ChannelsBegin(), mevt::Counter::CountCandidateModules(), mevt::MEvent::CountersBegin(), mevt::Counter::CountRejectedModules(), mevt::Counter::CountSilentModules(), mevt::Counter::GetActiveArea(), mevt::Counter::GetActiveAreaHG(), mevt::Counter::GetActiveAreaLG(), mevt::Counter::GetLDFResidual(), mevt::Counter::GetMeanMuons(), mevt::Counter::GetMeanMuonsErrorHigh(), mevt::Counter::GetMeanMuonsErrorLow(), mevt::Counter::GetMeanMuonsLowLimit(), mevt::Counter::GetNumberOfChannelsOn(), mevt::Counter::GetNumberOfEstimatedMuons(), mevt::Counter::GetNumberOfEstimatedMuonsHG(), mevt::Counter::GetNumberOfEstimatedMuonsLG(), mevt::Counter::GetNumberOfMuonsErrorHigh(), mevt::Counter::GetNumberOfMuonsErrorHighHG(), mevt::Counter::GetNumberOfMuonsErrorHighLG(), mevt::Counter::GetNumberOfMuonsErrorLow(), mevt::Counter::GetNumberOfMuonsErrorLowHG(), mevt::Counter::GetNumberOfMuonsErrorLowLG(), mevt::Counter::GetNumberOfMuonsLowLimit(), mevt::Counter::HasRecData(), mevt::Counter::IsADCCalibratedHG(), mevt::Counter::IsADCCalibratedLG(), mevt::Counter::IsSaturated(), mevt::Counter::ModulesBegin(), mevt::Module::ScintillatorsBegin(), mevt::Counter::SetRejected(), and mevt::Counter::SetSilent().
|
inline |
Definition at line 214 of file Event/ComponentGroup.h.
evt::ComponentGroup< Component >::Check | ( | i | , |
e | , | ||
id | |||
) |
Referenced by evt::ComponentGroup< Scintillator >::Get().
|
inline |
Definition at line 211 of file Event/ComponentGroup.h.
Referenced by mevt::Module::ChannelsEnd(), mevt::Counter::CountCandidateModules(), mevt::MEvent::CountersEnd(), mevt::Counter::CountRejectedModules(), mevt::Counter::CountSilentModules(), mevt::Counter::GetActiveArea(), mevt::Counter::GetActiveAreaHG(), mevt::Counter::GetActiveAreaLG(), mevt::Counter::GetLDFResidual(), mevt::Counter::GetMeanMuons(), mevt::Counter::GetMeanMuonsErrorHigh(), mevt::Counter::GetMeanMuonsErrorLow(), mevt::Counter::GetMeanMuonsLowLimit(), mevt::Counter::GetNumberOfChannelsOn(), mevt::Counter::GetNumberOfEstimatedMuons(), mevt::Counter::GetNumberOfEstimatedMuonsHG(), mevt::Counter::GetNumberOfEstimatedMuonsLG(), mevt::Counter::GetNumberOfMuonsErrorHigh(), mevt::Counter::GetNumberOfMuonsErrorHighHG(), mevt::Counter::GetNumberOfMuonsErrorHighLG(), mevt::Counter::GetNumberOfMuonsErrorLow(), mevt::Counter::GetNumberOfMuonsErrorLowHG(), mevt::Counter::GetNumberOfMuonsErrorLowLG(), mevt::Counter::GetNumberOfMuonsLowLimit(), mevt::Counter::HasRecData(), mevt::Counter::IsADCCalibratedHG(), mevt::Counter::IsADCCalibratedLG(), mevt::Counter::IsSaturated(), mevt::Counter::ModulesEnd(), mevt::Module::ScintillatorsEnd(), mevt::Counter::SetRejected(), and mevt::Counter::SetSilent().
|
inline |
Definition at line 217 of file Event/ComponentGroup.h.
|
inline |
Retrieve by id.
Definition at line 163 of file Event/ComponentGroup.h.
Referenced by mevt::Module::GetChannel(), mevt::MEvent::GetCounter(), mevt::Counter::GetModule(), and mevt::Module::GetScintillator().
|
inline |
Query quantity.
Definition at line 206 of file Event/ComponentGroup.h.
Referenced by mevt::Module::GetNumberOfChannels(), mevt::MEvent::GetNumberOfCounters(), mevt::Counter::GetNumberOfModules(), mevt::Module::GetNumberOfScintillators(), and mevt::Counter::HasRecData().
|
inline |
Query existence.
Definition at line 200 of file Event/ComponentGroup.h.
Referenced by mevt::Module::HasChannel(), mevt::MEvent::HasCounter(), mevt::Counter::HasModule(), and mevt::Module::HasScintillator().
|
inline |
Construct by id.
Definition at line 174 of file Event/ComponentGroup.h.
Referenced by mevt::Module::MakeChannel(), mevt::MEvent::MakeCounter(), mevt::Counter::MakeModule(), and mevt::Module::MakeScintillator().
const Component& evt::ComponentGroup< Component >::const |
const PairConstIterator evt::ComponentGroup< Component >::e = fComponents.end() |
Definition at line 155 of file Event/ComponentGroup.h.
|
private |
Definition at line 221 of file Event/ComponentGroup.h.
Referenced by evt::ComponentGroup< Scintillator >::Begin(), evt::ComponentGroup< Scintillator >::End(), evt::ComponentGroup< Scintillator >::Get(), evt::ComponentGroup< Scintillator >::GetNumberOf(), evt::ComponentGroup< Scintillator >::Has(), and evt::ComponentGroup< Scintillator >::Make().
|
staticprivate |
Instance of the (stateless) helper class (stored on a class for the containing class) for const component resolving.
Definition at line 128 of file Event/ComponentGroup.h.
Referenced by evt::ComponentGroup< Scintillator >::Begin(), and evt::ComponentGroup< Scintillator >::End().
|
staticprivate |
Non-const resolving.
Definition at line 133 of file Event/ComponentGroup.h.
Referenced by evt::ComponentGroup< Scintillator >::Begin(), and evt::ComponentGroup< Scintillator >::End().
return* i evt::ComponentGroup< Component >::second |
Definition at line 157 of file Event/ComponentGroup.h.