List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
mdet::MDetector Class Reference

Detector associated to muon detector hierarchy. More...

#include "mdet/MDetector.h"

Inheritance diagram for mdet::MDetector:
Inheritance graph
[legend]

Public Types

typedef CounterGroup::ConstIterator CounterConstIterator
 Defines a more meaningful (and shorter) type for iterators. More...
 

Public Member Functions

CounterConstIterator AllCountersBegin () const
 Begin iterator over all the counters. More...
 
CounterConstIterator AllCountersEnd () const
 End iterator over all the counters. More...
 
CounterConstIterator CountersBegin () const
 Begin iterator over the counters. More...
 
CounterConstIterator CountersEnd () const
 End iterator over the counters. More...
 
bool ExistsCounter (int id) const
 Check Counter existence by id. More...
 
const CounterGetCounter (int id) const
 Retrieve Counter by id. More...
 
void Update (bool invalidateData=true, bool invalidateComponents=true)
 Perform detector update. More...
 

Private Types

typedef std::map< int,
utl::ShadowPtr< int > > 
AssociationMap
 Typedef for ease of programming. More...
 
typedef MComponentGroup
< MDetector, Counter,
det::IdOnlyCreator >::Type 
CounterGroup
 Type for the associated Counters group. More...
 

Private Member Functions

bool ExistsAssociatedCounter (int tankId) const
 Tells whether there's an associated counter for a sdet::Station. More...
 
int GetAssociatedCounterId (int tankId) const
 Resolve the associated counter given an id for a sdet::Station. More...
 
const int * LookUpAssociatedCounter (int tankId) const
 Resolve a pointer to the counter id. More...
 
 MDetector ()
 
 ~MDetector ()
 

Private Attributes

AssociationMap fAssociatedCountersIds
 Cache of ids. More...
 
CounterGroup fCounters
 The child components. More...
 

Friends

class det::Detector
 Friendship to allow creation. More...
 
class sdet::Station
 Grant friendship to allow accessing counter-tank linking funcs. More...
 

Detailed Description

Detector associated to muon detector hierarchy.

Author
Rodolfo Federico Gamarra
Date
09 Jan 2009

Definition at line 32 of file MDetector.h.

Member Typedef Documentation

typedef std::map<int, utl::ShadowPtr<int> > mdet::MDetector::AssociationMap
private

Typedef for ease of programming.

The first int is the identifier of a tank; and the second is the identifier of its associated counter. If there's no associated counter for a tank, then null is stored.

Definition at line 174 of file MDetector.h.

typedef CounterGroup::ConstIterator mdet::MDetector::CounterConstIterator

Defines a more meaningful (and shorter) type for iterators.

Definition at line 44 of file MDetector.h.

Type for the associated Counters group.

Definition at line 39 of file MDetector.h.

Constructor & Destructor Documentation

mdet::MDetector::MDetector ( )
inlineprivate

Definition at line 134 of file MDetector.h.

mdet::MDetector::~MDetector ( )
inlineprivate

Definition at line 138 of file MDetector.h.

Member Function Documentation

CounterConstIterator mdet::MDetector::AllCountersBegin ( ) const
inline

Begin iterator over all the counters.

Definition at line 80 of file MDetector.h.

References fCounters.

Referenced by LookUpAssociatedCounter(), and MuonCounterViewerAG::MuonCounterViewer::Run().

CounterConstIterator mdet::MDetector::AllCountersEnd ( ) const
inline

End iterator over all the counters.

Definition at line 86 of file MDetector.h.

References fCounters.

Referenced by LookUpAssociatedCounter(), and MuonCounterViewerAG::MuonCounterViewer::Run().

CounterConstIterator mdet::MDetector::CountersBegin ( ) const
inline

Begin iterator over the counters.

Definition at line 92 of file MDetector.h.

References fCounters.

Referenced by MdShowerRegeneratorAG::MdShowerRegenerator::Run(), and testMEventImpl::setUp().

CounterConstIterator mdet::MDetector::CountersEnd ( ) const
inline

End iterator over the counters.

Definition at line 99 of file MDetector.h.

References fCounters.

Referenced by MdShowerRegeneratorAG::MdShowerRegenerator::Run(), and testMEventImpl::setUp().

bool mdet::MDetector::ExistsAssociatedCounter ( int  tankId) const
private

Tells whether there's an associated counter for a sdet::Station.

Definition at line 31 of file MDetector.cc.

References LookUpAssociatedCounter().

bool mdet::MDetector::ExistsCounter ( int  id) const
inline

Check Counter existence by id.

Definition at line 74 of file MDetector.h.

