Example program to test JDETECTOR::JModuleMapper.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TProfile.h"
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JModuleMapper.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test JDETECTOR::JModuleMapper.
- Author
- mdejong
Definition in file JModuleMapper.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 24 of file JModuleMapper.cc.
34 JParser<> zap(
"Example program to test module mapping.");
42 catch(
const exception& error) {
43 FATAL(error.what() << endl);
55 catch(
const JException& error) {
62 TProfile h1(
"h1", NULL, 1001,-0.5, 1000.5);
66 for (
int i = 1;
i <= h1.GetNbinsX(); ++
i) {
68 const double x = h1.GetBinCenter(
i);
70 mapper.configure(JMaximalDistance(x));
72 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
73 h1.Fill(x, (Double_t) mapper.getList(*module).size());
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
do set_variable DETECTOR_TXT $WORKDIR detector