79     JParser<> zap(
"Auxiliary program to process AHRS data.");
 
   81     zap[
'f'] = 
make_field(inputFile,    
"output of JConvertDB -q ahrs");
 
   82     zap[
'n'] = 
make_field(numberOfEvents)                                    = JLimit::max();
 
   84     zap[
'c'] = 
make_field(ahrsFile,     
"output of JAHRSCalibration");
 
   86     zap[
'S'] = 
make_field(angle_deg,    
"maximal angle w.r.t. fit")          = 0.0;
 
   87     zap[
'T'] = 
make_field(T_s,          
"time window for averaging")         = 0.0;
 
   92   catch(
const exception &error) {
 
   93     FATAL(error.what() << endl);
 
  114   NOTICE(
"Magnetic declination " << getMagneticDeclination << endl);
 
  115   NOTICE(
"Meridian angle [rad] " << 
FIXED(5,3) << meridian << endl);
 
  134   for (JMultipleFileScanner_t::const_iterator file_name = inputFile.begin(); file_name != inputFile.end(); ++file_name) {
 
  136     STATUS(
"processing file " << *file_name << 
"... " << flush);
 
  145       const int    id         = parameters->
DOMID; 
 
  147       if (
is_valid(*parameters) && calibration.has(
id) && router.hasModule(
id)) {
 
  149         const JModule& module = router.getModule(
id);
 
  153           JCompass compass(*parameters, calibration.get(
id));
 
  155           compass.
correct(getMagneticDeclination(parameters->
UNIXTIME * 1.0e-3), meridian);
 
  159           data[id].push_back(element_type(parameters->
UNIXTIME * 1.0e-3, Q));
 
  166     if (angle_deg > 0.0) {
 
  168       for (map_type::iterator module = data.begin(); module != data.end(); ++module) {
 
  170         if (!module->second.empty()) {
 
  174           buffer_type::iterator       out = module->second.begin();       
 
  175           buffer_type::const_iterator 
in  = module->second.begin();       
 
  176           buffer_type::const_iterator p   = module->second.begin();       
 
  177           buffer_type::const_iterator q   = module->second.begin();       
 
  179           for (
int i = 0; i != NUMBER_OF_POINTS && q != module->second.end(); ++i, ++q) {}
 
  181           for (
int i = 0; i != NUMBER_OF_POINTS/2 && in != q; ++i, ++
in) {
 
  185             if (
getAngle(in->second, 
f1(in->first)) <= angle_deg) {
 
  191           for (++p; q++ != module->second.end(); ++p, ++
in) {
 
  195             if (
getAngle(in->second, 
f1(in->first)) <= angle_deg) {
 
  201           for ( ; in != module->second.end(); ++
in) {
 
  205             if (
getAngle(in->second, 
f1(in->first)) <= angle_deg) {
 
  211           module->second.erase(out, module->second.end());                
 
  215             out = module->second.begin();       
 
  217             for (p = module->second.begin(); p != module->second.end(); p = q) {
 
  219               for (q = p; q != module->second.end() && q->first - p->first < T_s; ++q) {}
 
  226                 out->first  = 
getAverage(t1.begin(), t1.end());
 
  227                 out->second = 
getAverage(q1.begin(), q1.end());
 
  237             module->second.erase(out, module->second.end());              
 
  247     const JPolicy policy(router, buffer.begin(), buffer.end());
 
  249     for (JPolicy::const_iterator module = policy.begin(); module != policy.end(); ++module) {
 
  250       for (JPolicy::mapped_type::const_iterator in = module->second.begin(); in != module->second.end(); ++
in) {
 
  251         for (map_type::mapped_type::const_iterator i = data[*in].begin(); i != data[*
in].end(); ++i) {
 
bool isORCADetector(const JDetectorHeader &header)
Check if given detector header is compatible with that of ORCA. 
 
Utility class to parse command line options. 
 
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions. 
 
static JARCAMagneticDeclination getARCAMagneticDeclination
Function object for magnetic declination at ARCA site. 
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
void correct(const double declination, const double meridian)
Correct compass for magnetic declination and meridian convergence angle. 
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member. 
 
int getFloor() const 
Get floor number. 
 
Data structure for a composite optical module. 
 
bool isARCADetector(const JDetectorHeader &header)
Check if given detector header is compatible with tat of ARCA. 
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance. 
 
JQuaternion3D getQuaternion(const JQuaternion &Q)
Get quaternion. 
 
JPolynome & set(const Args &...args)
Set values. 
 
static JZEROMagneticDeclination getZEROMagneticDeclination
Function object for zero magnetic declination. 
 
Router for direct addressing of module data in detector data structure. 
 
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
Long64_t counter_type
Type definition for counter. 
 
Auxiliary data structure for floating point format specification. 
 
static const double ARCA_MERIDIAN_CONVERGENCE_ANGLE_RAD
ARCA meridian convergence angle [rad]. 
 
static JORCAMagneticDeclination getORCAMagneticDeclination
Function object for magnetic declination at ORCA site. 
 
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
 
static const int COMPASS_DISABLE
Enable (disable) use of compass if this status bit is 0 (1);. 
 
const JPolynome f1(1.0, 2.0, 3.0)
Function. 
 
Auxiliary base class for interpolation of magnetic declination data obtained from website of NOAA...
 
bool has(const int bit) const 
Test PMT status. 
 
Auxiliary class to define policy for invalid modules. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values. 
 
Template definition for function evaluation of Legendre polynome. 
 
bool is_valid(const json &js)
Check validity of JSon data. 
 
Data structure for compass in three dimensions. 
 
Data structure for unit quaternion in three dimensions. 
 
Auxiliary base class for list of file names. 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
General purpose class for object reading from a list of file names. 
 
Auxiliary class to map module identifier to AHRS calibration. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
static const double ORCA_MERIDIAN_CONVERGENCE_ANGLE_RAD
ORCA meridian convergence angle [rad]. 
 
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
 
long long int UNIXTIME
[ms] 
 
Auxiliary data structure for return type of make methods. 
 
Auxiliary data structure to check validity of AHRS data.