/*************************************************************************** * (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: TimeRegistrationTestDriver.cpp * * Description: Main Function to Independently Test TimeRegistration 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 "TimeRegistration.h" #include #include 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("/users/gats/home/cbrown/Projects/SOFIE/level1/src/SOFIELevel1.ini"); char *SOFIEdatafilename; SOFIEdatafilename = Cf.GetStr("TimeRegistration", "SOFIE_DATA_FILE"); L0.clear(); L1.clear(); L0.setEventNumber(1); ifstream SOFIEdata (SOFIEdatafilename); cout << SOFIEdatafilename << endl; while(!SOFIEdata.eof()){ //cout << "*"; //if(!n%20) cout << n << endl; SOFIEdata >> data[n]; n++; } //cout << endl; n--; 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 }; */ //n = sizeof(data)/sizeof(double); EventVar L0_EventTimes("L0_DetectorTimes", data, n); L0_EventTimes -= eventStartTime; L0_EventTimes *= 86400.0; eventStartTime *= 86400.0; L0.setEventStartTime(eventStartTime); L0.addEventVar(L0_EventTimes); TimeRegistration(L0, L1, Tmp, SD, Cf); return 0; }