DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Readout.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_READOUT_H
14 #define DD4HEP_READOUT_H
15 
16 // Framework include files
17 #include <DD4hep/Handle.h>
18 #include <DD4hep/IDDescriptor.h>
19 #include <DD4hep/Segmentations.h>
20 
22 namespace dd4hep {
23 
24  // Forward declarations
25  class ReadoutObject;
26  class HitCollection;
27 
29 
38  class Readout: public Handle<ReadoutObject> {
39  public:
41  Readout() = default;
42 
44  Readout(Readout&& e) = default;
45 
47  Readout(const Readout& e) = default;
48 
49 #ifndef __CINT__
54 #endif
55 
57  template <typename Q> Readout(const Handle<Q>& e) : Handle<Object>(e) { }
58 
60  Readout(const std::string& name);
61 
63  Readout& operator=(Readout&& ro) = default;
64 
66  Readout& operator=(const Readout& ro) = default;
67 
69  std::vector<std::string> collectionNames() const;
70 
71 #ifndef __CINT__
72  std::vector<const HitCollection*> collections() const;
74 #endif
75  size_t numCollections() const;
77 
79  void setIDDescriptor(const Ref_t& spec) const;
80 
82  IDDescriptor idSpec() const;
83 
85  void setSegmentation(const Segmentation& segment) const;
86 
88  Segmentation segmentation() const;
89  };
90 } /* End namespace dd4hep */
91 #endif // DD4HEP_READOUT_H
Segmentations.h
dd4hep::ReadoutObject
Concrete object implementation of the Readout Handle.
Definition: ObjectsInterna.h:182
dd4hep::Readout::Readout
Readout(const Readout &e)=default
Copy Constructor from object.
dd4hep::Readout::setSegmentation
void setSegmentation(const Segmentation &segment) const
Assign segmentation structure to readout.
Definition: Readout.cpp:117
dd4hep::IDDescriptor
Class implementing the ID encoding of the detector response.
Definition: IDDescriptor.h:37
Handle.h
dd4hep::Handle
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:84
dd4hep::Readout::collections
std::vector< const HitCollection * > collections() const
Access hit collections if present.
Definition: Readout.cpp:80
dd4hep::Handle< ReadoutObject >::name
const char * name() const
Access the object name (or "" if not supported by the object)
dd4hep::Readout::operator=
Readout & operator=(const Readout &ro)=default
Assignment operator.
dd4hep::Readout::collectionNames
std::vector< std::string > collectionNames() const
Access explicit names of hit collections if present.
Definition: Readout.cpp:65
dd4hep::Readout::Readout
Readout(const Handle< Q > &e)
Constructor to be used when reading the already parsed object.
Definition: Readout.h:57
dd4hep::Readout::segmentation
Segmentation segmentation() const
Access segmentation structure.
Definition: Readout.cpp:134
dd4hep::Readout::setIDDescriptor
void setIDDescriptor(const Ref_t &spec) const
Assign IDDescription to readout structure.
Definition: Readout.cpp:95
IDDescriptor.h
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Readout::numCollections
size_t numCollections() const
Access number of hit collections.
Definition: Readout.cpp:55
dd4hep::Readout::operator=
Readout & operator=(Readout &&ro)=default
Assignment move operator.
dd4hep::Readout
Handle to the implementation of the readout structure of a subdetector.
Definition: Readout.h:38
dd4hep::Segmentation
Handle class supporting generic Segmentations of sensitive detectors.
Definition: Segmentations.h:41
dd4hep::Readout::idSpec
IDDescriptor idSpec() const
Access IDDescription structure.
Definition: Readout.cpp:112
dd4hep::Readout::Readout
Readout()=default
Default constructor.
dd4hep::Readout::Readout
Readout(const Handle< ReadoutObject > &e)
Copy Constructor from handle.
Definition: Readout.h:53
dd4hep::Readout::Readout
Readout(Readout &&e)=default
Copy Constructor from object.