1 #ifndef __JTIMESLICE__JRANDOMTIMESLICE__ 
    2 #define __JTIMESLICE__JRANDOMTIMESLICE__ 
   63         for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
 
   65           if (!module->empty()) {
 
   67             buffer.
reset(module->size());
 
   73             simbad(*module, buffer, *(this->rbegin()));
 
  102       if (
N <   100) { 
N =   100; }                              
 
  103       if (
N > 50000) { 
N = 50000; }                              
 
  110       for (
iterator frame = this->begin(); frame != this->end(); ++frame) {
 
  112         if (!frame->empty()) {
 
  114           for (
size_t i = 0; 
i != 
N; ++
i) {
 
  121                                numeric_limits<JTDC_t>::max());   
 
  125             T_max[hit->getPMT()] = hit->getT();
 
  127             const int i = hit->getT() / Ts;
 
  129             buffer[
i].push_back(*hit);
 
  135             if (frame->testHighRateVeto(pmt)) {
 
  136               keep.insert(T_max[pmt] / Ts);
 
  146           for (
size_t in = 0; 
in != 
N; ++
in) {
 
  148             const size_t  out   = index [
in];
 
  152             const JTDC_t  T_out = out * Ts;
 
  154             for (buffer_type::iterator 
i = zbuf.begin(); 
i != zbuf.end(); ++
i, ++hit) {
 
  155               *hit = 
JDAQHit(
i->getPMT(), (
i->getT() - T_out) + T_in, 
i->getToT());
 
  185         for (
size_t i = 0; 
i != this->size(); ++
i) {
 
  191         for (
const size_t i2 : keep) {
 
  193           random_shuffle(i1, i2);
 
  198         random_shuffle(i1, this->size());
 
  210         for (
int i = i2 - 1; 
i > i1; --
i) {
 
  212           const int l = i1 + gRandom->Integer(
i - i1);
 
  214           std::swap((*
this)[
i], (*
this)[l]);
 
void reset(size_t size)
Reset buffers. 
 
Data structure for PMT data corresponding to a detector module. 
 
JRandomTimeslice()
Default constructor. 
 
Auxiliary class for TDC constraints. 
 
void random_shuffle(const std::set< size_t > &keep)
Randomly shuffle values between fixed indices. 
 
unsigned int JTDC_t
leading edge [ns] 
 
std::vector< JHitW0 > buffer_type
hits 
 
int getFrameIndex() const 
Get frame index. 
 
bool hasPMTSimulator() const 
Check availability of PMT simulator. 
 
double getFrameTime()
Get frame time duration. 
 
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer. 
 
bool hasK40Simulator() const 
Check availability of K40 simulator. 
 
bool hasCLBSimulator() const 
Check availability of CLB simulator. 
 
void random_shuffle(const int i1, const int i2)
Randomly shuffle values between given indices. 
 
double getTimeSinceRTS(const int frame_index)
Get time in ns since last RTS for a given frame index. 
 
Auxiliary data structure for randomisation of indices. 
 
JRandomTimeslice(const JDAQChronometer &chronometer, const JDetectorSimulator &simbad)
Constructor. 
 
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
 
Base class class for generation of time slice data. 
 
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
Auxiliaries for creation of time slice data. 
 
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const override
Generate hits. 
 
random_indices_t(const size_t N)
Constructor. 
 
KM3NeT DAQ constants, bit handling, etc. 
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
 
Timeslice with random data. 
 
Data frame of one optical module. 
 
void recycle(const double T_ns)
Recycle time slice by randomly shuffling time intervals of data.