DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
AlignmentsPrinter.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_ALIGNMENTSPRINTER_H
14 #define DD4HEP_ALIGNMENTSPRINTER_H
15 
16 // Framework includes
17 #include <DD4hep/Printout.h>
18 #include <DD4hep/DetElement.h>
19 #include <DD4hep/Alignments.h>
20 
22 namespace dd4hep {
23 
25  namespace align {
26 
28 
39  public:
43  std::string name;
45  std::string prefix;
47  PrintLevel printLevel;
48  protected:
50  int m_flag;
51 
52  public:
54  AlignmentsPrinter() = delete;
56  AlignmentsPrinter(ConditionsMap* m, const std::string& prefix="",int flags=0);
58  virtual ~AlignmentsPrinter() = default;
60  void setName(const std::string& value) { name = value; }
62  void setPrefix(const std::string& value) { prefix = value; }
64  virtual int operator()(DetElement de, int level) const;
66  virtual int operator()(Alignment alignment) const;
67  };
68 
69 
71 
82  public:
86  AlignedVolumePrinter(ConditionsMap* map, const std::string& prefix="",int flags=0);
88  virtual ~AlignedVolumePrinter() = default;
90  virtual int operator()(DetElement de, int level) const override
91  { return this->AlignmentsPrinter::operator()(de,level); }
93  virtual int operator()(Alignment cond) const override;
94  };
95 
96 
98  void printAlignment(PrintLevel prt_level, const std::string& prefix, Alignment alignment);
99 
100  void printAlignment(PrintLevel lvl, const std::string& prefix,
101  const std::string& opt, DetElement de, Alignment alignment);
102 
104  void printElement(PrintLevel prt_level, const std::string& prefix, DetElement element, ConditionsMap& pool);
105 
107  void printElementPlacement(PrintLevel prt_level, const std::string& prefix, DetElement detector, ConditionsMap& pool);
108 
109  } /* End namespace align */
110 } /* End namespace dd4hep */
111 #endif // DD4HEP_ALIGNMENTSPRINTER_H
dd4hep::align::AlignmentsPrinter::setName
void setName(const std::string &value)
Set name for printouts.
Definition: AlignmentsPrinter.h:60
cond
AlignmentCondition::Object * cond
Definition: AlignmentsCalculator.cpp:68
dd4hep::align::printAlignment
void printAlignment(PrintLevel prt_level, const std::string &prefix, Alignment alignment)
Default printout of an alignment entry.
Definition: AlignmentsPrinter.cpp:70
dd4hep::align::AlignmentsPrinter::setPrefix
void setPrefix(const std::string &value)
Set prefix for printouts.
Definition: AlignmentsPrinter.h:62
dd4hep::align::AlignmentsPrinter::name
std::string name
Printer name. Want to know who is printing what.
Definition: AlignmentsPrinter.h:43
Alignments.h
dd4hep::align::AlignedVolumePrinter::operator()
virtual int operator()(DetElement de, int level) const override
Callback to output alignments information of an entire DetElement.
Definition: AlignmentsPrinter.h:90
dd4hep::align::AlignmentsPrinter::printLevel
PrintLevel printLevel
Printout level.
Definition: AlignmentsPrinter.h:47
dd4hep::align::AlignmentsPrinter::AlignmentsPrinter
AlignmentsPrinter()=delete
No default constructor.
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::align::AlignedVolumePrinter
Generic Alignments data dumper.
Definition: AlignmentsPrinter.h:81
dd4hep::align::AlignmentsPrinter::prefix
std::string prefix
Printout prefix.
Definition: AlignmentsPrinter.h:45
dd4hep::Alignment
Main handle class to hold an alignment object.
Definition: Alignments.h:115
dd4hep::align::AlignmentsPrinter::~AlignmentsPrinter
virtual ~AlignmentsPrinter()=default
Default destructor.
dd4hep::align::AlignedVolumePrinter::AlignedVolumePrinter
AlignedVolumePrinter()=delete
No default constructor.
DetElement.h
dd4hep::align::AlignmentsPrinter::m_flag
int m_flag
Printout processing and customization flag.
Definition: AlignmentsPrinter.h:50
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::align::AlignmentsPrinter::mapping
ConditionsMap * mapping
Conditionsmap to resolve things.
Definition: AlignmentsPrinter.h:41
dd4hep::align::AlignedVolumePrinter::~AlignedVolumePrinter
virtual ~AlignedVolumePrinter()=default
Default destructor.
dd4hep::align::AlignmentsPrinter::operator()
virtual int operator()(DetElement de, int level) const
Callback to output alignments information of an entire DetElement.
Definition: AlignmentsPrinter.cpp:41
dd4hep::align::printElementPlacement
void printElementPlacement(PrintLevel prt_level, const std::string &prefix, DetElement detector, ConditionsMap &pool)
PrintElement placement with/without alignment applied.
Definition: AlignmentsPrinter.cpp:210
dd4hep::align::AlignmentsPrinter
Generic Alignments data dumper.
Definition: AlignmentsPrinter.h:38
dd4hep::align::printElement
void printElement(PrintLevel prt_level, const std::string &prefix, DetElement element, ConditionsMap &pool)
Default printout of a detector element entry.
Definition: AlignmentsPrinter.cpp:195
Printout.h
dd4hep::ConditionsMap
ConditionsMap class.
Definition: ConditionsMap.h:59