Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Mantid::API::GroupingLoader Class Reference

GroupingLoader : Loads instrument grouping from IDF file. More...

#include <GroupingLoader.h>

Public Member Functions

std::shared_ptr< GroupinggetDummyGrouping ()
 Returns a "dummy" grouping of a single group with all the detectors in it. More...
 
std::shared_ptr< GroupinggetGroupingFromIDF () const
 Load the grouping from the instrument's IDF. More...
 
 GroupingLoader (Geometry::Instrument_const_sptr instrument)
 Constructor without field direction. More...
 
 GroupingLoader (Geometry::Instrument_const_sptr instrument, std::string mainFieldDirection)
 Constructor with field direction. More...
 
virtual ~GroupingLoader ()
 Destructor. More...
 

Static Public Member Functions

static void loadGroupingFromXML (const std::string &filename, Grouping &grouping)
 Loads grouping from the XML file specified. More...
 

Private Attributes

const Geometry::Instrument_const_sptr m_instrument
 Instrument to load grouping from. More...
 
const std::string m_mainFieldDirection
 Orientation of instrument (e.g. for MUSR) More...
 

Detailed Description

GroupingLoader : Loads instrument grouping from IDF file.

Definition at line 44 of file GroupingLoader.h.

Constructor & Destructor Documentation

◆ GroupingLoader() [1/2]

Mantid::API::GroupingLoader::GroupingLoader ( Geometry::Instrument_const_sptr  instrument)
explicit

Constructor without field direction.

Parameters
instrument:: [input] Instrument

Definition at line 29 of file GroupingLoader.cpp.

◆ GroupingLoader() [2/2]

Mantid::API::GroupingLoader::GroupingLoader ( Geometry::Instrument_const_sptr  instrument,
std::string  mainFieldDirection 
)

Constructor with field direction.

Parameters
instrument:: [input] Instrument
mainFieldDirection:: [input] Direction of main field (for MUSR)

Definition at line 35 of file GroupingLoader.cpp.

◆ ~GroupingLoader()

Mantid::API::GroupingLoader::~GroupingLoader ( )
virtualdefault

Destructor.

Member Function Documentation

◆ getDummyGrouping()

std::shared_ptr< Grouping > Mantid::API::GroupingLoader::getDummyGrouping ( )

Returns a "dummy" grouping of a single group with all the detectors in it.

Returns a "dummy" grouping: a single group with all the detectors in it.

Returns
Grouping information

Definition at line 207 of file GroupingLoader.cpp.

References m_instrument.

Referenced by Mantid::DataHandling::LoadMuonStrategy::loadDefaultDetectorGrouping(), and Mantid::DataHandling::LoadMuonNexus1::loadDetectorGrouping().

◆ getGroupingFromIDF()

std::shared_ptr< Grouping > Mantid::API::GroupingLoader::getGroupingFromIDF ( ) const

Load the grouping from the instrument's IDF.

Attempts to load a grouping information referenced by IDF.

Returns
Grouping information

Definition at line 47 of file GroupingLoader.cpp.

References Mantid::Kernel::SingletonHolder< T >::Instance(), loadGroupingFromXML(), m_instrument, and m_mainFieldDirection.

Referenced by Mantid::DataHandling::LoadMuonStrategy::loadDefaultDetectorGrouping(), and Mantid::DataHandling::LoadMuonNexus1::loadDetectorGrouping().

◆ loadGroupingFromXML()

void Mantid::API::GroupingLoader::loadGroupingFromXML ( const std::string &  filename,
Grouping grouping 
)
static

Loads grouping from the XML file specified.

Parameters
filename:: XML filename to load grouping information from
grouping:: Struct to store grouping information to

Definition at line 77 of file GroupingLoader.cpp.

References Mantid::API::Grouping::defaultName, Mantid::API::Grouping::description, Mantid::API::Grouping::groupNames, Mantid::API::Grouping::groups, Mantid::API::Grouping::pairAlphas, Mantid::API::Grouping::pairNames, and Mantid::API::Grouping::pairs.

Referenced by getGroupingFromIDF().

Member Data Documentation

◆ m_instrument

const Geometry::Instrument_const_sptr Mantid::API::GroupingLoader::m_instrument
private

Instrument to load grouping from.

Definition at line 58 of file GroupingLoader.h.

Referenced by getDummyGrouping(), and getGroupingFromIDF().

◆ m_mainFieldDirection

const std::string Mantid::API::GroupingLoader::m_mainFieldDirection
private

Orientation of instrument (e.g. for MUSR)

Definition at line 60 of file GroupingLoader.h.

Referenced by getGroupingFromIDF().


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