/*************************************************************************** * (C) Copyright 2006 by GATS, Inc. * 11864 Canon Blvd., STE 101 * Newport News, VA 23606 * * All Rights Reserved. No part of this software or publication may be * reproduced, stored in a retrieval system, or transmitted, in any form * or by any means, electronic, mechanical, photocopying, recording, or * otherwise without the prior written permission of GATS, Inc. * *************************************************************************** * * Filename: auxInputTestDriver.cpp * * Description: Main Function to Independently Test auxInputData Module * Registration Routines for an individual event * * Author: C.W.Brown * (757)952-1048 * (757)873-5920 * * ***************************************************************************/ #include "Event.h" #include "EventVar.h" #include "ConfigFile.h" //#include //#include //#include #include "AuxDataInput.h" #include #include #define tpLatStart -65.459474 #define tpLonStart 2.169229 #define tpAltStart 300.00 #define tpLatDelta -0.000032 #define tpLonDelta -0.0004875 #define tpAltDelta -0.1391 using namespace std; int main(int argc, char *argv[]) { int n=0; double data[8000]; double eventStartTime; Event L0; Event L1; Event Tmp; Event SD; ConfigFile Cf("../../tests/SOFIELevel1/SOFIELevel1.ini"); char *SOFIEdatafilename; SOFIEdatafilename = Cf.GetStr("TimeRegistration", "SOFIE_DATA_FILE"); L0.clear(); L1.clear(); SD.clear(); Tmp.clear(); L0.setEventNumber(1); ifstream SOFIEdata (SOFIEdatafilename); cout << SOFIEdatafilename << endl; while(!SOFIEdata.eof()){ //cout << "*" ; if(!n%40) cout << n << endl; SOFIEdata >> data[n]; n++; } n--; cout << endl; eventStartTime = data[0]; /* double data[] = {13504.0396765046, 13504.0396770833, 13504.0396776620, 13504.0396782407, 13504.0396788194, 13504.0396793981, 13504.0396799768, 13504.0396805556, 13504.0396811343, 13504.0396817130, 13504.0396822917, 13504.0396828704, 13504.0396834491, 13504.0396840278, 13504.0396846064, 13504.0396851852, 13504.0396857639, 13504.0396863426, 13504.0396869213, 13504.0396875000, 13504.0396880787, 13504.0396886574, 13504.0396892361, 13504.0396898148, 13504.0396903935, 13504.0396909722, 13504.0396915509, 13504.0396921296, 13504.0396927083, 13504.0396932870, 13504.0396938657, 13504.0396944444, 13504.0396950232, 13504.0396956019, 13504.0396961806, 13504.0396967593, 13504.0396973380, 13504.0396979167, 13504.0396984954, 13504.0396990741 }; */ /* double data[] = {13323.0396765046, 13323.0396770833, 13323.0396776620, 13323.0396782407, 13323.0396788194, 13323.0396793981, 13323.0396799768, 13323.0396805556, 13323.0396811343, 13323.0396817130, 13323.0396822917, 13323.0396828704, 13323.0396834491, 13323.0396840278, 13323.0396846064, 13323.0396851852, 13323.0396857639, 13323.0396863426, 13323.0396869213, 13323.0396875000, 13323.0396880787, 13323.0396886574, 13323.0396892361, 13323.0396898148, 13323.0396903935, 13323.0396909722, 13323.0396915509, 13323.0396921296, 13323.0396927083, 13323.0396932870, 13323.0396938657, 13323.0396944444, 13323.0396950232, 13323.0396956019, 13323.0396961806, 13323.0396967593, 13323.0396973380, 13323.0396979167, 13323.0396984954, 13323.0396990741 }; */ //int n = sizeof(data)/sizeof(double); double *data2, *data3, *data4; data2 = new double[n]; data3 = new double[n]; data4 = new double[n]; for(int i=0; i L0_DetectorTimes("L0_DetectorTimes", data, n); L0_DetectorTimes-=eventStartTime; eventStartTime *=86400.0; L0.setEventStartTime(eventStartTime); L0.addEventVar(L0_DetectorTimes); EventVar L1_TPLat("L1_TPLat", data2, n); L1.addEventVar(L1_TPLat); EventVar L1_TPLon("L1_TPLon", data3, n); L1.addEventVar(L1_TPLon); EventVar L1_TPAlt("L1_TPAlt", data4, n); L1.addEventVar(L1_TPAlt); cout << "Running AuxDataInput..." << endl; int status = AuxDataInput(L0, L1, Tmp, SD, Cf); cout << "Finished..." << status << endl; return 0; }