Skip to content

Commit

Permalink
Merge pull request #37 from HGCDAQ/shift-July14
Browse files Browse the repository at this point in the history
Improvements from shift version
  • Loading branch information
andreypz authored Jul 15, 2017
2 parents 76a9cb2 + 74f3524 commit 0128db0
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 108 deletions.
26 changes: 20 additions & 6 deletions producers/cmshgcal/STARTRUN_ALL
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ ! -d ./snapshots ]; then
mkdir -p ./snapshots;
fi

mkdir -p ./snapshots/run$NEWRUNNUM/;
#mkdir -p ./snapshots/run$NEWRUNNUM/;


printf '\033[1;32;48m \t STARTING DAQ LOCALLY\033[0m \n'
Expand Down Expand Up @@ -86,7 +86,7 @@ sleep 1
# euLog
###############
printf '\033[22;33m\t Logger \033[0m \n'
./euLog.exe -x 0 -y 550 -w 1500 -g 450 -r tcp://$HOSTIP:44000 &
./euLog.exe -x 0 -y 550 -w 1500 -g 450 -r tcp://$HOSTIP:$RCPORT &
sleep 2

######################################################################
Expand All @@ -105,9 +105,16 @@ sleep 2
# cmshgcal or RpiProducer
###############
printf '\033[22;33m\t cms hgcal *Rpi* Producer \033[0m \n'
#xterm -sb -sl 1000 -geom 80x600-280-900 -fn fixed -T "RPI Producer" -e './RpiProducer.exe -r tcp://$HOSTIP:$RCPORT' &
flog="../logs/Run${NEWRUNNUM}_RpiProducer_$dt.log"
nohup ./RpiProducer.exe -r tcp://$HOSTIP:$RCPORT > $flog 2>&1 &

#xterm -sb -sl 1000 -geom 80x600-200-900 -fn fixed -T "RPI Producer RDB2" -e './RpiProducer.exe -n RPI-BRD2 -r tcp://$HOSTIP:$RCPORT' &
#xterm -sb -sl 1000 -geom 80x600-300-900 -fn fixed -T "RPI Producer RDB3" -e './RpiProducer.exe -n RPI-BRD3 -r tcp://$HOSTIP:$RCPORT' &

flog="../logs/Run${NEWRUNNUM}_RpiProducer_RDB2_$dt.log"
nohup ./RpiProducer.exe -n RPI-BRD2 -r tcp://$HOSTIP:$RCPORT > $flog 2>&1 &
printf "The logs from the RPiProducer are in $flog file. \n"

flog="../logs/Run${NEWRUNNUM}_RpiProducer_RDB3_$dt.log"
nohup ./RpiProducer.exe -n RPI-BRD3 -r tcp://$HOSTIP:$RCPORT > $flog 2>&1 &
printf "The logs from the RPiProducer are in $flog file. \n"

sleep 2
Expand All @@ -116,7 +123,8 @@ sleep 2
# AHCAL producer
####################
printf '\033[22;33m\t caliceProducer-scintillator \033[0m \n'
#xterm -sb -sl 1000000 -geom 160x10-480-900 -fn fixed -T "CALICE AHCAL" -e "./AHCALProducer.exe -n CaliceSc -r tcp://$TLUIP:$RCPORT && read || read" &
#xterm -sb -sl 1000000 -geom 100x10-480-900 -fn fixed -T "CALICE AHCAL" -e "./AHCALProducer.exe -n CaliceSc -r tcp://$TLUIP:$RCPORT && read || read" &
#xterm -sb -sl 1000000 -geom 100x10-400-900 -fn fixed -T "CALICE AHCAL Two" -e "./AHCALProducer.exe -n CaliceSc-Two -r tcp://$TLUIP:$RCPORT && read || read" &
flog="../logs/Run${NEWRUNNUM}_AHCALProducer_$dt.log"
nohup ./AHCALProducer.exe -n CaliceSc -r tcp://$TLUIP:$RCPORT > $flog 2>&1 &
printf "The logs from the AHCALProducer are in $flog file. \n"
Expand All @@ -129,7 +137,12 @@ sleep 2
printf '\033[22;33m\t delay wire chamber Producer \033[0m \n'
#ssh -Y -T wc "xterm -sb -sl 1000 -geom 80x600-280-900 -fn fixed -T \"Delay Wire Chamber Producer\" -e \"/home/cmsdaq/DAQ/eudaq/bin/WireChamberProducer.exe -l INFO -r tcp://192.168.222.1:44000\"" &
flog="../logs/Run${NEWRUNNUM}_WireChamberProducer_$dt.log"
ssh -Y -T wc "killall WireChamberProducer.exe" &
sleep 1
nohup ssh -Y -T wc "/home/cmsdaq/DAQ/eudaq/bin/WireChamberProducer.exe -l INFO -r tcp://192.168.222.1:44000" > $flog 2>&1 &