References fCounters.

int mdet::MDetector::GetAssociatedCounterId ( int  tankId) const
private

Resolve the associated counter given an id for a sdet::Station.

Definition at line 23 of file MDetector.cc.

References LookUpAssociatedCounter().

const Counter& mdet::MDetector::GetCounter ( int  id) const
inline

Retrieve Counter by id.

Definition at line 68 of file MDetector.h.

References fCounters.

Referenced by G4StationSimulatorOG::G4StationConstruction::AssembleUMD(), MdLDFFinderAG::Likelihood2::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood3::CalculateCandidateLikelihood(), MdLDFFinderAG::Likelihood::CalculateCandidateLikelihood(), MdLDFFinderAG::VMinMethodFunctor::CalculateSilentLikelihood(), MdMuonCounterAG::MdMuonCounter::ComputeSignalT50(), otoa::Detector2ADST::FillDetector(), MdLDFFinderAG::MdLDFFinder::FillModulesShowerPlaneDistances(), MdMuonEstimatorAG::MdMuonEstimator::GetSamplingTime(), MdMuonEstimatorAG::MdMuonEstimator::GetTraceLength(), MdMuonCounterAG::MdMuonCounter::GetTraceOffset(), G4XTankSimulatorAG::G4XTankSimulator::Init(), UniversalityFitter::UniversalityFitter::InitBarilocheReconstruction(), otoa::MD2ADST::MakeCounter(), otoa::MD2ADST::MakeSimCounter(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::OptoElectronics(), MdCornerClippingCorrecterAG::MdCornerClippingCorrecter::Run(), MdBiasCorrecterAG::MdBiasCorrecter::Run(), MdPileUpCorrecterAG::MdPileUpCorrecter::Run(), MdPatternFinderAG::MdPatternFinder::Run(), GroundPropagatorAG::GroundPropagator::Run(), UnderGrdInjectorAG::UnderGrdInjector::Run(), MdMuonEstimatorAG::MdMuonEstimator::Run(), EdepSimulatorAG::EdepSimulator::Run(), MdMuonCounterAG::MdMuonCounter::Run(), G4StationSimulatorOG::G4StationSimulator::RunFast(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEvent(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEventScintillatorSimulated(), G4StationSimulatorOG::G4StationSimulator::RunFull(), MdGeometryFitterAG::MdGeometryFitter::SetTimeData(), G4StationSimulatorOG::G4StationConstruction::SetUMDParameters(), MDetectorTest::testBasic(), MDetectorTest::testBrokenChannelsAssignment(), and MDetectorTest::testComponentAssignment().

const int * mdet::MDetector::LookUpAssociatedCounter ( int  tankId) const
private

Resolve a pointer to the counter id.

Resolves a pointer to the id, or return null if such id doesn't exist.

Definition at line 38 of file MDetector.cc.

References AllCountersBegin(), AllCountersEnd(), fAssociatedCountersIds, mdet::Counter::GetAssociatedTankId(), and G4StationSimulatorOG::p.

Referenced by ExistsAssociatedCounter(), and GetAssociatedCounterId().

void mdet::MDetector::Update ( bool  invalidateData = true,
bool  invalidateComponents = true 
)

Perform detector update.

Parameters
invalidateDataForce data invalidation.
invalidateComponentsForce component list invalidation.

The invalidation allows to perform a clean-up so as to, for example. force the loading of a fresh new configuration.

In det::Detector it's said: "...deletes currently constructed stations..."

Doing AMIGA improvs, these flags were introduced to distiguish If we want to discard component information and subcomponent relationships; so as to avoid to discard always everything unconditionally: we may want to update to a certain time only modifying according to comissioning time, and without discarding what has already been loaded and it's actually valid data.

Definition at line 13 of file MDetector.cc.

References fCounters, and utl::m.

Friends And Related Function Documentation

friend class det::Detector
friend

Friendship to allow creation.

Definition at line 132 of file MDetector.h.

friend class sdet::Station
friend

Grant friendship to allow accessing counter-tank linking funcs.

Definition at line 120 of file MDetector.h.

Member Data Documentation

AssociationMap mdet::MDetector::fAssociatedCountersIds
mutableprivate

Cache of ids.

Definition at line 178 of file MDetector.h.

Referenced by LookUpAssociatedCounter().

CounterGroup mdet::MDetector::fCounters
private

The child components.

Definition at line 149 of file MDetector.h.

Referenced by AllCountersBegin(), AllCountersEnd(), CountersBegin(), CountersEnd(), ExistsCounter(), GetCounter(), and Update().


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

, generated on Tue Sep 26 2023.