All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IICARUSChannelMap.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////
2 ///
3 /// \file IICARUSChannelMap
4 ///
5 /// \brief Interface class for hardware/software channel mapping
6 /// for ICARUS
7 ///
8 /// \author T. Usher
9 ///
10 ////////////////////////////////////////////////////////////////////////
11 
12 #ifndef IICARUSChannelMap_H
13 #define IICARUSChannelMap_H
14 
15 #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
16 
17 #include <vector>
18 #include <string>
19 
20 namespace icarusDB {
21 
22 using ReadoutIDVec = std::vector<unsigned int>;
23 using ChannelPlanePair = std::pair<unsigned int, unsigned int>;
24 using ChannelPlanePairVec = std::vector<ChannelPlanePair>;
25 
26 using DigitizerChannelChannelIDPair = std::pair<size_t,size_t>;
27 using DigitizerChannelChannelIDPairVec = std::vector<DigitizerChannelChannelIDPair>;
28 
29 using ChannelPlanePair = std::pair<unsigned int, unsigned int>;
30 using ChannelPlanePairVec = std::vector<ChannelPlanePair>;
31 using SlotChannelVecPair = std::pair<unsigned int, ChannelPlanePairVec>;
32 using TPCReadoutBoardToChannelMap = std::map<unsigned int, SlotChannelVecPair>;
33 
34 class IICARUSChannelMap //: private lar::EnsureOnlyOneSchedule
35 {
36 public:
37  virtual ~IICARUSChannelMap() noexcept = default;
38 
39  // Section to access fragment to board mapping
40  virtual bool hasFragmentID(const unsigned int) const = 0;
41  /// Returns the number of TPC fragment IDs known to the service.
42  virtual unsigned int nTPCfragmentIDs() const = 0;
43  virtual const std::string& getCrateName(const unsigned int) const = 0;
44  virtual const ReadoutIDVec& getReadoutBoardVec(const unsigned int) const = 0;
46 
47  // Section to access channel information for a given board
48  virtual bool hasBoardID(const unsigned int) const = 0;
49  /// Returns the number of TPC board IDs known to the service.
50  virtual unsigned int nTPCboardIDs() const = 0;
51  virtual unsigned int getBoardSlot(const unsigned int) const = 0;
52  virtual const ChannelPlanePairVec& getChannelPlanePair(const unsigned int) const = 0;
53 
54  // Section for recovering PMT information
55  virtual bool hasPMTDigitizerID(const unsigned int) const = 0;
56  /// Returns the number of PMT fragment IDs known to the service.
57  virtual unsigned int nPMTfragmentIDs() const = 0;
58  virtual const DigitizerChannelChannelIDPairVec& getChannelIDPairVec(const unsigned int) const = 0;
59 
60  virtual unsigned int getSimMacAddress(const unsigned int) const = 0;
61  virtual unsigned int gettopSimMacAddress(const unsigned int) const = 0;
62 
63  virtual std::pair<double, double> getSideCRTCalibrationMap(int mac5, int chan) const = 0;
64 };
65 
66 } // end of namespace
67 
68 DECLARE_ART_SERVICE_INTERFACE(icarusDB::IICARUSChannelMap, SHARED)
69 
70 #endif
virtual unsigned int getSimMacAddress(const unsigned int) const =0
std::vector< ChannelPlanePair > ChannelPlanePairVec
virtual unsigned int gettopSimMacAddress(const unsigned int) const =0
std::vector< DigitizerChannelChannelIDPair > DigitizerChannelChannelIDPairVec
virtual unsigned int nTPCfragmentIDs() const =0
Returns the number of TPC fragment IDs known to the service.
std::vector< unsigned int > ReadoutIDVec
virtual const ReadoutIDVec & getReadoutBoardVec(const unsigned int) const =0
virtual const TPCReadoutBoardToChannelMap & getReadoutBoardToChannelMap() const =0
virtual const DigitizerChannelChannelIDPairVec & getChannelIDPairVec(const unsigned int) const =0
virtual const std::string & getCrateName(const unsigned int) const =0
virtual unsigned int nTPCboardIDs() const =0
Returns the number of TPC board IDs known to the service.
virtual bool hasBoardID(const unsigned int) const =0
virtual std::pair< double, double > getSideCRTCalibrationMap(int mac5, int chan) const =0
virtual const ChannelPlanePairVec & getChannelPlanePair(const unsigned int) const =0
virtual bool hasFragmentID(const unsigned int) const =0
virtual ~IICARUSChannelMap() noexcept=default
virtual unsigned int nPMTfragmentIDs() const =0
Returns the number of PMT fragment IDs known to the service.
std::pair< unsigned int, ChannelPlanePairVec > SlotChannelVecPair
std::map< unsigned int, SlotChannelVecPair > TPCReadoutBoardToChannelMap
std::pair< size_t, size_t > DigitizerChannelChannelIDPair
virtual unsigned int getBoardSlot(const unsigned int) const =0
virtual bool hasPMTDigitizerID(const unsigned int) const =0
std::pair< unsigned int, unsigned int > ChannelPlanePair