39 using namespace KM3NETDAQ;
49 JParser<> zap(
"Example program to histogram string and floor hits.");
54 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
59 catch(
const exception& error) {
60 FATAL(error.what() << endl);
84 TH1D
h1(
"h1", NULL, 100, 0.0, 1.0e1);
88 range.getUpperLimit(), 1 - 0.5,
range.getUpperLimit() + 0.5));
90 for (Int_t i = 1; i <= H2->GetXaxis()->GetNbins(); ++i) {
91 H2->GetXaxis()->SetBinLabel(i,
MAKE_CSTRING(
string.at(i-1)));
93 for (Int_t i = 1; i <= H2->GetYaxis()->GetNbins(); ++i) {
97 TH2D* h3 = (TH2D*) H2->Clone(
"h3");
99 while (inputFile.hasNext()) {
101 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
112 const JPMTChannel& channel = router.getPMTChannel(*hit);
117 if (hit->hasTriggerBit(i)) {
133 const JPMTChannel& channel = router.getPMTChannel(*hit);
Utility class to parse command line options.
Auxiliary class to uniquely identify PMT readout channel.
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
int getFloor() const
Get floor number.
#define MAKE_CSTRING(A)
Make C-string.
then for HISTOGRAM in h0 h1
double getTime(const Hit &hit)
Get true time of hit.
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...
Auxiliary class for defining the range of iterations of objects.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getIndex()
Get index for user I/O manipulation.
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
int getString() const
Get string number.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
Router for mapping of string identifier to index.
General purpose class for object reading from a list of file names.
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
Auxiliary class to set-up Hit.
const JLimit & getLimit() const
Get limit.
JTriggerCounter_t next()
Increment trigger counter.