ATLAS Offline Software
Loading...
Searching...
No Matches
SimpleVolAction.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 a GeoVolumeAction
7 -----------------------------------------
8 ***************************************************************************/
9
11
13#include "GaudiKernel/MsgStream.h"
14
15#include <GaudiKernel/IMessageSvc.h>
16#include <GeoModelKernel/GeoLogVol.h>
17#include <GeoModelKernel/GeoMaterial.h>
18#include <GeoModelKernel/GeoVPhysVol.h>
19#include <GeoModelKernel/GeoVolumeAction.h>
20#include <string>
21
22namespace MuonGM {
23
24 SimpleVolAction::SimpleVolAction() : GeoVolumeAction(GeoVolumeAction::TOP_DOWN) {}
25
27
28 void SimpleVolAction::handleVPhysVol(const GeoVPhysVol *pv) {
29 MsgStream log(Athena::getMessageSvc(), "MuGM::SimpleVolAction");
30
31 // std::cout<<" MY VOL Action is handlying a GeoVPhysVol "<<std::endl;
32 const GeoLogVol *lv = pv->getLogVol();
33 const std::string& name = lv->getName();
34 const GeoMaterial *mat = lv->getMaterial();
35 unsigned int nchild = pv->getNChildVols();
36
37 log << MSG::INFO << " *** Tree Navigation *** in " << name << " made of " << mat->getName() << " N.of Children " << nchild << endmsg;
38
39 for (unsigned int i = 0; i < nchild; ++i) {
40 log << MSG::INFO << " ... child n. " << i << " named " << pv->getNameOfChildVol(i) << endmsg;
41 }
42 }
43
44} // namespace MuonGM
#define endmsg
void handleVPhysVol(const GeoVPhysVol *)
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27