Belle II Software  release-05-02-19
VXDMisalignmentModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010-2011 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Peter Kvasnicka *
7  * *
8  **************************************************************************/
9 
10 #include <vxd/modules/vxdMisalignment/VXDMisalignmentModule.h>
11 #include <vxd/geometry/MisalignmentCache.h>
12 
13 using namespace std;
14 using namespace Belle2;
15 using namespace Belle2::VXD;
16 
17 //-----------------------------------------------------------------
18 // Register the Module
19 //-----------------------------------------------------------------
20 REG_MODULE(VXDMisalignment)
21 
22 //-----------------------------------------------------------------
23 // Implementation
24 //-----------------------------------------------------------------
25 
27  Module(), m_xmlFilename("")
28 {
29  //Set module properties
30  setDescription("Initialize VXD misalignment");
31  setPropertyFlags(c_ParallelProcessingCertified);
32  addParam("misalignmentFilename", m_xmlFilename,
33  "Name of an xml misalignment data file. If empty, no misalignment will take place.",
34  string(""));
35 }
36 
37 void VXDMisalignmentModule::beginRun()
38 {
39  // Initialize the MisalignmentCache
40  VXD::MisalignmentCache& cache = VXD::MisalignmentCache::getInstance();
41  cache.clear();
42  cache.readMisalignmentsFromXml(m_xmlFilename);
43 }
44 
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::VXD::MisalignmentCache
Class to hold misalignment information.
Definition: MisalignmentCache.h:39
Belle2::VXD::MisalignmentCache::readMisalignmentsFromXml
void readMisalignmentsFromXml(const std::string &filename)
Read misalignment data from an xml file and store sensor misalignments.
Definition: MisalignmentCache.cc:42
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::VXD
Namespace to provide code needed by both Vertex Detectors, PXD and SVD, and also testbeam telescopes.
Definition: GeoCache.h:36
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXD::VXDMisalignmentModule
The VXD misalignment module.
Definition: VXDMisalignmentModule.h:37
Belle2::VXD::MisalignmentCache::clear
void clear()
clear cache data
Definition: MisalignmentCache.h:51