85 B2INFO(
"Root2Raw: event() started.");
93 int* evtbuf = (
int*) malloc(MAXEVTSIZE);
116 for (
int i = 0; i < svdarray.
getEntries(); i++) {
118 RawSVD* svd = svdarray[i];
120 memcpy(databuf, svd->GetBuffer(0), svd->GetBlockNwords(0)*
sizeof(
int));
121 nwords += svd->GetBlockNwords(0);
122 databuf += svd->GetBlockNwords(0);
128 for (
int i = 0; i < cdcarray.
getEntries(); i++) {
130 RawCDC* cdc = cdcarray[i];
132 memcpy(databuf, cdc->GetBuffer(0), cdc->GetBlockNwords(0)*
sizeof(
int));
133 nwords += cdc->GetBlockNwords(0);
134 databuf += cdc->GetBlockNwords(0);
140 for (
int i = 0; i < toparray.
getEntries(); i++) {
142 RawTOP* top = toparray[i];
144 memcpy(databuf, top->GetBuffer(0), top->GetBlockNwords(0)*
sizeof(
int));
145 nwords += top->GetBlockNwords(0);
146 databuf += top->GetBlockNwords(0);
152 for (
int i = 0; i < aricharray.
getEntries(); i++) {
156 memcpy(databuf, arich->GetBuffer(0), arich->GetBlockNwords(0)*
sizeof(
int));
157 nwords += arich->GetBlockNwords(0);
158 databuf += arich->GetBlockNwords(0);
164 for (
int i = 0; i < eclarray.
getEntries(); i++) {
166 RawECL* ecl = eclarray[i];
168 memcpy(databuf, ecl->GetBuffer(0), ecl->GetBlockNwords(0)*
sizeof(
int));
169 nwords += ecl->GetBlockNwords(0);
170 databuf += ecl->GetBlockNwords(0);
176 for (
int i = 0; i < klmarray.
getEntries(); i++) {
178 RawKLM* klm = klmarray[i];
188 for (
int i = 0; i < ftswarray.
getEntries(); i++) {
222 nwords += trl.GetTrlNwords();
229 hdr.SetNumNodesinPacket(nblock);
232 rhdr.
SetBuffer(cdcarray[0]->GetBuffer(0));
233 hdr.SetEventNumber(rhdr.
GetEveNo());
242 if (m_expno != 0 && m_runno != 0) {
243 hdr.SetExpNum(m_expno);
244 hdr.SetRunNum(m_runno);
248 memcpy(databuf, trl.GetBuffer(), trl.GetTrlNwords()*
sizeof(
int));
250 write(m_file, evtbuf, nwords *
sizeof(
int));
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.