Belle II Software  release-05-01-25
SVD6SampleEventSkimModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Giulia Casarosa *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <svd/modules/svdSkims/SVD6SampleEventSkimModule.h>
12 #include <svd/dataobjects/SVDEventInfo.h>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 //-----------------------------------------------------------------
18 // Register the Module
19 //-----------------------------------------------------------------
20 REG_MODULE(SVD6SampleEventSkim)
21 
22 //-----------------------------------------------------------------
23 // Implementation
24 //-----------------------------------------------------------------
25 
27 {
28 // Set module properties
29  setDescription("Skim Module for the SVD 6-sample acquired events, in either the 6-sample only or the 3-mixed-6 sample DAQ modes. ");
30  setPropertyFlags(c_ParallelProcessingCertified);
31 
32 }
33 
34 
35 void SVD6SampleEventSkimModule::event()
36 {
37 
38  int retvalue = 0;
39 
40  //first check SVDEventInfo name
41  StoreObjPtr<SVDEventInfo> temp_eventinfo("SVDEventInfo");
42  std::string m_svdEventInfoName = "SVDEventInfo";
43  if (!temp_eventinfo.isValid())
44  m_svdEventInfoName = "SVDEventInfoSim";
45  StoreObjPtr<SVDEventInfo> eventinfo(m_svdEventInfoName);
46  if (!eventinfo) B2ERROR("No SVDEventInfo!");
47 
48  if (eventinfo->getNSamples() == 6)
49  retvalue = 1;
50 
51  setReturnValue(retvalue);
52 
53 }
54 
55 
56 
57 
Belle2::SVD6SampleEventSkimModule
SVD 6-sample event skim module.
Definition: SVD6SampleEventSkimModule.h:37
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::StoreObjPtr::isValid
bool isValid() const
Check whether the object was created.
Definition: StoreObjPtr.h:120