ATLAS Offline Software
Loading...
Searching...
No Matches
ServiceMaterial.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "ServiceMaterial.h"
6#include <ostream>
7
8void ServiceMaterial::dump( std::ostream& os) const
9{
10 os << std::endl << "Dump of ServiceMaterial " << name()
11 << " containing " << components().size() << " components" << std::endl;
12 double totalWeight = 0;
13 for (unsigned int i=0; i<components().size(); i++) {
15 os << "Comp. " << i << " name " << comp.name
16 << " number " << comp.number
17 << " weight " << comp.weight
18 << " is linear? " << comp.linear
19 << std::endl;
20 totalWeight += comp.weight * comp.number;
21 }
22 os << "Total weight: " << totalWeight << std::endl;
23}
const std::string & name() const
Constructor for elementary material (no components)
const std::vector< Entry > & components() const
void dump(std::ostream &os) const
Structure holding one service material.