Jpp
JDAQHitRouter.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JDAQHITROUTER__
2 #define __JDETECTOR__JDAQHITROUTER__
3 
6 #include "JDAQ/JDAQKeyHit.hh"
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  */
36  JDAQHitRouter(const JDetector& detector) :
37  JModuleRouter(detector)
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(getReference().getID(),
75  JPMTReadoutAddress(hit.getPMT()));
76  }
77  };
78 }
79 
80 #endif
JDETECTOR::JPMTChannel
Auxiliary class to uniquely identify PMT readout channel.
Definition: JPMTChannel.hh:28
JDETECTOR::JDAQHitRouter::getModule
const JModule & getModule(const JDAQKeyHit &hit) const
Get module parameters.
Definition: JDAQHitRouter.hh:47
KM3NETDAQ::JDAQHit::getPMT
JPMT_t getPMT() const
Get PMT.
Definition: JDAQHit.hh:78
JDETECTOR::JModuleRouter::getModule
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition: JModuleRouter.hh:89
JDETECTOR::JDAQHitRouter::getPMTChannel
JPMTChannel getPMTChannel(const JDAQKeyHit &hit) const
Get PMT channel.
Definition: JDAQHitRouter.hh:71
KM3NETDAQ::JDAQModuleIdentifier::getModuleID
int getModuleID() const
Get module identifier.
Definition: JDAQModuleIdentifier.hh:72
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDETECTOR::JModuleLocation
Logical location of module.
Definition: JModuleLocation.hh:36
JDAQKeyHit.hh
JDETECTOR::JModule::getPMT
const JPMT & getPMT(const int index) const
Get PMT.
Definition: JModule.hh:173
JLANG::JReference::getReference
const JClass_t & getReference() const
Get reference to object.
Definition: JReference.hh:38
JDETECTOR::JDAQHitRouter::getPMT
const JPMT & getPMT(const JDAQKeyHit &hit) const
Get PMT parameters.
Definition: JDAQHitRouter.hh:59
JModuleRouter.hh
JDETECTOR::JModule
Data structure for a composite optical module.
Definition: JModule.hh:49
KM3NETDAQ::JDAQKeyHit
DAQ key hit.
Definition: JDAQKeyHit.hh:24
JDETECTOR::JPMT
Data structure for PMT geometry and calibration.
Definition: JPMT.hh:53
JPMTChannel.hh
JDETECTOR::JModuleRouter
Router for direct addressing of module data in detector data structure.
Definition: JModuleRouter.hh:34
JDETECTOR::JDetector
Detector data structure.
Definition: JDetector.hh:80
JDETECTOR::JDAQHitRouter::JDAQHitRouter
JDAQHitRouter(const JDetector &detector)
Constructor.
Definition: JDAQHitRouter.hh:36
JDETECTOR::JPMTReadoutAddress
Data structure for PMT readout address.
Definition: JPMTReadoutAddress.hh:27
JDETECTOR
Auxiliary classes and methods for detector calibration.
Definition: JAnchor.hh:12
JDETECTOR::JDAQHitRouter
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
Definition: JDAQHitRouter.hh:24