Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JTrigger
JTestNBTrigger.cc
Go to the documentation of this file.
1
#include <iostream>
2
3
#include <
Jeep/JParser.hh
>
4
5
#include <
JDAQ/JDAQEventIO.hh
>
6
7
#include <
JSupport/JSupport.hh
>
8
#include <
JSupport/JSupportToolkit.hh
>
9
#include <
JSupport/JMultipleFileScanner.hh
>
10
11
#include <
JDetector/JDetector.hh
>
12
#include <
JDetector/JDetectorToolkit.hh
>
13
#include <
JDetector/JModuleRouter.hh
>
14
15
int
main
(
int
argc ,
char
** argv) {
16
using namespace
std;
17
using namespace
JPP;
18
using namespace
KM3NETDAQ;
19
20
JMultipleFileScanner<JDAQEvent>
in
;
21
22
string
detectorFile;
23
JDetector
detector
;
24
25
26
JParser<>
parser;
27
28
parser[
'f'
] =
make_field
(
in
);
29
parser[
'a'
] =
make_field
(detectorFile);
30
31
parser.read(argc , argv);
32
33
load
(detectorFile,
detector
);
34
35
const
JModuleRouter
router (
detector
);
36
37
while
(
in
.hasNext()) {
38
39
JDAQEvent
*
event
=
in
.next();
40
41
const
JModule
& triggeredModule = router.
getModule
(event->begin<
JDAQTriggeredHit
>()->
getModuleID
());
42
43
for
(
JDAQEvent::const_iterator<JDAQSnapshotHit>
hit = event->begin<
JDAQSnapshotHit
>() ; hit !=
event
->end<
JDAQSnapshotHit
>() ; ++hit) {
44
45
cout << triggeredModule.
getDistance
(router.
getModule
(hit->getModuleID())) <<
" "
<< triggeredModule.
getFloor
() <<
" "
<< router.
getModule
(hit->getModuleID()).getFloor() << endl;
46
}
47
}
48
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1493
KM3NETDAQ::JDAQKeyHit
DAQ key hit.
Definition:
JDAQKeyHit.hh:19
JSupport.hh
ROOT TTree parameter settings.
KM3NETDAQ::JDAQModuleIdentifier::getModuleID
int getModuleID() const
Get module identifier.
Definition:
JDAQModuleIdentifier.hh:72
JDETECTOR::JLocation::getFloor
int getFloor() const
Get floor number.
Definition:
JLocation.hh:145
JDETECTOR::JModuleRouter::getModule
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Definition:
JModuleRouter.hh:89
JDETECTOR::JModule
Data structure for a composite optical module.
Definition:
JModule.hh:50
JDETECTOR::JDetector
Detector data structure.
Definition:
JDetector.hh:80
KM3NETDAQ::JDAQEvent::const_iterator
Template const_iterator.
Definition:
JDAQEvent.hh:68
JDETECTOR::JModuleRouter
Router for direct addressing of module data in detector data structure.
Definition:
JModuleRouter.hh:34
in
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition:
JSirene.sh:45
JGEOMETRY3D::JVector3D::getDistance
double getDistance(const JVector3D &pos) const
Get distance to point.
Definition:
JVector3D.hh:269
JDetector.hh
Data structure for detector geometry and calibration.
JAANET::detector
Detector file.
Definition:
JHead.hh:130
KM3NETDAQ::JDAQEvent
DAQ Event.
Definition:
JDAQEvent.hh:30
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1954
KM3NETDAQ::JDAQTriggeredHit
DAQ triggered hit.
Definition:
JDAQTriggeredHit.hh:20
JSupportToolkit.hh
Support methods.
JDETECTOR::load
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
Definition:
JDetectorToolkit.hh:462
JMultipleFileScanner.hh
Scanning of objects from multiple files according a format that follows from the extension of each fi...
JModuleRouter.hh
Direct access to module in detector data structure.
JSUPPORT::JMultipleFileScanner
General purpose class for object reading from a list of file names.
Definition:
JMultipleFileScanner.hh:167
JParser.hh
Utility class to parse command line options.
JDetectorToolkit.hh
JDAQEventIO.hh
detector
detector
Definition:
examples/JDataFilter/JDataFilter.sh:104
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5