34 using namespace JSUPERNOVA;
 
   44 int main(
int argc, 
char **argv) {
 
   56     JParser<> zap(
"Auxiliary program to test generation of L0 background.");
 
   58     zap[
'f'] = 
make_field(inputFile,         
"input file (output from JRipple).");
 
   60     zap[
'T'] = 
make_field(duration_ms,          
"duration in ms of the background sample.")           = 500;
 
   61     zap[
'N'] = 
make_field(outNumberOfLines,  
"number of lines of the simulated (output) detector") = 115;
 
   65   catch(
const exception &error) {
 
   66     FATAL(error.what() << endl);
 
   69   TFile* 
in = TFile::Open(inputFile.c_str(), 
"exist");
 
   71   if (
in == NULL || !
in->IsOpen()) {
 
   72     FATAL(
"File: " << inputFile << 
" not opened." << endl);
 
   75   NOTICE(
"Initialising generator." << endl);
 
   81   NOTICE(
"File loaded." << endl);
 
   83   int T_ms = duration_ms;
 
   88   int inNumberOfLines = 1;
 
  100   NOTICE(
"Generation SEQ" << endl);
 
  102   for (
int i = 0; 
i < 10; 
i++) {
 
  105     for (
int j = 0; 
j < T_ms; 
j++) {
 
  106       RT_SEQ[
i]->Fill(
j, seq[0][
j]);
 
  107       NC_SEQ[
i]->Fill(j, seq[1][j]);
 
  113   NOTICE(
"Generation SHF" << endl);
 
  115   for (
int i = 0; 
i < 10; 
i++) {
 
  118     for (
int j = 0; 
j < T_ms; 
j++) {
 
  120       RT_SHF[
i]->Fill(
j, shf[0][
j]);
 
  121       NC_SHF[
i]->Fill(j, shf[1][j]);
 
  126   NOTICE(
"Generation H2D + FIT" << endl);
 
  132   for (
int j = 0; 
j < T_ms; 
j++) {
 
  133     RT_FIT[
"SG_1"]->Fill(
j, fit1[0][
j]);
 
  136   NOTICE(
"Generation H2D + FIT - rebin = 5" << endl);
 
  143   for (
size_t j = 0; 
j < fit5[0].size(); 
j++) {
 
  144     cout << fit5[0][
j] << endl;
 
  145     RT_FIT[
"SG_5"]->Fill(
j, fit5[0][
j]);
 
  163   TDirectory* dseq = out.mkdir(
"SEQ");
 
  164   TDirectory* dshf = out.mkdir(
"SHF");
 
  165   TDirectory* dfit = out.mkdir(
"FIT");
 
Utility class to parse command line options. 
 
int main(int argc, char *argv[])
 
void configureTimeWindow(const int T_ms)
Configure the duration of an output sample. 
 
void setSeed(const UInt_t uSeed=0)
Set TRandom seed. 
 
void configureRatio(const int inputNumberOfLines, const int outputNumberOfLines)
Configure generation ratio. 
 
Dynamic ROOT object management. 
 
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
bg_type generate()
Generate sample of L0 background L0 data are randomly sampled from a single L0 dataset. 
 
Class to emulate L0 background for an arbitrarily sized detector. 
 
bg_type generate_shuffled(bool randomizeRun=false)
Generate sample of L0 background The sampling of the L0 data is not sequential but random within the ...
 
void Write(TDirectory &out, const bool wm=false)
Write objects to file. 
 
General purpose messaging. 
 
Auxiliary class to define a range between two values. 
 
Utility class to parse command line options. 
 
bg_type generate_fitted(int rb=1)
Generate fitted L1 sample. 
 
h2d_t * generate_H2D(int rb=1)
Generate 2D sample. 
 
This file provides a class to emulate a L0 (L1) background on the ms time scale for an arbitrarily si...
 
KM3NeT DAQ constants, bit handling, etc. 
 
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