Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:19:36

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
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     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
0015 #include <DD4hep/Conditions.h>
0016 #include <DD4hep/ConditionsDebug.h>
0017 #include <DD4hep/detail/ConditionsInterna.h>
0018 
0019 using namespace dd4hep::cond;
0020 
0021 std::string dd4hep::cond::cond_name(const dd4hep::Condition::Object* c)  {
0022 #if defined(DD4HEP_MINIMAL_CONDITIONS)
0023   dd4hep::ConditionKey::KeyMaker key(c->hash);
0024   char text[64];
0025   std::snprintf(text,sizeof(text),"%08X-%08X", key.values.det_key, key.values.item_key);
0026   return text;
0027 #else
0028   return c->name;
0029 #endif
0030 }
0031 
0032 std::string dd4hep::cond::cond_name(Condition c)    {
0033   return cond_name(c.ptr());
0034 }