Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:27:17

0001 //==============================================================================
0002 //  AIDA Detector description implementation for LHCb
0003 //------------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 //  \author   Markus Frank
0011 //  \date     2018-03-08
0012 //  \version  1.0
0013 //
0014 //==============================================================================
0015 #ifndef DETECTOR_DEVELOGENERIC_H 
0016 #define DETECTOR_DEVELOGENERIC_H 1
0017 
0018 // Framework include files
0019 #include "Detector/DeVeloSensor.h"
0020 #include "Detector/DeStatic.h"
0021 #include "Detector/DeIOV.h"
0022 
0023 /// Gaudi namespace declaration
0024 namespace gaudi   {
0025 
0026   /// Gaudi::detail namespace declaration
0027   namespace detail   {
0028 
0029     /// VP  detector element data
0030     /**
0031      *
0032      *  \author  Markus Frank
0033      *  \date    2018-03-08
0034      *  \version  1.0
0035      */
0036     class DeVeloGenericStaticObject : public DeStaticObject    {
0037       DE_CONDITIONS_TYPEDEFS;
0038       /// Unique classID
0039       enum { classID = 2 };
0040 
0041     public:
0042       typedef  std::vector<DeVeloGenericStaticObject*> Children;
0043       typedef  std::vector<DeVeloSensorStatic>         Sensors;
0044       Children children;  // Note: Sensors are no children. They go extra
0045       Sensors  sensors;
0046 
0047     public:
0048       /// Standard constructors and assignment
0049       DE_CTORS_DEFAULT(DeVeloGenericStaticObject);
0050       /// Initialization of sub-classes
0051       virtual void initialize()  override;
0052       /// Printout method to stdout
0053       virtual void print(int indent, int flg)  const  override;
0054     };
0055   }    // End namespace detail
0056 
0057   /// Handle defintiion to an instance of VP  detector element data
0058   /**
0059    *  This object defines the behaviour of the objects's data
0060    *
0061    *  \author  Markus Frank
0062    *  \date    2018-03-08
0063    *  \version  1.0
0064    */
0065   class DeVeloGenericStaticElement : public dd4hep::Handle<detail::DeVeloGenericStaticObject>   {
0066     DE_CONDITIONS_TYPEDEFS;
0067     typedef Object static_t;
0068   public:
0069     /// Standard constructors and assignment
0070     DE_CTORS_HANDLE(DeVeloGenericStaticElement,Base);
0071     /// Export access to the sensors from the detector element
0072     Object::Sensors& sensors()  const   {   return access()->sensors;    }
0073     /// Export access to the children from the detector element
0074     Object::Children& children()  const {   return access()->children;   }
0075   };
0076   /// For the fully enabled object, we have to combine it with the generic stuff
0077   typedef  DetectorStaticElement<DeVeloGenericStaticElement>  DeVeloGenericStatic;
0078 
0079   /// Gaudi::detail namespace declaration
0080   namespace detail   {
0081 
0082     /// VP  detector element data
0083     /**
0084      *
0085      *  \author  Markus Frank
0086      *  \date    2018-03-08
0087      *  \version  1.0
0088      */
0089     class DeVeloGenericObject : public DeIOVObject    {
0090       DE_CONDITIONS_TYPEDEFS;
0091 
0092     public:
0093       typedef  std::vector<DeVeloGenericObject*> Children;
0094       typedef  std::vector<DeVeloSensor>         Sensors;
0095       Children children;  // Note: Sensors are no children. They go extra
0096       Sensors  sensors;
0097 
0098     public:
0099       /// Standard constructors and assignment
0100       DE_CTORS_DEFAULT(DeVeloGenericObject);
0101       /// Initialization of sub-classes
0102       virtual void initialize()  override;
0103       /// Printout method to stdout
0104       virtual void print(int indent, int flg)  const  override;
0105     };
0106   }    // End namespace detail
0107 
0108   /// Handle defintiion to an instance of VP  detector element data
0109   /**
0110    *  This object defines the behaviour of the objects's data
0111    *
0112    *  \author  Markus Frank
0113    *  \date    2018-03-08
0114    *  \version  1.0
0115    */
0116   class DeVeloGenericElement : public dd4hep::Handle<detail::DeVeloGenericObject>   {
0117     DE_CONDITIONS_TYPEDEFS;
0118     /// These two are needed by the DetectorElement<TYPE> to properly forward requests.
0119     typedef Object::static_t static_t;
0120     typedef Object           iov_t;
0121   public:
0122     /// Standard constructors and assignment
0123     DE_CTORS_HANDLE(DeVeloGenericElement,Base);
0124     /// Access to the static data. Must define here, not in DetectorElement to preserve types.
0125     static_t& staticData()  const       {  return access()->de_static;  }
0126     /// Export access to the sensors from the detector element
0127     Object::Sensors& sensors()  const   {   return access()->sensors;   }
0128     /// Export access to the children from the detector element
0129     Object::Children& children()  const {   return access()->children;  }
0130   };
0131 
0132   /// For the fully enabled object, we have to combine it with the generic stuff
0133   typedef  DetectorElement<DeVeloGenericElement>  DeVeloGeneric;
0134   
0135 }      // End namespace gaudi
0136 #endif // DETECTOR_DEVELOGENERIC_H