 |
Belle II Software
release-05-02-19
|
11 #include <svd/modules/svdSimulation/SVD3SamplesEmulatorModule.h>
26 B2DEBUG(1,
"Constructor");
28 setDescription(
"This module takes the SVDShaperDigit as input and select three consecutive samples starting from the one choosen by the user. The modules creates a new StoreArray of the class ShaperDigit whit three samples only, selected from the original ShaperDigits. The three samples are stored in the first three positions of the APVSamples store array, and the last three are set to 0.");
31 addParam(
"SVDShaperDigits", m_shaperDigitInputName,
"StoreArray with the input shaperdigits", std::string(
"SVDShaperDigits"));
32 addParam(
"StartingSample", m_startingSample,
"Starting sample of the three samples (between 0 and 3, the default is 0)",
int(0));
33 addParam(
"outputArrayName", m_outputArrayName,
"StoreArray with the output shaperdigits with 3 samples",
34 std::string(
"SVDShaperDigit3Samples"));
35 addParam(
"SVDEventInfo", m_svdEventInfoName,
"SVDEventInfo name", std::string(
""));
40 B2DEBUG(20,
"Destructor");
47 B2FATAL(
"The starting sample must be between 0 and 3, you set = " <<
m_startingSample);
55 B2INFO(
"The starting sample from which start to select the three samples: " <<
m_startingSample);
60 ShaperDigit3Samples.registerInDataStore();
77 if (!
m_storeSVDEvtInfo.isValid()) B2ERROR(
"No valid SVDEventInfo object is present!");
84 B2FATAL(
"The DAQMode is = " << DAQMode <<
" The number of samples of the input shaperdigits is NOT 6!");
97 VxdID sensorID = shaper.getSensorID();
98 bool side = shaper.isUStrip();
99 int cellID = shaper.getCellID();
100 int8_t fadcT = shaper.getFADCTime();
107 threeSamples[3] = 0.;
108 threeSamples[4] = 0.;
109 threeSamples[5] = 0.;
111 ShaperDigit3Samples.
appendNew(sensorID, side, cellID, threeSamples, fadcT, modeByte);
T * appendNew()
Construct a new T object at the end of the array.
This module takes the SVDShaperDigit as input and select three consecutive samples starting from the ...
Class to uniquely identify a any structure of the PXD and SVD.
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo
storage for SVDEventInfo object required for the module
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo3samples
storage for SVDEventInfo object produced for 3 samples
virtual void beginRun() override
initializes the module
Class to store SVD mode information.
baseType getDAQMode() const
Get the daqMode id.
The SVD ShaperDigit class.
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
std::string m_outputArrayName
StoreArray with the 3-samples output shaperdigits, with DAQMode = 1.
void setDAQMode(baseType daqMode)
Set the daqMode id.
std::string m_svdEventInfoName
Name of the SVDEventInfo object.
virtual void event() override
processes the event
Abstract base class for different kinds of events.
virtual void terminate() override
terminates the module
std::string m_shaperDigitInputName
name of the input ShaperDigits StoreArray
virtual void initialize() override
init the module
virtual ~SVD3SamplesEmulatorModule()
if required
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Accessor to arrays stored in the data store.
Int_t m_startingSample
Starting sample from which select the three samples of the initial six.
virtual void endRun() override
end the run
StoreArray< SVDShaperDigit > m_ShaperDigit
StoreArray with the 6-samples input shaperdigits with DAQMode = 2.