echo "\n"

sleep 2


Expand All @@ -141,6 +154,7 @@ then
config_file="../producers/cmshgcal/conf/OnlineMon.conf"
#./HgcOnlineMon.exe -u 100 -rf -rs -sc 2 -c $config_file -tc 0 -r tcp://$HOSTIP:$RCPORT
nohup ./HgcOnlineMon.exe -u 100 -rf -rs -sc 2 -c $config_file -tc 0 -r tcp://$HOSTIP:$RCPORT > $flog 2>&1 &
#nohup ./HgcOnlineMon.exe -u 100 -rf -rs -sc 2 -c $config_file -tc 0 -r tcp://$HOSTIP:$RCPORT > $flog 2>&1 &
printf "The logs from the Online Monitor are in $flog file. \n"

else
Expand Down
59 changes: 52 additions & 7 deletions producers/cmshgcal/conf/AllInOneProducer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ SaveLevel = EXTRA
PrintLevel = DEBUG


[Producer.RPI]
[Producer.RPI-BRD2]
RDBOARD = 2
#RPI_1_IP = '127.0.0.1'
# svhgcal01:
#RPI_1_IP = '128.141.151.253'
# Main RPI on the ReadOut board::
RPI_1_IP = '192.168.222.113'
RPI_1_IP = '192.168.222.112'
# Spare RPI:
#RPI_1_IP = '192.168.222.99'

Expand All @@ -23,6 +24,50 @@ RPI_1_IP = '192.168.222.113'
#RPI_1_IP = '128.141.196.225'
#RPI_1_IP = '128.141.149.196'

# These should not be changed:
portTCP = '55211'
portUDP = '55212'

# Instead of IP addresses, we use aliases for SSH for clarity. The alias-to-IP-address correspondence is defined here: $HOME/.ssh/config
piSynch_IP = "piS"
piRDOUT1_IP = "pi1"
piRDOUT2_IP = "pi2"
piRDOUT3_IP = "pi3"
piRDOUT4_IP = "pi4"

# Mask for which RDOUT boards to configure, as a string of 1s and 0s. 1 = enable, 0 = disable; leftmost digit is assumed to correspond to the board with IP = piRDOUT1_IP. For example, "0010" enables configuring only piRDOUT3, "1100" configures piRDOUT1 and piRDOUT2, etc.
RDOUTMask = "0000"

# Hardcoded SKIROC configuration strings for individual RDOUT boards. The script is executed in the following format:
# source targetDirPath_Skirocs/resetConfiguration_Skirocs_exe_fileName INDICES_STRING
# where INDICES_STRING is the following:
# skirocIndices_RDOUT1 = "1 3 2 4"
# skirocIndices_RDOUT2 = "1 3 2 4"
# skirocIndices_RDOUT3 = "1 3 2 4"
# skirocIndices_RDOUT4 = "1 3 2 4"
skirocIndices_RDOUT1 = " "
skirocIndices_RDOUT2 = " "
skirocIndices_RDOUT3 = "0 1 2 3 4"
skirocIndices_RDOUT4 = " "

sourceDirPath_Synch = "/home/daq/forConfiguration_EUDAQ/sourceDir_Synch"
targetDirPath_Synch = "/home/pi/forConfiguration_EUDAQ/targetDir_Synch"
resetConfiguration_Synch_exe_fileName = "resetConfiguration_Synch.sh"
sourceDirPath_Readout = "/home/daq/forConfiguration_EUDAQ/sourceDir_Readout"
targetDirPath_Readout = "/home/pi/forConfiguration_EUDAQ/targetDir_Readout"
resetConfiguration_Readout_exe_fileName = "resetConfiguration_Readout.sh"
sourceDirPath_Skirocs = "/home/daq/forConfiguration_EUDAQ/sourceDir_Skirocs"
targetDirPath_Skirocs = "/home/pi/forConfiguration_EUDAQ/targetDir_Skirocs"
resetConfiguration_Skirocs_exe_fileName = "resetConfiguration_Skirocs.sh"


[Producer.RPI-BRD3]

RDBOARD = 3

# Main RPI on the ReadOut board::
RPI_1_IP = '192.168.222.113'

# These should not be changed:
portTCP = '55511'
portUDP = '55512'
Expand Down Expand Up @@ -59,6 +104,7 @@ sourceDirPath_Skirocs = "/home/daq/forConfiguration_EUDAQ/sourceDir_Skirocs"
targetDirPath_Skirocs = "/home/pi/forConfiguration_EUDAQ/targetDir_Skirocs"
resetConfiguration_Skirocs_exe_fileName = "resetConfiguration_Skirocs.sh"


