Commit 59447c0e authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Fichier oublie: Ajout programme p4vdblist.cc pour lister la description des...

Fichier oublie: Ajout programme p4vdblist.cc pour lister la description des fichiers de visibilites pour un run (repertoire), Reza 15/07/2018
parent 3292a996
// Utilisation de SOPHYA pour faciliter les tests ...
#include "sopnamsp.h"
#include "machdefs.h"
/* ----------------------------------------------------------
Projet BAORadio/PAON4 - (C) LAL/IRFU 2008-2015
Programme pour lister les fichiers de visibilites pour un run (repertoire)
Reza, Juillet 2018
---------------------------------------------------------- */
// include standard c/c++
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <string>
#include "pexceptions.h"
#include "array.h"
#include "histats.h"
#include "timestamp.h"
// include lecteur de fichiers visibilites
#include "p4autils.h"
#include "visip4reader.h"
int Usage(void)
{
cout<<"--- p4vdblist.cc : liste des fichiers de visibilites \n"<<endl;
cout<<"Usage: p4vdblist DataDirectoryPath \n";
cout<<endl;
return 1;
}
//----------------------------------------------------
int main(int narg, const char* arg[])
{
int rc=0;
// --- Decoding parameters
if (((narg>1)&&(strcmp(arg[1],"-h")==0))||(narg<2)) return Usage();
string path = arg[1];
cout << " p4vdblist/Info: reading Visibility data description file in "<<path<<endl;
P4VisMtxDBDescReader p4vdb(path);
P4Coords p4c;
int serstart, serend;
TimeStamp tustart, tuend;
double rastart, raend;
for(size_t k=0; k<p4vdb.size(); k++) {
p4vdb.getInfo(k, serstart, serend, tustart, tuend);
rastart=p4c.RAFromTimeTU(tustart);
raend=p4c.RAFromTimeTU(tuend);
cout << "["<<k<<"] : "<<" TUstart="<<tustart<<" TUend="<<tuend<<" ; "<<serstart<<" <=serialNum<= "<<serend<<endl;
cout << " .... "<<rastart<<" <= ra (hours) <= "<<raend<<endl;
}
cout << ">>>> p4vdblist.cc ------- END ----------- RC=" << rc << endl;
return rc;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment