right now just measures the rate for one OH. However it could measure the rate for all OH's simultaneously since it's reading a set of counters that are specific to each OH.
Types of issue
[ ] Bug report (report an issue with the code)
[ ] Feature request (request for change which adds functionality)
Expected Behavior
The ohN and vfatmask arguments could be dropped and replaced with an ohMask argument defaulting to 0x3ff:
Brief summary of issue
The function:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L626
right now just measures the rate for one OH. However it could measure the rate for all OH's simultaneously since it's reading a set of counters that are specific to each OH.
Types of issue
Expected Behavior
The
ohN
andvfatmask
arguments could be dropped and replaced with anohMask
argument defaulting to0x3ff
:https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L626
Automatically determining the VFAT Mask
The following block could be dropped:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L632-L639
And the vfatMask per OH could be determined by using:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/amc.cpp#L44
An example implementation is:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/amc.cpp#L100-L111
Storing the original channel map
Then you'd need to repeat the following block for each unmasked OH.
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L641-L650
Determining the Rate Monitor Addresses
For each unmasked OH you'd need to determine the rate monitor addresses:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L652-L659
And set the sbit counters to count for one second:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L665-L666
Changing the DAC Loop
Then for each unmasked OH in the
ohMask
this loop would have to be executed:https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L670-L675
So it should be nested in a loop over unmasked OH's.
Then the counters for each unmasked OH should be readout, so this loop:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L685-L692
Should be nested in a loop over the unmasked OH's.
Restoring the original channel Map
Then you'd need to restore the original channel map by having this block be done for each unmasked OH:
https://github.com/cms-gem-daq-project/ctp7_modules/blob/187a9452db5d164d16a102e9302a0dce2ad34414/src/calibration_routines.cpp#L695-L702
Updating the indices of the data arrays
The output arrays:
outDataDacVal
,outDataTrigRatePerVFAT
outDataTrigRateOverall
Would need to be updated in the remote method such that their size now accounts for the fact that they represent all OH's.
Current Behavior
The function just reads one OH per call but it could read them all.
Context (for feature requests)
Decreases the time to determine the
CFG_THR_ARM_DAC
setting for all OH's on a CTP7.Your Environment