[Producer.CaliceSc]
#FileLEDsettings ="F:\\LEDEUDAQ\\LED1.ini"
FileMode = 0
Expand Down Expand Up @@ -86,7 +132,7 @@ InsertDummyPackets = 1
#When RedirectInputFromFile is set, an existing raw raw data file is used as a fake input from detector
#RedirectInputFromFile="/home/calice/Desktop/EUDAQ2-testbeam2017February/data/detector_45015.raw"
#RedirectInputFromFile="../data/ahcal/detector_45131.raw"
#RedirectInputFromFile="../data/ahcal/rawAHCAL_00103__12p07p2017__18p06p17.raw"
#RedirectInputFromFile="/disk2_2TB/July2017_TB_data_ahcal/rawAHCAL_00106__12p07p2017__18p25p54.raw"
#EventBuildingMode selects what event building will be used and
#EventBuildingMode = "ROC"
EventBuildingMode = "TRIGGERID"
Expand All @@ -110,7 +156,6 @@ AHCALBXID0Offset = 2123
AHCALBXIDWidth = 160



[Producer.DWCs]
dataFilePrefix = "/home/cmsdaq/DAQ/eudaq/data/dwc_run_"
AcquisitionMode = 1
Expand All @@ -123,10 +168,10 @@ triggerMatchMode = 1
emptyEventEnable = 1
edgeDetectionMode = 2
timeResolution = 3
maxHitsPerEvent = 64
maxHitsPerEvent = 9
enabledChannels = 0xFFFF
windowWidth = 60
windowOffset = -30
windowWidth = 0x40
windowOffset = -20


defaultTimestamp = -999
Expand Down
59 changes: 56 additions & 3 deletions producers/cmshgcal/conf/PedestalProducer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,65 @@ SaveLevel = EXTRA
PrintLevel = DEBUG


[Producer.RPI]
[Producer.RPI-BRD2]
RDBOARD = 2
#RPI_1_IP = '127.0.0.1'
# svhgcal01:
#RPI_1_IP = '128.141.151.253'
# Main RPI on the ReadOut board::
RPI_1_IP = '192.168.222.113'
RPI_1_IP = '192.168.222.112'
# Spare RPI:
#RPI_1_IP = '192.168.222.99'

# Other addresses for tests:
#RPI_1_IP = '128.141.196.154'
#RPI_1_IP = '128.141.196.225'
#RPI_1_IP = '128.141.149.196'

# These should not be changed:
portTCP = '55211'
portUDP = '55212'

# Instead of IP addresses, we use aliases for SSH for clarity. The alias-to-IP-address correspondence is defined here: $HOME/.ssh/config
piSynch_IP = "piS"
piRDOUT1_IP = "pi1"
piRDOUT2_IP = "pi2"
piRDOUT3_IP = "pi3"
piRDOUT4_IP = "pi4"

# Mask for which RDOUT boards to configure, as a string of 1s and 0s. 1 = enable, 0 = disable; leftmost digit is assumed to correspond to the board with IP = piRDOUT1_IP. For example, "0010" enables configuring only piRDOUT3, "1100" configures piRDOUT1 and piRDOUT2, etc.
RDOUTMask = "0000"

# Hardcoded SKIROC configuration strings for individual RDOUT boards. The script is executed in the following format:
# source targetDirPath_Skirocs/resetConfiguration_Skirocs_exe_fileName INDICES_STRING
# where INDICES_STRING is the following:
# skirocIndices_RDOUT1 = "1 3 2 4"
# skirocIndices_RDOUT2 = "1 3 2 4"
# skirocIndices_RDOUT3 = "1 3 2 4"
# skirocIndices_RDOUT4 = "1 3 2 4"
skirocIndices_RDOUT1 = " "
skirocIndices_RDOUT2 = " "
skirocIndices_RDOUT3 = "0 1 2 3 4"
skirocIndices_RDOUT4 = " "

sourceDirPath_Synch = "/home/daq/forConfiguration_EUDAQ/sourceDir_Synch"
targetDirPath_Synch = "/home/pi/forConfiguration_EUDAQ/targetDir_Synch"
resetConfiguration_Synch_exe_fileName = "resetConfiguration_Synch.sh"
sourceDirPath_Readout = "/home/daq/forConfiguration_EUDAQ/sourceDir_Readout"
targetDirPath_Readout = "/home/pi/forConfiguration_EUDAQ/targetDir_Readout"
resetConfiguration_Readout_exe_fileName = "resetConfiguration_Readout.sh"
sourceDirPath_Skirocs = "/home/daq/forConfiguration_EUDAQ/sourceDir_Skirocs"
targetDirPath_Skirocs = "/home/pi/forConfiguration_EUDAQ/targetDir_Skirocs"
resetConfiguration_Skirocs_exe_fileName = "resetConfiguration_Skirocs.sh"


