Skip to content

Commit

Permalink
- update
Browse files Browse the repository at this point in the history
  • Loading branch information
murat committed Oct 14, 2024
1 parent b6b1333 commit b6010a5
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 27 deletions.
7 changes: 4 additions & 3 deletions config/pasha/mu2edaq09_pcie0.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ int init_run_configuration(DtcGui* X) {

X->fNDtcs = 1; // 2; // installed on a machine

dtc[0].fName = "CFO";
dtc[0].fName = "DTC" ; // "CFO";
dtc[0].fPcieAddr = 0;
dtc[0].fLinkMask = 0x2; // start from 2 DTCs on link0
gSystem->Setenv("CFOLIB_CFO","0");
dtc[0].fLinkMask = 0x1; // start from 2 DTCs on link0
//gSystem->Setenv("CFOLIB_CFO","0");
gSystem->Setenv("DTCLIB_DTC","0");

// dtc[0].fName = "DTC";
// dtc[0].fPcieAddr = 1;
Expand Down
4 changes: 2 additions & 2 deletions config/pasha/mu2edaq09_pcie1.C
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ int init_run_configuration(DtcGui* X) {

dtc[0].fName = "DTC";
dtc[0].fPcieAddr = 1;
// dtc[0].fLinkMask = 0x111;
dtc[0].fLinkMask = 0x00111111; // ROC6: link1 stopped responding
dtc[0].fLinkMask = 0x111;
// dtc[0].fLinkMask = 0x00111111; // ROC6: link1 stopped responding
dtc[0].fReadoutMode = 1; // 0:patterns 1:digis
gSystem->Setenv("DTCLIB_DTC","1");

Expand Down
32 changes: 16 additions & 16 deletions doc/control_roc.org
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#startup:fold
#+startup:fold -*- buffer-read-only:t -*-
* ------------------------------------------------------------------------------
* source code: https://github.com/bonventre/trackerScripts/blob/master/control_ROC.py
* local repo : file:~mu2etrk/products/trackerScripts
Expand Down Expand Up @@ -252,20 +252,20 @@ set_digi_rw -s 0

* TODO command implementation over the fiber

| command | status | comments |
|--------------------+--------+----------------------------------------------------|
| digi_rw | | |
|--------------------+--------+----------------------------------------------------|
| readSPI | OK | implemented |
| find_alignment | | implemented readout, parsing yet to be implemented |
| set_preamp_thresh | | |
| measure_thresholds | | |
| pulser_on | | |
| readDeviceID | | |
| set_digi_rw | | shouldn't need, all goes over the fiber |
| rates | | |
| read | | |
|--------------------+--------+----------------------------------------------------|
| command | status | comments |
|--------------------+--------+-----------------------------------------|
| digi_rw | | |
|--------------------+--------+-----------------------------------------|
| readSPI | OK | implemented |
| find_alignment | | implemented by Ed, minor wrinkle |
| set_preamp_thresh | | |
| measure_thresholds | | ok |
| pulser_on | | |
| readDeviceID | | |
| set_digi_rw | | shouldn't need, all goes over the fiber |
| rates | | |
| read | | |
|--------------------+--------+-----------------------------------------|
* ------------------------------------------------------------------------------
* setting the pulser frequency (Richie)
- 60 kHz: digi_rw -h 0 -a 85 -d 1 -w 1 # 31.29 MHz / (2**9+1) = 60.9941520468 kHz)
Expand All @@ -282,7 +282,7 @@ Ctrl-C
#+end_src
exiting at this point is important, otherwise the serial port will not work properly

** 2) run diagnostics, use whatever USB port the TS1 is on
** 2) to load thresholds, run diagnostics.py, use the USB port the TS1 is on
example of [[file:settings_pasha.dat]]
- all gains - at 370
- thresholds - around 400
Expand Down
8 changes: 5 additions & 3 deletions doc/otsdaq_mu2e_tracker.org
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,11 @@ readDeviceID
('DRAC ROC ID #', '7a7fb')
** [[file:roc_id_1b561.org][ROC ID 1b561]] : <2024-05-09 Thu> installed at TS1
** [[file:roc_id_805d6.org][ROC ID 805d6]] : <2024-02-25 Sun> installed at TS2
* test stands TS0, TS1, TS2
** last update <2024-07-15 Mon>
** powering up the test stands (Vadim):
* test stands TS0, TS1, TS2
- located in G291
| TS2 | TS0 | TS1 |
** last update <2024-09-26 Thu>
** powering up the test stands (Vadim):
https://docs.google.com/document/d/1theA9NIRA5XeUUPVuFGVhU7NddPljgaGznR9aMu-Fv8/edit?usp=sharing
#+begin_src
mu2e@trackerpi5:~/trackerScripts$ power --list
Expand Down
5 changes: 4 additions & 1 deletion otsdaq-mu2e-tracker/Gui/DtcGui.hh
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ public:
DtcData_t* fActiveDtc;

