59 zap[
'f'] =
make_field(inputFile ,
"Path to input file ");
60 zap[
'o'] =
make_field(outputFile ,
"Path to output file") =
"out.root";
61 zap[
's'] =
make_field(nSlices ,
"number of slices" ) = JLimit::max();
65 catch(
const exception &error) {
66 ERROR(error.what() << endl);
73 TH1D*
h1 =
new TH1D(
"rate_%", NULL, 100, -2, 2);
74 TH1D* h2 =
new TH1D(
"time_%", NULL, 1, -0.5, 0.5);
76 if (scanner.hasNext()){
78 h2->SetBins(range.second-range.first+1, -0.5, range.second-range.first + 0.5);
86 while (scanner.hasNext()) {
90 for(JDAQTimeslice::const_iterator frame = slice->begin() ; frame != slice->end() ; ++frame) {
95 pmt_hit_count[hit->getPMT()]++;
107 for(
int j=1 ;
j < i -> second -> GetNbinsX() ; ++
j){
109 double width = i->second->GetXaxis()->GetBinWidth(
j);
110 i -> second->SetBinContent(
j ,i->second->GetBinContent(
j)/width);
111 i -> second->SetBinError (
j ,i->second->GetBinError (
j)/width);
115 TFile out(outputFile.c_str(),
"recreate");
Utility class to parse command line options.
then for HISTOGRAM in h0 h1
Template definition for direct access of elements in ROOT TChain.
int getFrameIndex() const
Get frame index.
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
Auxiliary class to manage set of compatible ROOT objects (e.g.
Auxiliary class for defining the range of iterations of objects.
int getFrameIndex(const double t_ns)
Get frame index for a given time in ns.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double getFrameTime()
Get frame time duration.
General purpose class for object reading from a list of file names.
void copy(const Head &from, JHead &to)
Copy header from from to to.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
bool putObject(TDirectory *dir, const T &object)
Write object to ROOT directory.