[Producer.RPI-BRD3]

RDBOARD = 3

# Main RPI on the ReadOut board::
RPI_1_IP = '192.168.222.113'

# These should not be changed:
portTCP = '55511'
portUDP = '55512'
Expand Down Expand Up @@ -49,4 +102,4 @@ targetDirPath_Readout = "/home/pi/forConfiguration_EUDAQ/targetDir_Readout"
resetConfiguration_Readout_exe_fileName = "resetConfiguration_Readout.sh"
sourceDirPath_Skirocs = "/home/daq/forConfiguration_EUDAQ/sourceDir_Skirocs"
targetDirPath_Skirocs = "/home/pi/forConfiguration_EUDAQ/targetDir_Skirocs"
resetConfiguration_Skirocs_exe_fileName = "resetConfiguration_Skirocs.sh"
resetConfiguration_Skirocs_exe_fileName = "resetConfiguration_Skirocs.sh"
10 changes: 7 additions & 3 deletions producers/cmshgcal/onlinemon/src/AhcalCollection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool AhcalCollection::isPlaneRegistered(eudaq::StandardPlane p) {
void AhcalCollection::fillHistograms(const eudaq::StandardPlane &pl) {
std::cout<<"In AhcalCollection::fillHistograms(StandardPlane)"<<std::endl;

if (pl.Sensor()!="Calice")
if (pl.Sensor().find("Calice")==std::string::npos)
return;

if (!isPlaneRegistered(pl)) {
Expand All @@ -33,7 +33,7 @@ void AhcalCollection::bookHistograms(const eudaq::StandardEvent &ev) {
for (int plane = 0; plane < ev.NumPlanes(); plane++) {
const eudaq::StandardPlane Plane = ev.GetPlane(plane);
if (!isPlaneRegistered(Plane)) {
if (Plane.Sensor()=="Calice")
if (Plane.Sensor().find("Calice")!=std::string::npos)
registerPlane(Plane);
}
}
Expand Down Expand Up @@ -91,7 +91,9 @@ void AhcalCollection::Fill(const eudaq::StandardEvent &ev) {

for (int plane = 0; plane < ev.NumPlanes(); plane++) {
const eudaq::StandardPlane &Plane = ev.GetPlane(plane);
if (Plane.Sensor()=="Calice")

//std::cout<<"Trying to Fill a plane: "<<plane<<" sensor="<<Plane.Sensor()<<" ID="<<Plane.ID()<<std::endl;
if (Plane.Sensor().find("Calice")!=std::string::npos)
fillHistograms(Plane);
}
}
Expand All @@ -104,6 +106,8 @@ void AhcalCollection::Fill(const eudaq::StandardEvent &ev) {

AhcalHistos *AhcalCollection::getAhcalHistos(std::string sensor, int id) {
const eudaq::StandardPlane p(id, "Calice", sensor);

std::cout<<"In getAhcalHistos.. sensor="<<sensor<<" id="<<id<<std::endl;
return _map[p];
}

Expand Down
8 changes: 5 additions & 3 deletions producers/cmshgcal/onlinemon/src/HexagonCollection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool HexagonCollection::isPlaneRegistered(eudaq::StandardPlane p) {
void HexagonCollection::fillHistograms(const eudaq::StandardPlane &pl) {
std::cout<<"In HexagonCollection::fillHistograms(StandardPlane)"<<std::endl;

if (pl.Sensor()!="HexaBoard")
if (pl.Sensor().find("HexaBoard")==std::string::npos)
return;

if (!isPlaneRegistered(pl)) {
Expand All @@ -33,7 +33,7 @@ void HexagonCollection::bookHistograms(const eudaq::StandardEvent &ev) {
for (int plane = 0; plane < ev.NumPlanes(); plane++) {
const eudaq::StandardPlane Plane = ev.GetPlane(plane);
if (!isPlaneRegistered(Plane)) {
if (Plane.Sensor()=="HexaBoard")
if (Plane.Sensor().find("HexaBoard")!=std::string::npos)
registerPlane(Plane);
}
}
Expand Down Expand Up @@ -91,7 +91,9 @@ void HexagonCollection::Fill(const eudaq::StandardEvent &ev) {

for (int plane = 0; plane < ev.NumPlanes(); plane++) {
const eudaq::StandardPlane &Plane = ev.GetPlane(plane);
if (Plane.Sensor()=="HexaBoard")
std::cout<<"Trying to Fill a plane: "<<plane<<" sensor="<<Plane.Sensor()<<" ID="<<Plane.ID()<<std::endl;

if (Plane.Sensor().find("HexaBoard")!=std::string::npos)
fillHistograms(Plane);
}
}
Expand Down
Loading

0 comments on commit 0128db0

Please sign in to comment.