5 #ifndef __DETECTORLIBRARY_HPP_
6 #define __DETECTORLIBRARY_HPP_
28 virtual const_reference
at(DetectorLibrary::size_type mod,
29 DetectorLibrary::size_type ch)
const;
33 virtual const_reference
at(DetectorLibrary::size_type idx)
const;
39 virtual reference
at(DetectorLibrary::size_type mod,
40 DetectorLibrary::size_type ch);
44 virtual reference
at(DetectorLibrary::size_type idx);
60 const std::set<int> &
GetLocations(
const std::string &type,
61 const std::string &subtype)
const;
71 const std::string &subtype)
const;
76 size_type
GetIndex(
int mod,
int chan)
const;
94 bool HasValue(
int mod,
int chan)
const;
138 mapkey_t
MakeKey(
const std::string &type,
const std::string &subtype )
const;
150 #endif // __DETECTORLIBRARY_HPP_
int GetNextLocation(const Identifier &id) const
A class to define a library of detectors known to the analysis.
Definition: DetectorLibrary.hpp:19
void Set(int index, const Identifier &value)
virtual void push_back(const Identifier &x)
DetectorLibrary()
Default Constructor.
int ModuleFromIndex(int index) const
int ChannelFromIndex(int index) const
size_type GetIndex(int mod, int chan) const
const std::set< int > & GetLocations(const Identifier &id) const
mapkey_t MakeKey(const std::string &type, const std::string &subtype) const
const std::set< std::string > & GetKnownDetectors(void)
std::map< mapkey_t, std::set< int > > locations
collection of all used locations for a given type and subtype
Definition: DetectorLibrary.hpp:140
bool HasValue(int mod, int chan) const
virtual ~DetectorLibrary()
Defines identifying information for channels.
virtual const_reference at(DetectorLibrary::size_type mod, DetectorLibrary::size_type ch) const
DetectorLibrary & operator=(DetectorLibrary const &)
Define copy constructor.
const std::set< std::string > & GetUsedDetectors(void) const
static DetectorLibrary * instance
the static instance of the class
Definition: DetectorLibrary.hpp:129
std::set< std::string > usedTypes
used types
Definition: DetectorLibrary.hpp:146
void PrintMap(void) const
std::set< std::string > usedSubtypes
used subtypes
Definition: DetectorLibrary.hpp:147
unsigned int GetModules() const
Definition: DetectorLibrary.hpp:89
static std::set< int > emptyLocations
dummy locations to return when map key does not exist
Definition: DetectorLibrary.hpp:141
std::string mapkey_t
typedef for a mapkey
Definition: DetectorLibrary.hpp:123
unsigned int numPhysicalModules
number of physical modules
Definition: DetectorLibrary.hpp:144
unsigned int numModules
number of modules
Definition: DetectorLibrary.hpp:143
The all important raw event.
Definition: RawEvent.hpp:46
unsigned int GetPhysicalModules() const
Definition: DetectorLibrary.hpp:87
std::set< std::string > knownDetectors
known detectors in the analysis
Definition: DetectorLibrary.hpp:148
Channel identification.
Definition: Identifier.hpp:23
void PrintUsedDetectors(RawEvent &rawev) const
Header file for the rawevent.