Commit bf84b293 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Branch with class RawEvent added in read_binary_DRS application.

parent 7b3acf5f
This diff is collapsed.
...@@ -20,7 +20,7 @@ RawData::~RawData() { ...@@ -20,7 +20,7 @@ RawData::~RawData() {
void RawData::Reset() { void RawData::Reset() {
for (Int_t i = 0; i < 1024; i++) { for (Int_t i = 0; i < NCELLS; i++) {
Amp[i] = 0; Amp[i] = 0;
Time[i] = 0; Time[i] = 0;
} }
...@@ -29,7 +29,7 @@ void RawData::Reset() { ...@@ -29,7 +29,7 @@ void RawData::Reset() {
} }
void RawData::Print() { void RawData::Print() {
for (Int_t i = 0; i < 1024; i++) { for (Int_t i = 0; i < NCELLS; i++) {
cout << Amp[i] << endl; cout << Amp[i] << endl;
// Time[i] = 0; // Time[i] = 0;
} }
......
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
using std::cout; using std::cout;
using std::endl; using std::endl;
#define NCELLS 1024
class RawData { class RawData {
private: private:
Double_t Amp[1024]; Double_t Amp[NCELLS];
Double_t Time[1024]; Double_t Time[NCELLS];
public: public:
RawData(); RawData();
...@@ -36,6 +38,15 @@ public: ...@@ -36,6 +38,15 @@ public:
return Time; return Time;
} }
void SetAmp(Double_t a, Int_t i) {
if (i >=NCELLS) {
cout << "chren'" << endl;
return;
}
Amp[i] = a;
return;
}
void Print(); void Print();
}; };
......
...@@ -59,11 +59,11 @@ libData.so: $(DATAOBJS) ...@@ -59,11 +59,11 @@ libData.so: $(DATAOBJS)
@echo 'Finished building target: $@' @echo 'Finished building target: $@'
@echo ' ' @echo ' '
read_binary_DRS4: $(CONVERTDRS4)/read_binary.cpp read_binary_DRS4: libData.so $(CONVERTDRS4)/read_binary.cpp
@echo 'Building target: $@' @echo 'Building target: $@'
@echo 'Invoking: GCC C++ Linker' @echo 'Invoking: GCC C++ Linker'
# $(CC) -L $(ROOTLIBS) -shared -o"libData.so" $(DATAOBJS) $(DATALIBS) # $(CC) -L $(ROOTLIBS) -shared -o"libData.so" $(DATAOBJS) $(DATALIBS)
$(CC) -o $(CONVERTDRS4)/read_binary_DRS4 $(CONVERTDRS4)/read_binary.cpp -lm `root-config --cflags --libs` $(CC) -o $(CONVERTDRS4)/read_binary_DRS4 $(CONVERTDRS4)/read_binary.cpp -lm `root-config --cflags --libs` -L $(PWD) -lData -Wl,-rpath,$(PWD)
@echo 'Finished building target: $@' @echo 'Finished building target: $@'
@echo ' ' @echo ' '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment