Skip to content

Commit 0358aa3

Browse files
committed
Add stream_windows definition
1 parent cc8f648 commit 0358aa3

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

framework/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ STREAM_LINK_LIBRARY(Stream
127127

128128
if(APPLE)
129129
target_compile_definitions(Stream PUBLIC STREAM_AARCH64)
130+
elseif(MSVC)
131+
target_compile_definitions(Stream PUBLIC STREAM_WINDOWS)
130132
endif()
131133

132134
foreach(dir base dogma get4 hadaq mbs nx)

framework/hadaq/TrbProcessor.cxx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414
#include "dogma/defines.h"
1515

16-
#define RAWPRINT( args ...) if(IsPrintRawData()) printf( args )
16+
#ifdef STREAM_WINDOWS
17+
#define RAWPRINT()
18+
#else
19+
#define RAWPRINT( args ... ) if(IsPrintRawData()) printf( args )
20+
#endif
1721

1822
unsigned hadaq::TrbProcessor::gNumChannels = 65;
1923
unsigned hadaq::TrbProcessor::gEdgesMask = 0x1;
@@ -247,7 +251,7 @@ int hadaq::TrbProcessor::CreateTDC(unsigned id1, unsigned id2, unsigned id3, uns
247251
case 3: tdcid = id4; break;
248252
default: tdcid = id1; break;
249253
}
250-
if (tdcid == 0)
254+
if (tdcid == 0)
251255
continue;
252256

253257
if (GetTDC(tdcid, true)) {
@@ -292,7 +296,7 @@ int hadaq::TrbProcessor::CreateTDC5(unsigned id1, unsigned id2, unsigned id3, un
292296
case 3: tdcid = id4; break;
293297
default: tdcid = id1; break;
294298
}
295-
if (tdcid == 0)
299+
if (tdcid == 0)
296300
continue;
297301

298302
if (GetTDC(tdcid, true)) {
@@ -578,14 +582,14 @@ bool hadaq::TrbProcessor::DogmaBufferScan(const base::Buffer &buf)
578582
}
579583

580584
base::Buffer buf;
581-
585+
582586
// copy tu with header, decode inside
583587
buf.makereferenceof(tu, tu->GetSize());
584588

585589
buf().kind = trigtype;
586590
buf().boardid = dataid;
587-
buf().format = 5; // use 5 for TDC5
588-
591+
buf().format = 5; // use 5 for TDC5
592+
589593
tdcproc->AddNextBuffer(buf);
590594
tdcproc->SetNewDataFlag(true);
591595

@@ -599,7 +603,7 @@ bool hadaq::TrbProcessor::DogmaBufferScan(const base::Buffer &buf)
599603
uint32_t coarse0 = tu->GetLocalTrigTime() & 0x7ff;
600604

601605
// printf(" Tu 0x%x proc %p payloadlen %u epoch0 %07x coarse0 %03x\n", dataid, tdcproc, datalen, (unsigned) epoch0, (unsigned) coarse0);
602-
606+
603607
base::Buffer buf;
604608
buf.makenew((datalen + 2) * 4);
605609
uint32_t *ptr = (uint32_t *)buf.ptr();

0 commit comments

Comments
 (0)