int fNRocs;

//-----------------------------------------------------------------------------
// fields set from GUI
//-----------------------------------------------------------------------------
TGNumberEntry* fNEvents; // DTC , CFO emulation
TGNumberEntry* fEWLength; // DTC , CFO emulation
TGNumberEntry* fFirstTS; // DTC , CFO emulation
Expand Down Expand Up @@ -338,6 +340,7 @@ public:
void read_subevents ();
void reset_roc ();

void set_ew_length ();
void set_nevents ();
void set_emulate_cfo ();
void set_roc_readout_mode();
Expand Down
26 changes: 26 additions & 0 deletions otsdaq-mu2e-tracker/Gui/DtcGui_commands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,32 @@ void DtcGui::set_nevents() {
cout.rdbuf( oldCoutStreamBuf );
}

//-----------------------------------------------------------------------------
void DtcGui::set_ew_length() {
// TString cmd;

DtcTabElement_t* dtel = fDtcTel+fActiveDtcID;
int roc = dtel->fActiveRocID;

streambuf* oldCoutStreamBuf = cout.rdbuf();
ostringstream strCout;
cout.rdbuf(strCout.rdbuf());

TDatime x1; *fTextView << x1.AsSQLString() << Form(" %s: DTC ID: %i roc: %i\n",__func__,fActiveDtcID,roc);
//-----------------------------------------------------------------------------
// CFO doesn't have ROC's
//-----------------------------------------------------------------------------
int ew_length = 0;
try {
ew_length = fEWLength->GetIntNumber();
}
catch (...) { *fTextView << Form("ERROR : coudn't read EW Length ... BAIL OUT",roc) << std::endl; }

TDatime x2; *fTextView << x2.AsSQLString() << strCout.str() << Form(" %s DONE ew_length = %10i\n",__func__,ew_length);
fTextView->ShowBottom();
cout.rdbuf( oldCoutStreamBuf );
}

//-----------------------------------------------------------------------------
void DtcGui::set_emulate_cfo() {
// TString cmd;
Expand Down
4 changes: 2 additions & 2 deletions otsdaq-mu2e-tracker/Gui/DtcGui_gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ void DtcGui::BuildGui(const TGWindow *Parent, UInt_t Width, UInt_t Height) {
TGNumberFormat::kNEANonNegative,
TGNumberFormat::kNELLimitMinMax,
0, 100000);
fEWLength->Connect("ValueSet(Long_t)", "MyMainFrame", this, "DoSetlabel()");
(fEWLength->GetNumberEntry())->Connect("ReturnPressed()","MyMainFrame", this,"DoSetlabel()");
fEWLength->Connect("ValueSet(Long_t)", "MyMainFrame", this, "set_ew_length()");
(fEWLength->GetNumberEntry())->Connect("ReturnPressed()","MyMainFrame", this,"set_ew_length()");

fButtonsFrame->AddFrame(fEWLength, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
//-----------------------------------------------------------------------------
Expand Down

0 comments on commit b6010a5

Please sign in to comment.