Belle II Software  release-08-01-10
SVDTriggerQualityGeneratorModule.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <svd/modules/svdSimulation/SVDTriggerQualityGeneratorModule.h>
10 #include <root/TRandom.h>
11 
12 using namespace Belle2;
13 
14 //-----------------------------------------------------------------
15 // Register the Module
16 //-----------------------------------------------------------------
17 REG_MODULE(SVDTriggerQualityGenerator);
18 
19 //-----------------------------------------------------------------
20 // Implementation
21 //-----------------------------------------------------------------
23 {
24  B2DEBUG(1, "Constructor");
25  // Set module properties
26  setDescription("Generates a StoreObjPtr that contains random trigger quality chosen between FINE and CORSE");
27 
28  // Parameter definitions
29  addParam("TRGSummaryName", m_trgQRGName, "TRGSummary name", m_trgQRGName);
30 }
31 
33 {
34 }
35 
36 
38 {
39 
40  B2DEBUG(10, "TRGSummaryName: " << m_trgQRGName);
41 
42  //Register the new TRGQualityRG StoreObjPtr
44 }
45 
46 
48 {
49 }
50 
52 {
53  m_triggerQRG.create();
54  if (gRandom->Integer(2) == 0)
55  m_triggerQRG->setTimQuality(TRGSummary::TTYQ_CORS);
56  else
57  m_triggerQRG->setTimQuality(TRGSummary::TTYQ_FINE);
58 }
59 
61 {
62 }
63 
65 {
66 }
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
virtual void initialize() override
init the module
virtual void event() override
processes the event
virtual void terminate() override
terminates the module
std::string m_trgQRGName
name of the output TRGQualityRG StoreObjPtr
StoreObjPtr< TRGSummary > m_triggerQRG
storage for TRGQualityRG object required for the module
virtual void beginRun() override
initializes the module
SVDTriggerQualityGeneratorModule()
Constructor: Sets the description, the properties and the parameters of the module.
REG_MODULE(arichBtest)
Register the Module.
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
Abstract base class for different kinds of events.