Back to home page

EIC code displayed by LXR

 
 

    


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

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_DEVELOCONDITIONCALLS_H 
0016 #define DETECTOR_DEVELOCONDITIONCALLS_H 1
0017 
0018 // Framework include files
0019 #include "Detector/DeVelo.h"
0020 #include "Detector/DeConditionCallDefs.h"
0021 #include "DD4hep/ConditionDerived.h"
0022 
0023 /// Gaudi namespace declaration
0024 namespace gaudi   {
0025 
0026   /// Context information used when computing the Velo-pixel derived conditions
0027   /**
0028    *
0029    *  \author  Markus Frank
0030    *  \date    2018-03-08
0031    *  \version  1.0
0032    */
0033   class VeloUpdateContext : public dd4hep::cond::ConditionUpdateUserContext   {
0034   public:
0035     std::map<dd4hep::Condition::detkey_type,std::pair<dd4hep::DetElement,dd4hep::DDDB::DDDBCatalog*> > detectors;
0036     dd4hep::Condition alignments_done;
0037   };
0038 
0039   /// Condition derivation call to build the static Velo-pixel DetElement condition information
0040   /**
0041    *
0042    *  \author  Markus Frank
0043    *  \date    2018-03-08
0044    *  \version  1.0
0045    */
0046   class DeVeloStaticConditionCall : public dd4hep::cond::ConditionUpdateCall, public DeConditionCallDefs  {
0047   public:
0048     /// Initializing constructor
0049     DeVeloStaticConditionCall() = default;
0050     /// Default destructor
0051     virtual ~DeVeloStaticConditionCall() = default;
0052     /// Interface to client Callback in order to update the condition
0053     virtual Condition operator()(const ConditionKey& key, Context& context) override final;
0054     /// Interface to client callback for resolving references or to use data from other conditions
0055     virtual void resolve(Condition c, Context& context)  override final;
0056   };
0057 
0058   /// Condition derivation call to build the dynamic Velo-pixel DetElement condition information
0059   /**
0060    *
0061    *  \author  Markus Frank
0062    *  \date    2018-03-08
0063    *  \version  1.0
0064    */
0065   class DeVeloIOVConditionCall : public dd4hep::cond::ConditionUpdateCall, public DeConditionCallDefs  {
0066   public:
0067     DetElement detector;
0068     Catalog*   catalog = 0;
0069     VeloUpdateContext* velo_context = 0;    
0070     /// Initializing constructor
0071     DeVeloIOVConditionCall(DetElement de, Catalog* cat, VeloUpdateContext* ctx)
0072       : detector(de), catalog(cat), velo_context(ctx)  {}
0073     /// Default destructor
0074     virtual ~DeVeloIOVConditionCall() = default;
0075     /// Interface to client Callback in order to update the condition
0076     virtual Condition operator()(const ConditionKey& key, Context& context) override final;
0077     /// Interface to client callback for resolving references or to use data from other conditions
0078     virtual void resolve(Condition c, Context& context)  override;
0079   };
0080   
0081   /// Condition derivation call to build the dynamic Velo-pixel DetElement condition information
0082   /**
0083    *
0084    *  \author  Markus Frank
0085    *  \date    2018-03-08
0086    *  \version  1.0
0087    */
0088   class DeVeloConditionCall : public DeVeloIOVConditionCall   {
0089   public:
0090     /// Initializing constructor
0091     DeVeloConditionCall(DetElement de, Catalog* cat, VeloUpdateContext* ctx)
0092       : DeVeloIOVConditionCall(de,cat,ctx) {}
0093     /// Default destructor
0094     virtual ~DeVeloConditionCall() = default;
0095     /// Interface to client callback for resolving references or to use data from other conditions
0096     virtual void resolve(Condition c, Context& context)  override final;
0097   };
0098   
0099 }      // End namespace gaudi
0100 #endif // DETECTOR_DEVELOCONDITIONCALLS_H