File router for fast addressing of summary data.
More...
#include <JSummaryFileRouter.hh>
File router for fast addressing of summary data.
The member method JSummaryFileRouter::update should be used to update the internal router for a given event.
The member method JSummaryFileRouter::getRate can then be used to obtain the measured singles rate for a given PMT.
Definition at line 37 of file JSummaryFileRouter.hh.
◆ JSummaryFileRouter()
JSUPPORT::JSummaryFileRouter::JSummaryFileRouter |
( |
const std::string & |
file_name, |
|
|
const double |
rate_Hz |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
file_name | file name |
rate_Hz | default singles rate [Hz] |
Definition at line 47 of file JSummaryFileRouter.hh.
◆ getRate() [1/2]
double JSUPPORT::JSummaryFileRouter::getRate |
( |
| ) |
const |
|
inline |
◆ update()
void JSUPPORT::JSummaryFileRouter::update |
( |
const JDAQHeader & |
header | ) |
|
|
inline |
Update router.
- Parameters
-
Definition at line 72 of file JSummaryFileRouter.hh.
74 static Long64_t previous = -1;
76 const Long64_t index = this->find(header);
80 if (index != previous) {
87 for (JDAQSummaryslice::const_iterator i =
summary->begin(); i !=
summary->end(); ++i) {
88 router.put(i->getModuleID(),
router.getDefaultAddress());
92 summary = this->getEntry(index);
98 for (JDAQSummaryslice::const_iterator i =
summary->begin(); i !=
summary->end(); ++i) {
◆ getAddress()
◆ getSummaryFrame()
◆ hasSummaryFrame()
Has summary frame.
- Parameters
-
- Returns
- true if module present; else false
Definition at line 137 of file JSummaryFileRouter.hh.
◆ getRate() [2/2]
◆ rate_Hz
double JSUPPORT::JSummaryFileRouter::rate_Hz |
|
protected |
◆ router
◆ summary
The documentation for this class was generated from the following file:
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.