41int main(
int argc, 
char **argv)
 
   47  JLimit_t&       numberOfEvents = inputFile.getLimit();
 
   58    JParser<> zap(
"Program to monitor AHRS data.");
 
   60    zap[
'f'] = 
make_field(inputFile,    
"output of JConvertDB -q ahrs");
 
   64    zap[
'c'] = 
make_field(ahrsFile,     
"output of JAHRSCalibration");
 
   65    zap[
'p'] = 
make_field(precision,    
"precision")   = 1.0e-6;
 
   72  catch(
const exception &error) {
 
   73    FATAL(error.what() << endl);
 
   95  TH1D  h0(
"h0", NULL, 100, 0.0, 5.0);
 
   96  TH1D  h1(
"h1", NULL, 100, 0.0, 5.0);
 
   97  TH2D  h2(
"h2", NULL, 100, 0.0, 5.0, 100, 0.0, 5.0);
 
   98  TH1D  hn(
"hn", NULL, 100, 0.0, 1.0e4);
 
  100  TH2D* ha = 
new TH2D(
"ha", NULL, 
 
  101                      string.size(), -0.5, 
string.size() - 0.5,
 
  104  for (Int_t i = 1; i <= ha->GetXaxis()->GetNbins(); ++i) {
 
  105    ha->GetXaxis()->SetBinLabel(i, 
MAKE_CSTRING(
string.at(i-1)));
 
  107  for (Int_t i = 1; i <= ha->GetYaxis()->GetNbins(); ++i) {
 
  111  TH2D* hb = (TH2D*) ha->Clone(
"hb");
 
  112  TH2D* hc = (TH2D*) ha->Clone(
"hc");
 
  113  TH2D* hd = (TH2D*) ha->Clone(
"hd");
 
  119  for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  120    if (module->getFloor() != 0) {
 
  121      data[module->getID()] = 0;
 
  131    const JAHRS* parameters = inputFile.
next();
 
  162          buffer[parameters->
DOMID].push_back(*parameters);
 
  165                << setw(16)   << parameters->
UNIXTIME << 
' ' 
  166                << setw(4)    << parameters->
DUID     << 
' ' 
  167                << setw(2)    << parameters->
FLOORID  << 
' ' 
  186    if (i->second.size() >= 2u) {
 
  190      for (vector<JAHRS>::const_iterator q = i->second.begin(), p = q++; q != i->second.end(); ++p, ++q) {
 
  192        if ((fabs(p->AHRS_A0 - q->AHRS_A0) > precision ||
 
  193             fabs(p->AHRS_A1 - q->AHRS_A1) > precision ||
 
  194             fabs(p->AHRS_A2 - q->AHRS_A2) > precision)
 
  196            (fabs(p->AHRS_H0 - q->AHRS_H0) > precision ||
 
  197             fabs(p->AHRS_H1 - q->AHRS_H1) > precision ||
 
  198             fabs(p->AHRS_H2 - q->AHRS_H2) > precision)) {
 
  206  for (map_type::const_iterator i = data.begin(); i != data.end(); ++i) {
 
  217    for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  219      map_type::const_iterator p = data.find(module->getID());
 
  221      if (p != data.end()) {
 
  222        cout << 
getLabel(module->getLocation()) << 
' ' << setw(8) << module->getID() << 
' ' << setw(6) << p->second << endl;
 
  231    out << h0  << h1  << h2 << hn;
 
  232    out << *ha << *hb << *hc << *hd;
 
  240  int n_no_data_compass = 0;
 
  241  for (map_type::const_iterator i = data.begin(); i != data.end(); ++i) {
 
  250  for (vector<double>::const_iterator i = Q.begin(); i != Q.end(); ++i) {
 
  252         << 
FIXED(5,0) << n_no_data_compass << 
' '