DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Readout.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
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 
14 #ifndef DD4hep_GEOMETRY_READOUT_H
15 #define DD4hep_GEOMETRY_READOUT_H
16 
17 // Framework include files
18 #include "DD4hep/Handle.h"
19 #include "DD4hep/Volumes.h"
20 #include "DD4hep/IDDescriptor.h"
21 #include "DD4hep/Segmentations.h"
22 
23 // C/C++ include files
24 #include <map>
25 
27 namespace DD4hep {
28 
30  namespace Geometry {
31 
32  // Forward declarations
33  class ReadoutObject;
34  class HitCollection;
35 
37 
46  class Readout: public Handle<ReadoutObject> {
47  public:
51  public:
53  Readout() = default;
55  Readout(const Readout& e) = default;
56 #ifndef __CINT__
57  Readout(const Handle<ReadoutObject>& e) : Handle<Object>(e) { }
59 #endif
60  template <typename Q> Readout(const Handle<Q>& e) : Handle<Object>(e) { }
63  Readout(const std::string& name);
65  Readout& operator=(const Readout& ro) = default;
67  std::vector<std::string> collectionNames() const;
68 #ifndef __CINT__
69  std::vector<const Collection*> collections() const;
71 #endif
72  size_t numCollections() const;
75  void setIDDescriptor(const Ref_t& spec) const;
77  IDDescriptor idSpec() const;
79  void setSegmentation(const Segmentation& segment) const;
81  Segmentation segmentation() const;
82  };
83 
84  } /* End namespace Geometry */
85 } /* End namespace DD4hep */
86 #endif /* DD4hep_GEOMETRY_READOUT_H */
Readout & operator=(const Readout &ro)=default
Assignment operator.
const char * name() const
Access the object name (or "" if not supported by the object)
Definition: Handle.inl:36
HitCollection Collection
Definition: Readout.h:50
size_t numCollections() const
Access number of hit collections.
Definition: Readout.cpp:56
ReadoutObject Object
Implementation type.
Definition: Readout.h:49
Readout()=default
Default constructor.
std::vector< const Collection * > collections() const
Access hit collections if present.
Definition: Readout.cpp:79
return e
Definition: Volumes.cpp:297
Handle to the implementation of the readout structure of a subdetector.
Definition: Readout.h:46
IDDescriptor idSpec() const
Access IDDescription structure.
Definition: Readout.cpp:109
Handle class supporting generic Segmentation of sensitive detectors.
Definition: Segmentations.h:43
void setIDDescriptor(const Ref_t &spec) const
Assign IDDescription to readout structure.
Definition: Readout.cpp:93
Segmentation segmentation() const
Access segmentation structure.
Definition: Readout.cpp:130
std::vector< std::string > collectionNames() const
Access explicit names of hit collections if present.
Definition: Readout.cpp:65
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87
Definition of the HitCollection parameters used by the Readout.
Concrete object implementation of the Readout Handle.
void setSegmentation(const Segmentation &segment) const
Assign segmentation structure to readout.
Definition: Readout.cpp:114
Class implementing the ID encoding of detector response.
Definition: IDDescriptor.h:40