Jpp
18.0.1-rc.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JDAQ
JPrintLargestOverlay.cc
Go to the documentation of this file.
1
2
#include <string>
3
#include <iostream>
4
#include <iomanip>
5
6
#include "
JDAQ/JDAQEventIO.hh
"
7
8
#include "
JSupport/JSingleFileScanner.hh
"
9
#include "
JSupport/JSupport.hh
"
10
11
#include "
Jeep/JParser.hh
"
12
#include "
Jeep/JMessage.hh
"
13
14
15
/**
16
* \file
17
*
18
* Example program to find the largest event in a file.
19
* \author lnauta
20
*/
21
int
main
(
int
argc,
char
**argv)
22
{
23
using namespace
std;
24
using namespace
JPP;
25
using namespace
KM3NETDAQ;
26
27
JSingleFileScanner<JDAQEvent>
inputFile;
28
int
debug
;
29
30
try
{
31
32
JParser<>
zap(
"Example program to find the largest event in a file."
);
33
34
zap[
'f'
] =
make_field
(inputFile);
35
zap[
'd'
] =
make_field
(
debug
) = 1;
36
37
zap(argc, argv);
38
}
39
catch
(
const
exception& error) {
40
FATAL
(error.what() << endl);
41
}
42
43
44
unsigned
int
overlays = 0;
45
counter_type
index = -1;
46
47
while
(inputFile.hasNext()) {
48
49
STATUS
(
"event: "
<< setw(10) << inputFile.getCounter() <<
'\r'
);
DEBUG
(endl);
50
51
const
JDAQEvent
*
event
= inputFile.
next
();
52
53
if
(event->getOverlays() > overlays) {
54
overlays =
event
->getOverlays();
55
index = inputFile.getCounter() - 1;
56
}
57
58
}
59
STATUS
(endl);
60
61
cout <<
"Largest number of overlays "
<< overlays << endl;
62
cout <<
"JConvert -f "
<< inputFile.getFilename() <<
" -n "
<< index <<
":1"
<< endl;
63
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSupport.hh
ROOT TTree parameter settings of various packages.
STATUS
#define STATUS(A)
Definition:
JMessage.hh:63
JROOT::counter_type
Long64_t counter_type
Type definition for counter.
Definition:
JROOT/JCounter.hh:24
JSingleFileScanner.hh
Scanning of objects from a single file according a format that follows from the extension of each fil...
KM3NETDAQ::JDAQEvent
DAQ Event.
Definition:
JDAQEvent.hh:30
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JSUPPORT::JSingleFileScanner
Object reading from a list of files.
Definition:
JSingleFileScanner.hh:75
JDAQEventIO.hh
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
KM3NETDAQ::JDAQTriggerCounter::next
JTriggerCounter_t next()
Increment trigger counter.
Definition:
JDAQTriggerCounter.hh:121
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5