File tree 3 files changed +29
-5
lines changed
3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 1
1
#include " CControl_Handler.hh"
2
2
#include " DAXHelpers.hh"
3
3
#include " V2718.hh"
4
+ #ifdef HASDDC10
4
5
#include " DDC10.hh"
6
+ #endif
5
7
#include " V1495.hh"
6
8
#include < bsoncxx/builder/stream/document.hpp>
7
9
8
10
CControl_Handler::CControl_Handler (std::shared_ptr<MongoLog>& log, std::string procname) : DAQController(log, procname){
9
11
fCurrentRun = fBID = fBoardHandle -1 ;
10
12
fV2718 = nullptr ;
11
13
fV1495 = nullptr ;
14
+ #ifdef HASDDC10
12
15
fDDC10 = nullptr ;
16
+ #endif
13
17
fStatus = DAXHelpers::Idle;
14
18
}
15
19
@@ -60,6 +64,7 @@ int CControl_Handler::Arm(std::shared_ptr<Options>& opts){
60
64
fBoardHandle = fV2718 ->GetHandle ();
61
65
fLog ->Entry (MongoLog::Local, " V2718 Initialized" );
62
66
67
+ #ifdef HASDDC10
63
68
// Getting options for DDC10 HEV module
64
69
std::vector<BoardType> dv = fOptions ->GetBoards (" DDC10" );
65
70
if (dv.size () == 1 ){
@@ -78,6 +83,7 @@ int CControl_Handler::Arm(std::shared_ptr<Options>& opts){
78
83
}
79
84
} else {
80
85
}
86
+ #endif // HASDDC10
81
87
82
88
std::vector<BoardType> mv = fOptions ->GetBoards (" V1495" );
83
89
if (mv.size () == 1 ){
@@ -124,9 +130,11 @@ int CControl_Handler::Stop(){
124
130
}
125
131
fV2718 .reset ();
126
132
}
133
+ fV1495 .reset ();
134
+ #ifdef HASDDC10
127
135
// Don't need to stop the DDC10 but just clean up a bit
128
136
fDDC10 .reset ();
129
- fV1495 . reset ();
137
+ # endif
130
138
131
139
fStatus = DAXHelpers::Idle;
132
140
return 0 ;
Original file line number Diff line number Diff line change 4
4
#include " DAQController.hh"
5
5
6
6
class V2718 ;
7
- class DDC10 ;
8
7
class V1495 ;
8
+ #ifdef HASDDC10
9
+ class DDC10 ;
10
+ #endif
9
11
10
12
class CControl_Handler : public DAQController {
11
13
public:
@@ -20,8 +22,10 @@ public:
20
22
private:
21
23
22
24
std::unique_ptr<V2718> fV2718 ;
23
- std::unique_ptr<DDC10> fDDC10 ;
24
25
std::unique_ptr<V1495> fV1495 ;
26
+ #ifdef HASDDC10
27
+ std::unique_ptr<DDC10> fDDC10 ;
28
+ #endif
25
29
26
30
int fStatus ;
27
31
int fCurrentRun ;
Original file line number Diff line number Diff line change @@ -3,14 +3,26 @@ CC = g++
3
3
CXX = g++
4
4
CFLAGS = -Wall -Wextra -pedantic -pedantic-errors -g -DLINUX -std=c++17 -pthread $(shell pkg-config --cflags libmongocxx)
5
5
CPPFLAGS := $(CFLAGS )
6
- LDFLAGS = -lCAENVME -lstdc++fs -llz4 -lblosc $(shell pkg-config --libs libmongocxx) $(shell pkg-config --libs libbsoncxx) -lexpect -ltcl8.6
6
+ IS_READER0 := false
7
+ ifeq "$(shell hostname) " "reader0"
8
+ IS_READER0 = true
9
+ endif
10
+ LDFLAGS = -lCAENVME -lstdc++fs -llz4 -lblosc $(shell pkg-config --libs libmongocxx) $(shell pkg-config --libs libbsoncxx)
7
11
# LDFLAGS_CC = ${LDFLAGS} -lexpect -ltcl8.6
8
12
9
- SOURCES_SLAVE = $(wildcard * .cc)
13
+ SOURCES_SLAVE = CControl_Handler.cc DAQController.cc f1724.cc main.cc MongoLog.cc \
14
+ Options.cc StraxFormatter.cc V1495.cc V1724.cc V1724_MV.cc \
15
+ V1730.cc V2718.cc
10
16
OBJECTS_SLAVE = $(SOURCES_SLAVE:%.cc=%.o )
11
17
DEPS_SLAVE = $(OBJECTS_SLAVE:%.o=%.d )
12
18
EXEC_SLAVE = redax
13
19
20
+ ifeq "$(IS_READER0 ) " "true"
21
+ SOURCES_SLAVE += DDC10.cc
22
+ CFLAGS += -DHASDDC10
23
+ LDFLAGS += -lexpect -ltcl8.6
24
+ endif
25
+
14
26
all : $(EXEC_SLAVE )
15
27
16
28
$(EXEC_SLAVE ) : $(OBJECTS_SLAVE )
You can’t perform that action at this time.
0 commit comments