Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:50

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_DEVPGENERIC_H 
0016 #define DETECTOR_DEVPGENERIC_H 1
0017 
0018 // Framework include files
0019 #include "Detector/DeVPSensor.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 DeVPGenericStaticObject : public DeStaticObject    {
0037       DE_CONDITIONS_TYPEDEFS;
0038       /// Unique classID
0039       enum { classID = 2 };
0040 
0041     public:
0042       typedef  std::vector<DeVPSensorStatic>  Sensors;
0043       Sensors  sensors;
0044 
0045     public:
0046       /// Standard constructors and assignment
0047       DE_CTORS_DEFAULT(DeVPGenericStaticObject);
0048       /// Initialization of sub-classes
0049       virtual void initialize()  override;
0050       /// Printout method to stdout
0051       virtual void print(int indent, int flg)  const  override;
0052     };
0053   }    // End namespace detail
0054 
0055   /// Handle defintiion to an instance of VP  detector element data
0056   /**
0057    *  This object defines the behaviour of the objects's data
0058    *
0059    *  \author  Markus Frank
0060    *  \date    2018-03-08
0061    *  \version  1.0
0062    */
0063   class DeVPGenericStaticElement
0064     : public dd4hep::Handle<detail::DeVPGenericStaticObject>
0065   {
0066     DE_CONDITIONS_TYPEDEFS;
0067     typedef Object           static_t;
0068     typedef Object::Sensors  Sensors;
0069   public:
0070     /// Standard constructors and assignment
0071     DE_CTORS_HANDLE(DeVPGenericStaticElement,Base);
0072     /// Export access to the sensors from the detector element
0073     Object::Sensors& sensors()  const   {   return access()->sensors;    }
0074   };
0075   /// For the fully enabled object, we have to combine it with the generic stuff
0076   typedef  DetectorStaticElement<DeVPGenericStaticElement>  DeVPGenericStatic;
0077 
0078   /// Gaudi::detail namespace declaration
0079   namespace detail   {
0080 
0081     /// VP  detector element data
0082     /**
0083      *
0084      *  \author  Markus Frank
0085      *  \date    2018-03-08
0086      *  \version  1.0
0087      */
0088     class DeVPGenericObject : public DeIOVObject    {
0089       DE_CONDITIONS_TYPEDEFS;
0090 
0091     public:
0092       typedef  std::vector<DeVPSensor>  Sensors;
0093       Sensors  sensors;
0094 
0095     public:
0096       /// Standard constructors and assignment
0097       DE_CTORS_DEFAULT(DeVPGenericObject);
0098       /// Initialization of sub-classes
0099       virtual void initialize()  override;
0100       /// Printout method to stdout
0101       virtual void print(int indent, int flg)  const  override;
0102     };
0103   }    // End namespace detail
0104 
0105   /// Handle defintiion to an instance of VP  detector element data
0106   /**
0107    *  This object defines the behaviour of the objects's data
0108    *
0109    *  \author  Markus Frank
0110    *  \date    2018-03-08
0111    *  \version  1.0
0112    */
0113   class DeVPGenericElement : public dd4hep::Handle<detail::DeVPGenericObject>   {
0114     DE_CONDITIONS_TYPEDEFS;
0115     /// These two are needed by the DetectorElement<TYPE> to properly forward requests.
0116     typedef Object           iov_t;
0117     typedef Object::static_t static_t;
0118     typedef Object::Sensors  Sensors;
0119     
0120   public:
0121     /// Standard constructors and assignment
0122     DE_CTORS_HANDLE(DeVPGenericElement,Base);
0123     /// Access to the static data
0124     static_t& staticData()  const    { return access()->de_static;   }
0125     /// Export access to the sensors from the detector element
0126     Object::Sensors& sensors()  const   {   return access()->sensors;   }
0127   };
0128   
0129   /// For the fully enabled object, we have to combine it with the generic stuff
0130   typedef  DetectorElement<DeVPGenericElement>  DeVPGeneric;
0131 
0132 }      // End namespace gaudi
0133 #endif // DETECTOR_DEVPGENERIC_H