Belle II Software  release-06-01-15
VXDMisalignmentModule.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 <vxd/modules/vxdMisalignment/VXDMisalignmentModule.h>
10 #include <vxd/geometry/MisalignmentCache.h>
11 
12 using namespace std;
13 using namespace Belle2;
14 using namespace Belle2::VXD;
15 
16 //-----------------------------------------------------------------
17 // Register the Module
18 //-----------------------------------------------------------------
19 REG_MODULE(VXDMisalignment)
20 
21 //-----------------------------------------------------------------
22 // Implementation
23 //-----------------------------------------------------------------
24 
26  Module(), m_xmlFilename("")
27 {
28  //Set module properties
29  setDescription("Initialize VXD misalignment");
30  setPropertyFlags(c_ParallelProcessingCertified);
31  addParam("misalignmentFilename", m_xmlFilename,
32  "Name of an xml misalignment data file. If empty, no misalignment will take place.",
33  string(""));
34 }
35 
36 void VXDMisalignmentModule::beginRun()
37 {
38  // Initialize the MisalignmentCache
39  VXD::MisalignmentCache& cache = VXD::MisalignmentCache::getInstance();
40  cache.clear();
41  cache.readMisalignmentsFromXml(m_xmlFilename);
42 }
43 
Base class for Modules.
Definition: Module.h:72
Class to hold misalignment information.
void clear()
clear cache data
void readMisalignmentsFromXml(const std::string &filename)
Read misalignment data from an xml file and store sensor misalignments.
The VXD misalignment module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.
Definition: GeoCache.h:34
Abstract base class for different kinds of events.