5 #include <EyeEventHeader.hh>
15 <<
" Specify: List of input files, also with \"*\" etc. as well as number of events in output files" << endl;
17 std::cout <<
"Usage: " << argv[0] <<
" <files> [n-events]" << std::endl << std::endl;
22 main (
int argc,
char *argv[])
29 const int nSplit = atoi(argv[argc-1]);
31 if (nSplit <= 0 || nSplit>1e7) {
36 ifstream filelist(argv[1]);
38 while (filelist.good()) {
41 getline(filelist, filename);
43 if (filename==
"" || filename[0] ==
'#')
47 const string nameOut = nameIn.substr(nameIn.rfind(
'/')+1, nameIn.length() - nameIn.rfind(
'/') - 6);
49 cout <<
"Reading file: " << nameIn <<
" writing to " << nameOut << endl;
54 unsigned int iOut = 0;
55 unsigned int iOutFile = 0;
61 unsigned int nstations = 0;
63 IoSdEvent sd =
event.Sd();
64 nstations = sd.NumberOfErrorZeroStation;
67 cout <<
" Event Id " <<
event.Id() <<
" ";
68 cout <<
" Nstations: " << setw(2) << nstations;
69 cout <<
" NEyes: " <<
event.Eyes.size( ) << endl;
71 if (event.Eyes.size() == 0)
75 bool hasHEorCO =
false;
76 AugerEvent::EyeIterator eye;
77 for(eye= event.EyesBegin(); eye!=
event.EyesEnd(); ++eye) {
79 if (eye->GetEventHeader()->GetEyeNo() >= 4)
83 cout <<
" eye: "<<eye->GetEventHeader()->GetEyeNo()
84 <<
" sec: " << eye->GetEventHeader()->GetTimeStamp()->GetGPSSec()
92 if (((iOut++) % nSplit) == 0 || !out) {
98 name << nameOut <<
"_split" << (iOutFile++) <<
".root";
99 cout <<
"Opening new output file: " << name.str() << endl;
104 out->Write(event,
"VERBOSE");
113 cout <<
" closing file " << endl;
vector< t2list > out
output of the algorithm: a list of clusters
int main(int argc, char *argv[])