/******************************************************************************/ /* */ /* MASK.CC */ /* */ /******************************************************************************/ // Excludes events which that are not fully inside of a specified segment list. // The segment list file should contain two column whitespace separate ASCII // text consisting of the start and stop time of each segment. // // mask segmentList inputEventList outputEventList // Shourov K. Chatterji // shourov@ligo.caltech.edu // $Id: mask.cc,v 1.1 2006/11/03 15:33:59 shourov Exp $ #include #include #include "eventlist.hh" int main(int argc, char **argv) { std::string segmentListFile; std::string inputEventListFile; std::string outputEventListFile; if (argc == 4) { segmentListFile = argv[1]; inputEventListFile = argv[2]; outputEventListFile = argv[3]; } else { std::cerr << "error: incorrect number of arguments" << std::endl; std::cerr << std::endl; std::cerr << "usage: mask segmentList inputEventList outputEventList" << std::endl; return 1; } event::EventStrictSegmentCoincidenceCriterion coincidenceCriterion; segment::SegmentList segmentList; segmentList.read(segmentListFile); event::EventList eventList; eventList.read(inputEventListFile); eventList.mask(segmentList, coincidenceCriterion); eventList.write(outputEventListFile); return 0; }