Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:20:18

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 
0016 // Framework include files
0017 #include "Detector/DeVelo.h"
0018 #include "DD4hep/Printout.h"
0019 
0020 using namespace gaudi::detail;
0021 
0022 /// Initialization of sub-classes
0023 void DeVeloGenericStaticObject::initialize()    {
0024   this->DeStaticObject::initialize();
0025 }
0026 
0027 /// Printout method to stdout
0028 void DeVeloGenericStaticObject::print(int indent, int flg)  const   {
0029   std::string prefix = DE::indent(indent);
0030   DeStaticObject::print(indent, flg&~DePrint::CHILDREN);
0031   if ( flg & DePrint::SPECIFIC )  {
0032     printout(INFO,"DeVeloGen", "%s+ >> %ld child(ren) %ld Sensor(s)",
0033              prefix.c_str(), children.size(), sensors.size());
0034   }
0035   if ( flg&DePrint::CHILDREN )   {
0036     for(size_t i=0, e=children.size(); e==0 && i<sensors.size(); ++i)
0037       sensors[i]->print(indent+1, flg);
0038     for(size_t i=0, e=children.size(); e>0 && i<sensors.size(); ++i)   {
0039       printout(INFO,"DeVeloGen", "%s+   >> Sensor[%ld] %s",
0040                prefix.c_str(),i,sensors[i]->detector.path().c_str());
0041     }
0042     for(auto c : children) c->print(indent+1,flg);
0043   }
0044 }
0045 
0046 /// Initialization of sub-classes
0047 void DeVeloGenericObject::initialize()    {
0048   this->DeIOVObject::initialize();
0049 }
0050 
0051 /// Printout method to stdout
0052 void DeVeloGenericObject::print(int indent, int flg)  const   {
0053   std::string prefix = DE::indent(indent);
0054   DeIOVObject::print(indent, flg&~DePrint::CHILDREN);
0055   if ( flg & DePrint::SPECIFIC )  {
0056     printout(INFO,"DeIOVVeloGen", "%s+ >> %ld child(ren) %ld Sensor(s)",
0057              prefix.c_str(), children.size(), sensors.size());
0058   }
0059   for(size_t i=0, e=children.size(); e==0 && i<sensors.size(); ++i)
0060     sensors[i]->print(indent+1, flg);
0061   for(size_t i=0, e=children.size(); e>0 && i<sensors.size(); ++i)   {
0062     printout(INFO,"DeIOVVeloGen", "%s+   >> [%ld] %s",
0063              prefix.c_str(), i, sensors[i]->detector.path().c_str());
0064   }
0065   for(auto c : children) c->print(indent+1,flg);
0066 }