A class to define a library of detectors known to the analysis.
More...
#include <DetectorLibrary.hpp>
|
|
typedef std::string | mapkey_t |
| | typedef for a mapkey
|
| |
A class to define a library of detectors known to the analysis.
| virtual DetectorLibrary::~DetectorLibrary |
( |
| ) |
|
|
virtual |
| virtual const_reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
mod, |
|
|
DetectorLibrary::size_type |
ch |
|
) |
| const |
|
virtual |
Defines the at operator for access via module and channel number (const)
- Parameters
-
| [in] | mod | : the module |
| [in] | ch | : the channel |
- Returns
- a reference to the DetectorLibrary
| virtual const_reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
idx | ) |
const |
|
virtual |
defines the at operator for using an id (const)
- Parameters
-
| [in] | idx | : the id to look for |
- Returns
- a reference to the DetectorLibrary
| virtual reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
mod, |
|
|
DetectorLibrary::size_type |
ch |
|
) |
| |
|
virtual |
Defines the at operator for access via module and channel number
- Parameters
-
| [in] | mod | : the module |
| [in] | ch | : the channel |
- Returns
- a reference to the DetectorLibrary
| virtual reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
idx | ) |
|
|
virtual |
defines the at operator for using an id (const)
- Parameters
-
| [in] | idx | : the id to look for |
- Returns
- a reference to the DetectorLibrary
| int DetectorLibrary::ChannelFromIndex |
( |
int |
index | ) |
const |
Calculate channel number from the index
- Parameters
-
| [in] | index | : the index to convert |
- Returns
- the channel calculated from the index
- Returns
- the only instance of the class
| size_type DetectorLibrary::GetIndex |
( |
int |
mod, |
|
|
int |
chan |
|
) |
| const |
Get the index for a given module and channel
- Parameters
-
| [in] | mod | : the module number |
| [in] | chan | : the channel number |
- Returns
- the index for a given module, channel
| const std::set<std::string>& DetectorLibrary::GetKnownDetectors |
( |
void |
| ) |
|
Retrieves a vector containing all detector types for which an analysis routine has been defined making it possible to declare this detector type in the map.txt file. The currently known detector types are in detectorString
- Returns
- Get the detectors known to the analysis
| const std::set<int>& DetectorLibrary::GetLocations |
( |
const Identifier & |
id | ) |
const |
Get the set of locations for the provided Identifier
- Parameters
-
| [in] | id | : The identifier to get the locations for |
- Returns
- the set of locations for a given type, subtype
| const std::set<int>& DetectorLibrary::GetLocations |
( |
const std::string & |
type, |
|
|
const std::string & |
subtype |
|
) |
| const |
Get the set of locations for the given type and subtype
- Parameters
-
| [in] | type | : the type to look for |
| [in] | subtype | : the subtype to look for |
- Returns
- the set of locations for a given type, subtype
| unsigned int DetectorLibrary::GetModules |
( |
| ) |
const |
|
inline |
- Returns
- the number of modules
| int DetectorLibrary::GetNextLocation |
( |
const Identifier & |
id | ) |
const |
Get the next undefined location of a given Identifier
- Parameters
-
| [in] | id | : The Identifier you want the the next location for |
- Returns
- the id for the locaton
| int DetectorLibrary::GetNextLocation |
( |
const std::string & |
type, |
|
|
const std::string & |
subtype |
|
) |
| const |
Get the next undefined location of a given type and subtype
- Parameters
-
| [in] | type | : the detector type |
| [in] | subtype | : the detector subtype |
- Returns
- the id for the locaton
| unsigned int DetectorLibrary::GetPhysicalModules |
( |
| ) |
const |
|
inline |
- Returns
- the number of physical modules
| const std::set<std::string>& DetectorLibrary::GetUsedDetectors |
( |
void |
| ) |
const |
- Returns
- the used detectors
| bool DetectorLibrary::HasValue |
( |
int |
mod, |
|
|
int |
chan |
|
) |
| const |
Check that the detector is in the list and kill if it's not
- Parameters
-
| [in] | mod | : the module number to check |
| [in] | chan | : the channel number to check |
- Returns
- true if it has a value at the given mod,chan
| bool DetectorLibrary::HasValue |
( |
int |
index | ) |
const |
Check if the Library has a value at a given index
- Parameters
-
| [in] | index | : the index to check for |
- Returns
- true if it has a value at the given mod,chan
| void DetectorLibrary::LoadXml |
( |
| ) |
|
|
private |
Load the XML configuration file
| mapkey_t DetectorLibrary::MakeKey |
( |
const std::string & |
type, |
|
|
const std::string & |
subtype |
|
) |
| const |
|
private |
Make a unique map key for the given type,subtype
- Parameters
-
| [in] | type | : the type to make a key out of |
| [in] | subtype | : the subtype to make a key out of |
- Returns
- the constructed map key
| int DetectorLibrary::ModuleFromIndex |
( |
int |
index | ) |
const |
Calculate the module number from the index
- Parameters
-
| [in] | index | : the index to convert to module number |
- Returns
- the module number
| void DetectorLibrary::PrintMap |
( |
void |
| ) |
const |
| void DetectorLibrary::PrintUsedDetectors |
( |
RawEvent & |
rawev | ) |
const |
Print out the used detectors
- Parameters
-
| [in] | rawev | : the raw event to print from |
| virtual void DetectorLibrary::push_back |
( |
const Identifier & |
x | ) |
|
|
virtual |
Add an additional Identifier to the library
- Parameters
-
| void DetectorLibrary::Set |
( |
int |
index, |
|
|
const Identifier & |
value |
|
) |
| |
Check that the detector is in the list and kill if it's not
- Parameters
-
| [in] | index | : the index to look for |
| [in] | value | : the value to check for |
| void DetectorLibrary::Set |
( |
int |
mod, |
|
|
int |
ch, |
|
|
const Identifier & |
value |
|
) |
| |
Check that the detector is in the list and kill if it's not
- Parameters
-
| [in] | mod | : the module number to check |
| [in] | ch | : the channel number to check |
| [in] | value | : the value to check for |
The documentation for this class was generated from the following file: