A class to define a library of detectors known to the analysis.
More...
#include <DetectorLibrary.hpp>
A class to define a library of detectors known to the analysis.
Definition at line 20 of file DetectorLibrary.hpp.
§ mapkey_t
§ ~DetectorLibrary()
DetectorLibrary::~DetectorLibrary |
( |
| ) |
|
|
virtual |
§ DetectorLibrary() [1/2]
DetectorLibrary::DetectorLibrary |
( |
| ) |
|
|
private |
§ DetectorLibrary() [2/2]
Define the constructor with itself.
§ at() [1/4]
DetectorLibrary::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
Definition at line 150 of file DetectorLibrary.cpp.
§ at() [2/4]
DetectorLibrary::const_reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
idx | ) |
const |
|
virtual |
§ at() [3/4]
DetectorLibrary::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
Definition at line 159 of file DetectorLibrary.cpp.
§ at() [4/4]
DetectorLibrary::reference DetectorLibrary::at |
( |
DetectorLibrary::size_type |
idx | ) |
|
|
virtual |
§ ChannelFromIndex()
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
Definition at line 284 of file DetectorLibrary.cpp.
§ get()
§ GetIndex()
DetectorLibrary::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
Definition at line 202 of file DetectorLibrary.cpp.
§ GetKnownDetectors()
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
§ GetLocations() [1/2]
const 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
Definition at line 172 of file DetectorLibrary.cpp.
§ GetLocations() [2/2]
const 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
Definition at line 176 of file DetectorLibrary.cpp.
§ GetModules()
unsigned int DetectorLibrary::GetModules |
( |
| ) |
const |
|
inline |
§ GetNextLocation() [1/2]
int DetectorLibrary::GetNextLocation |
( |
const Identifier & |
id | ) |
const |
§ GetNextLocation() [2/2]
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
Definition at line 191 of file DetectorLibrary.cpp.
§ GetPhysicalModules()
unsigned int DetectorLibrary::GetPhysicalModules |
( |
| ) |
const |
|
inline |
§ GetUsedDetectors()
const set< string > & DetectorLibrary::GetUsedDetectors |
( |
void |
| ) |
const |
§ HasValue() [1/2]
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
Definition at line 206 of file DetectorLibrary.cpp.
§ HasValue() [2/2]
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
Definition at line 210 of file DetectorLibrary.cpp.
§ LoadXml()
void DetectorLibrary::LoadXml |
( |
| ) |
|
|
private |
Load the XML configuration file
These attributes have reserved meaning, all other attributes of [Channel] are treated as tags
Create basic place for TreeCorrelator
Definition at line 46 of file DetectorLibrary.cpp.
§ MakeKey()
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
Definition at line 288 of file DetectorLibrary.cpp.
§ ModuleFromIndex()
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
Definition at line 280 of file DetectorLibrary.cpp.
§ operator=()
§ PrintMap()
void DetectorLibrary::PrintMap |
( |
void |
| ) |
const |
§ PrintUsedDetectors()
void DetectorLibrary::PrintUsedDetectors |
( |
RawEvent & |
rawev | ) |
const |
Print out the used detectors
- Parameters
-
[in] | rawev | : the raw event to print from |
Definition at line 253 of file DetectorLibrary.cpp.
§ push_back()
void DetectorLibrary::push_back |
( |
const Identifier & |
x | ) |
|
|
virtual |
§ Set() [1/2]
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 |
Definition at line 214 of file DetectorLibrary.cpp.
§ Set() [2/2]
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 |
Definition at line 237 of file DetectorLibrary.cpp.
§ emptyLocations
set< int > DetectorLibrary::emptyLocations |
|
staticprivate |
§ instance
§ knownDetectors
std::set<std::string> DetectorLibrary::knownDetectors |
|
private |
§ locations
std::map< mapkey_t, std::set<int> > DetectorLibrary::locations |
|
private |
collection of all used locations for a given type and subtype
Definition at line 141 of file DetectorLibrary.hpp.
§ numModules
unsigned int DetectorLibrary::numModules |
|
private |
§ numPhysicalModules
unsigned int DetectorLibrary::numPhysicalModules |
|
private |
§ usedSubtypes
std::set<std::string> DetectorLibrary::usedSubtypes |
|
private |
§ usedTypes
std::set<std::string> DetectorLibrary::usedTypes |
|
private |
The documentation for this class was generated from the following files: