CMS 3D CMS Logo

MaterialBudgetTxt Class Reference

#include <Validation/Geometry/interface/MaterialBudgetTxt.h>

Inheritance diagram for MaterialBudgetTxt:

MaterialBudgetFormat

List of all members.

Public Member Functions

virtual void fillEndTrack ()
virtual void fillPerStep ()
virtual void fillStartTrack ()
 MaterialBudgetTxt (MaterialBudgetData *data, const std::string &fileName)
virtual ~MaterialBudgetTxt ()

Private Attributes

std::ofstream * theFile


Detailed Description

Definition at line 9 of file MaterialBudgetTxt.h.


Constructor & Destructor Documentation

MaterialBudgetTxt::MaterialBudgetTxt ( MaterialBudgetData data,
const std::string &  fileName 
)

Definition at line 7 of file MaterialBudgetTxt.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), out, and theFile.

00007                                                                                          : MaterialBudgetFormat( data )
00008 {
00009   const char * fnamechar = fileName.c_str();
00010   theFile = new std::ofstream(fnamechar, std::ios::out);
00011   std::cout <<"Dumping  Material Budget to " << fileName << std::endl;
00012   if (theFile->fail()){
00013     std::cerr <<" Error opening file" << fileName << std::endl;
00014   }
00015 }

MaterialBudgetTxt::~MaterialBudgetTxt (  )  [virtual]

Definition at line 18 of file MaterialBudgetTxt.cc.

References theFile.

00019 {
00020   theFile->close();
00021 }


Member Function Documentation

void MaterialBudgetTxt::fillEndTrack (  )  [virtual]

Implements MaterialBudgetFormat.

Definition at line 41 of file MaterialBudgetTxt.cc.

References lat::endl(), MaterialBudgetData::getTotalMB(), and MaterialBudgetFormat::theData.

Referenced by MaterialBudgetAction::update().

00042 {
00043   (*theFile) << G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() << " " << "finalTrkMB " << theData->getTotalMB() << std::endl;
00044 }

void MaterialBudgetTxt::fillPerStep (  )  [virtual]

Implements MaterialBudgetFormat.

Definition at line 33 of file MaterialBudgetTxt.cc.

References lat::endl(), MaterialBudgetData::getPVcopyNo(), MaterialBudgetData::getPVname(), MaterialBudgetData::getRadLen(), MaterialBudgetData::getTotalMB(), MaterialBudgetData::getTrkLen(), and MaterialBudgetFormat::theData.

Referenced by MaterialBudgetAction::update().

00034 {
00035   (*theFile) << "step "<< theData->getTrkLen() << " " << theData->getPVname() << " " << theData->getPVcopyNo()  << " " << theData->getTotalMB() << " " << theData->getRadLen() << std::endl;
00036   //    std::cout << "step "<< theData->getTrkLen() << " " << theData->getPVname() << " " << theData->getPVcopyNo()  << " " << theData->getTotalMB() << " " << theData->getRadLen() << std::endl;
00037 
00038 }

void MaterialBudgetTxt::fillStartTrack (  )  [virtual]

Implements MaterialBudgetFormat.

Definition at line 24 of file MaterialBudgetTxt.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), MaterialBudgetData::getEta(), MaterialBudgetData::getPhi(), and MaterialBudgetFormat::theData.

Referenced by MaterialBudgetAction::update().

00025 {
00026    std::cout << " Track "<< G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() << " " << theData->getEta() << " " << theData->getPhi() << std::endl;
00027   (*theFile)<< " Track "<< G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() << " " << theData->getEta() << " " << theData->getPhi() << std::endl;
00028   // + 1 was GEANT3 notation    (*theFile)<< " Track "<< G4EventManager::GetEventManager()->GetConstCurrentEvent()->GetEventID() + 1<< " " << theData->getEta() << " " << theData->getPhi() << std::endl;
00029 
00030 }


Member Data Documentation

std::ofstream* MaterialBudgetTxt::theFile [private]

Definition at line 20 of file MaterialBudgetTxt.h.

Referenced by MaterialBudgetTxt(), and ~MaterialBudgetTxt().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:03 2009 for CMSSW by  doxygen 1.5.4