Jpp  debug
the software that should make you happy
JDAQHitRouter.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JDAQHITROUTER__
2 #define __JDETECTOR__JDAQHITROUTER__
3 
7 
8 
9 /**
10  * \file
11  * Direct access to PMT data in detector data structure for DAQ hits.
12  * \author mdejong
13  */
14 namespace JDETECTOR {}
15 namespace JPP { using namespace JDETECTOR; }
16 
17 namespace JDETECTOR {
18 
20 
21  /**
22  * Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structure for DAQ hits.
23  */
24  class JDAQHitRouter :
25  public JModuleRouter
26  {
27  public:
28 
30 
31  /**
32  * Constructor.
33  *
34  * \param detector detector
35  */
38  {}
39 
40 
41  /**
42  * Get module parameters.
43  *
44  * \param hit hit
45  * \return module parameters
46  */
47  const JModule& getModule(const JDAQKeyHit& hit) const
48  {
49  return getModule(hit.getModuleID());
50  }
51 
52 
53  /**
54  * Get PMT parameters.
55  *
56  * \param hit hit
57  * \return PMT parameters
58  */
59  const JPMT& getPMT(const JDAQKeyHit& hit) const
60  {
61  return getModule(hit).getPMT(hit.getPMT());
62  }
63 
64 
65  /**
66  * Get PMT channel.
67  *
68  * \param hit hit
69  * \return PMT channel
70  */
72  {
73  return JPMTChannel(getModule(hit).getLocation(), hit.getPMT());
74  }
75  };
76 }
77 
78 #endif
Direct access to module in detector data structure.
Data structure to uniquely identify PMT readout channel.
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
const JModule & getModule(const JDAQKeyHit &hit) const
Get module parameters.
const JPMT & getPMT(const JDAQKeyHit &hit) const
Get PMT parameters.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.
JDAQHitRouter(const JDetector &detector)
Constructor.
Detector data structure.
Definition: JDetector.hh:96
Router for direct addressing of module data in detector data structure.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Definition: JModule.hh:75
const JPMT & getPMT(const int index) const
Get PMT.
Definition: JModule.hh:172
Auxiliary class to uniquely identify PMT readout channel.
Definition: JPMTChannel.hh:35
Data structure for PMT geometry, calibration and status.
Definition: JPMT.hh:49
JPMT_t getPMT() const
Get PMT.
Definition: JDAQHit.hh:75
int getModuleID() const
Get module identifier.
file Auxiliary data structures and methods for detector calibration.
Definition: JAnchor.hh:12
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Detector file.
Definition: JHead.hh:227