All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IChannelMapping.h
Go to the documentation of this file.
1 /**
2  * @file IChannelMapping.h
3  *
4  * @brief This provides an art tool interface definition for tools handle the channel mapping
5  * The idea is to be able to switch between postgres and sqlite implementations
6  *
7  * @author usher@slac.stanford.edu
8  *
9  */
10 #ifndef IChannelMapping_h
11 #define IChannelMapping_h
12 
13 // Framework Includes
14 #include "fhiclcpp/ParameterSet.h"
15 
16 //------------------------------------------------------------------------------------------------------------------------------------------
17 
18 namespace icarusDB
19 {
20  /**
21  * @brief IChannelMapping interface class definiton
22  */
24  {
25  public:
26  /**
27  * @brief Virtual Destructor
28  */
29  virtual ~IChannelMapping() noexcept = default;
30 
31  /**
32  * @brief Define the returned data structures for a mapping between TPC Fragment IDs
33  * and the related crate and readout information.
34  * Then define the function interface to fill these data structures
35  */
36  using ReadoutIDVec = std::vector<unsigned int>;
37  using CrateNameReadoutIDPair = std::pair<std::string,ReadoutIDVec>;
38  using TPCFragmentIDToReadoutIDMap = std::map<unsigned int, CrateNameReadoutIDPair>;
39 
41 
42  /**
43  * @brief Define the returned data structures for a mapping between TPC readout boards
44  * and the channel information
45  * Then define the function interface to fill these data structures
46  */
47  using ChannelPlanePair = std::pair<unsigned int, unsigned int>;
48  using ChannelPlanePairVec = std::vector<ChannelPlanePair>;
49  using SlotChannelVecPair = std::pair<unsigned int, ChannelPlanePairVec>;
50  using TPCReadoutBoardToChannelMap = std::map<unsigned int, SlotChannelVecPair>;
51 
53 
54  /**
55  * @brief Define the returned data structures for a mapping between PMT Fragment IDs
56  * and the related crate and readout information.
57  * Then define the function interface to fill these data structures
58  */
59  using DigitizerChannelChannelIDPair = std::pair<size_t,size_t>;
60  using DigitizerChannelChannelIDPairVec = std::vector<DigitizerChannelChannelIDPair>;
61  using FragmentToDigitizerChannelMap = std::map<size_t, DigitizerChannelChannelIDPairVec>;
62 
64 
65  /**
66  * @brief Define the returned data structures for a mapping between CRT hardware mac_address
67  * to the simulated mac_address.
68  * Then define the function interface to fill these data structures
69  */
70 
71  using CRTHWtoSimMacAddressPair = std::pair<unsigned int, unsigned int>;
72  using CRTChannelIDToHWtoSimMacAddressPairMap = std::map<unsigned int, CRTHWtoSimMacAddressPair>;
73 
75 
76 
77  using TopCRTHWtoSimMacAddressPairMap = std::map<unsigned int, unsigned int>;
78 
80 
81 
82  using SideCRTMac5ToChannelPair = std::pair<unsigned int, unsigned int>;
83  using SideCRTGainToPedPair = std::pair<double, double>;
84  using SideCRTChannelToCalibrationMap = std::map< SideCRTMac5ToChannelPair, SideCRTGainToPedPair >;
85 
87 
88 };
89 
90 } // namespace lar_cluster3d
91 #endif
virtual ~IChannelMapping() noexcept=default
Virtual Destructor.
std::pair< size_t, size_t > DigitizerChannelChannelIDPair
Define the returned data structures for a mapping between PMT Fragment IDs and the related crate and ...
virtual int BuildTPCReadoutBoardToChannelMap(TPCReadoutBoardToChannelMap &) const =0
std::pair< unsigned int, unsigned int > SideCRTMac5ToChannelPair
std::pair< unsigned int, unsigned int > ChannelPlanePair
Define the returned data structures for a mapping between TPC readout boards and the channel informat...
std::vector< ChannelPlanePair > ChannelPlanePairVec
std::map< unsigned int, CRTHWtoSimMacAddressPair > CRTChannelIDToHWtoSimMacAddressPairMap
std::vector< unsigned int > ReadoutIDVec
Define the returned data structures for a mapping between TPC Fragment IDs and the related crate and ...
std::pair< unsigned int, unsigned int > CRTHWtoSimMacAddressPair
Define the returned data structures for a mapping between CRT hardware mac_address to the simulated m...
std::map< unsigned int, SlotChannelVecPair > TPCReadoutBoardToChannelMap
std::pair< unsigned int, ChannelPlanePairVec > SlotChannelVecPair
std::pair< std::string, ReadoutIDVec > CrateNameReadoutIDPair
virtual int BuildTopCRTHWtoSimMacAddressPairMap(TopCRTHWtoSimMacAddressPairMap &) const =0
std::pair< double, double > SideCRTGainToPedPair
virtual int BuildTPCFragmentIDToReadoutIDMap(TPCFragmentIDToReadoutIDMap &) const =0
virtual int BuildSideCRTCalibrationMap(SideCRTChannelToCalibrationMap &) const =0
std::map< SideCRTMac5ToChannelPair, SideCRTGainToPedPair > SideCRTChannelToCalibrationMap
virtual int BuildCRTChannelIDToHWtoSimMacAddressPairMap(CRTChannelIDToHWtoSimMacAddressPairMap &) const =0
virtual int BuildFragmentToDigitizerChannelMap(FragmentToDigitizerChannelMap &) const =0
std::map< unsigned int, CrateNameReadoutIDPair > TPCFragmentIDToReadoutIDMap
std::vector< DigitizerChannelChannelIDPair > DigitizerChannelChannelIDPairVec
std::map< size_t, DigitizerChannelChannelIDPairVec > FragmentToDigitizerChannelMap
IChannelMapping interface class definiton.
std::map< unsigned int, unsigned int > TopCRTHWtoSimMacAddressPairMap