36 TAxis *axis = h->GetXaxis();
37 int bins = axis->GetNbins();
38 Axis_t min = axis->GetXmin();
39 Axis_t max = axis->GetXmax();
40 Axis_t width = (max - min) / bins;
41 Axis_t *new_bins =
new Axis_t[bins + 1];
43 for (
int i = 0; i <= bins; i++) {
44 new_bins[i] = TMath::Power(10, min + i * width);
47 axis->Set(bins, new_bins);
52int main(
int argc,
char **argv) {
55 JLimit_t& nSlices = inputFile.getLimit();
64 zap[
'f'] =
make_field(inputFile ,
"Path to input file ");
71 catch(
const exception &error) {
72 ERROR(error.what() << endl);
77 TH1D* h1 =
new TH1D(
"rate_%", NULL, 100, -2, 2);
78 TH1D* h2 =
new TH1D(
"time_%", NULL, 1, -0.5, 0.5);
82 s->configure(inputFile);
85 JFrameIndexRange range (s->begin()->getFrameIndex() , s->rbegin()->getFrameIndex());
98 for ( ; scanner.
hasNext() && counter != inputFile.getLimit(); ++counter) {
102 for(JDAQTimeslice::const_iterator frame = slice->begin() ; frame != slice->end() ; ++frame) {
104 vector <int> pmt_hit_count (NUMBER_OF_PMTS , 0) ;
107 pmt_hit_count[hit->getPMT()]++;
117 for (
typename JManager < JDAQPMTIdentifier , TH1D >::const_iterator i = r.begin() ; i != r.end() ; ++i){
119 for(
int j=1 ;
j < i -> second -> GetNbinsX() ; ++
j){
121 double width = i->second->GetXaxis()->GetBinWidth(
j);
122 i -> second->SetBinContent(
j ,i->second->GetBinContent(
j)/width);
123 i -> second->SetBinError (
j ,i->second->GetBinError (
j)/width);
KM3NeT DAQ constants, bit handling, etc.
int main(int argc, char **argv)
Dynamic ROOT object management.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
ROOT TTree parameter settings of various packages.
Auxiliary class for multiplexing object iterators.
virtual bool hasNext() override
Check availability of next element.
virtual const pointer_type & next() override
Get next element.
Utility class to parse command line options.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
General purpose class for object reading from a list of file names.
Auxiliary interface for direct access of elements in ROOT TChain.
int getFrameIndex() const
Get frame index.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory.
std::set< JROOTClassSelector > getROOTClassSelection(const bool option=false)
Get ROOT class selection.
Long64_t counter_type
Type definition for counter.
KM3NeT DAQ data structures and auxiliaries.
double getFrameTime()
Get frame time duration.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary class for a type holder.
Auxiliary class to select ROOT class based on class name.
Auxiliary class to select JTreeScanner based on ROOT class name.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.