13#include "antares-dataformat/TimeSlice.hh"
56 const double factor = 1.0e-3;
58 for (JDAQSummaryslice::const_iterator frame = summary.begin(); frame != summary.end(); ++frame) {
60 if (router.
hasModule(frame->getModuleID())) {
62 const int index = router.
getIndex(frame->getModuleID());
65 (*this)[index].put(frame->getRate(pmt, factor));
85 for (ExtendedSummary_TimeSlice::const_iterator frame = summary.begin(); frame != summary.end(); ++frame) {
89 const int index = router.
getIndex(frame->lcm_id());
91 const int count = frame->numberOfItemsOrg() << 4;
93 (*this)[index].put(count * factor);
115 JLimit_t& numberOfEvents = inputFile.getLimit();
119 double gridAngle_deg;
125 JParser<> zap(
"Example program to analyse summary data.");
138 catch(
const exception& error) {
143 if (roadWidth_m <= 0.0) {
FATAL(
"Invalid road width [m] " << roadWidth_m <<
endl); }
144 if (gridAngle_deg <= 0.0) {
FATAL(
"Invalid grid angle [deg] " << gridAngle_deg <<
endl); }
145 if (gridAngle_deg >= 90.0) {
FATAL(
"Invalid grid angle [deg] " << gridAngle_deg <<
endl); }
160 const JOmega3D omega(gridAngle_deg * PI/180.0);
167 for (
size_t i = 0; i != omega.size(); ++i) {
172 for (
size_t m2 = 0;
m2 !=
m1; ++
m2) {
180 const double x = p2.
getX() -
p1.getX();
181 const double y = p2.
getY() -
p1.getY();
183 if (sqrt(x*x + y*y) <= roadWidth_m) {
193 TH1D h1(
"h1",
NULL, 1000, 0.0, 1.0e3);
196 while (inputFile.hasNext()) {
200 const T* summary = inputFile.next();
202 const JRates buffer(router, *summary);
204 for (
size_t i = 0; i != omega.size(); ++i) {
208 for (
size_t m1 = 0;
m1 != buffer.size(); ++
m1) {
229 return (inputFile.getCounter() != 0 ?
true :
false);
Data structure for detector geometry and calibration.
General purpose messaging.
#define DEBUG(A)
Message macros.
Direct access to module in detector data structure.
int main(int argc, char **argv)
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
ROOT TTree parameter settings of various packages.
ExtendedSummary time slices.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
const int getIndex(const JObjectID &id) const
Get index of module.
Direction set covering (part of) solid angle.
Data structure for position in three dimensions.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
double getY() const
Get y position.
double getX() const
Get x position.
Template definition of a multi-dimensional oscillation probability interpolation table.
void setClock()
Set clock.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.