27 int main(
int narg,
char* argv[])
36 unsigned int NEvents = 0;
37 unsigned int NEvents_read = 0;
47 std::cout <<
"Don't know how to process HDDM class \"" <<
HDDM_CLASS <<
"\"!" << std::endl;
51 std::cout << std::endl;
52 std::cout <<
" " << NEvents_read <<
" events read, " << NEvents <<
" events written" << std::endl;
64 for (
int i=1; i < narg; i++) {
100 INFILENAMES.push_back(argv[i]);
104 if (INFILENAMES.size() == 0) {
105 std::cout << std::endl <<
"You must enter a filename!"
106 << std::endl << std::endl;
136 std::cout << std::endl <<
"Usage:" << std::endl;
137 std::cout <<
" hddm_cull_events [-oOutputfile] [-sNeventsToSkip] [-kNeventsToKeep] file1.hddm file2.hddm ..." << std::endl;
138 std::cout << std::endl;
139 std::cout <<
"options:" << std::endl;
140 std::cout <<
" -oOutputfile Set output filename (def. culled.hddm)" << std::endl;
141 std::cout <<
" -sNeventsToSkip Set number of events to skip (def. 0)" << std::endl;
142 std::cout <<
" -kNeventsToKeep Set number of events to keep (def. 1)" << std::endl;
143 std::cout <<
" -eSingleEvent Keep only the single, specified event (file pos.)" << std::endl;
144 std::cout <<
" -ESingleEvent Keep only the single, specified event (event number)" << std::endl;
145 std::cout <<
" -r Input file is in REST format (def. hdgeant format)" << std::endl;
146 std::cout <<
" -I Enable data integrity checks on output HDDM stream" << std::endl;
147 std::cout <<
" -C Enable compression on output HDDM stream" << std::endl;
148 std::cout << std::endl;
149 std::cout <<
" This will copy a continguous set of events from the combined event streams" << std::endl;
150 std::cout <<
" into a seperate output file. The primary use for this would be to copy" << std::endl;
151 std::cout <<
" a single, problematic event into a seperate file for easier debugging." << std::endl;
152 std::cout << std::endl;
153 std::cout <<
" If the -eNNN option is used then only a single event is extracted" << std::endl;
154 std::cout <<
" (the NNN-th event) and written to a file with the name evtNNN.hddm." << std::endl;
155 std::cout <<
" Note that the event is counted from the begining of the file, starting" << std::endl;
156 std::cout <<
" with \"1\". This does NOT look at the event number stored in the event itself." << std::endl;
157 std::cout <<
" " << std::endl;
158 std::cout <<
" If the -ENNN option is used then only a single event is extracted" << std::endl;
159 std::cout <<
" (the specified event number) and written to a file with the name evtNNN.hddm." << std::endl;
160 std::cout <<
" " << std::endl;
161 std::cout << std::endl;
172 std::cerr << std::endl <<
"SIGINT received (" <<
QUIT <<
")....."
unsigned int EVENTS_TO_KEEP
void Process_s(unsigned int &NEvents, unsigned int &NEvents_read)
unsigned int SPECIFIC_EVENT_TO_KEEP
sprintf(text,"Post KinFit Cut")
void Process_r(unsigned int &NEvents, unsigned int &NEvents_read)
void ParseCommandLineArguments(int &narg, char *argv[])
bool HDDM_USE_COMPRESSION
unsigned int SPECIFIC_OFFSET_TO_KEEP
bool HDDM_USE_INTEGRITY_CHECKS
vector< char * > INFILENAMES
unsigned int EVENTS_TO_SKIP
void Usage(JApplication &app)
int main(int argc, char *argv[])