1 #ifndef __JTIMESLICE__JRANDOMTIMESLICE__ 
    2 #define __JTIMESLICE__JRANDOMTIMESLICE__ 
   62         for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
 
   64           if (!module->empty()) {
 
   66             buffer.
reset(module->size());
 
   72             simbad(*module, buffer, *(this->rbegin()));
 
  115       for (
iterator frame = this->begin(); frame != this->end(); ++frame) {
 
  117         if (!frame->empty()) {
 
  120           for (
size_t i = 0; i != 
N; ++i) {
 
  130             T_max[hit->getPMT()] = hit->getT();
 
  135            const size_t N_i = (T_max[i] + T_step) / T_step;
 
  137             if (N_i < N_max[i]) {
 
  142           sort(N_max.begin(), N_max.end());                      
 
  144           for (
size_t i = 0, L = 0; i != N_max.size(); ++i) {
 
  149               for (
size_t i = M - L - 1; i != 0; --i) {
 
  150                 std::swap(index[L + i], index[L + gRandom->Integer(i+1)]);
 
  164           for (
size_t in = 0; 
in != M; ++
in) {
 
  166             const size_t  out   = index[
in];
 
  167             buffer_type&  zbuf  = buffer[out];
 
  170             const JTDC_t  T_out = out * T_step;
 
  172             for ( ; hit != frame->end() && hit->
getT() < T_in + T_step; ++hit) {
 
  180           for (
size_t i = 0, number_of_hits = 0; i != M; ++i) {
 
  182             memcpy(frame->data() + number_of_hits, buffer[i].data(), buffer[i].size() * 
sizeof(
JDAQHit)); 
 
  184             number_of_hits += buffer[i].size();
 
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. 
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
JTDC_t getT() const 
Get time. 
JPMT_t getPMT() const 
Get PMT. 
unsigned int JTDC_t
leading edge [ns] 
int getFrameIndex() const 
Get frame index. 
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const 
Generate hits. 
JTOT_t getToT() const 
Get time-over-threshold. 
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. 
double getTimeSinceRTS(const int frame_index)
Get time in ns since last RTS for a given frame index. 
JRandomTimeslice(const JDAQChronometer &chronometer, const JDetectorSimulator &simbad)
Constructor. 
Base class class for generation of time slice data. 
Auxiliaries for creation of time slice data. 
KM3NeT DAQ constants, bit handling, etc. 
static const int NUMBER_OF_PMTS
Total number of PMTs in module. 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] 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
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.