#include <RootNeutronReader.h>
Public Member Functions | |
RootChamberReader & | chamberReader (int chamberType) |
virtual void | readNextEvent (int chamberType, edm::PSimHitContainer &result) |
RootNeutronReader (const std::string &fileName) | |
Private Attributes | |
std::map< int, RootChamberReader > | theChamberReaders |
TFile * | theFile |
This reads patterns of neutron hits in muon chambers from an ROOT database, so they can be superimposed onto signal events. It reads the events sequentially, and loops back to the beginning when it reaches EOF
Definition at line 15 of file RootNeutronReader.h.
RootNeutronReader::RootNeutronReader | ( | const std::string & | fileName | ) |
Definition at line 4 of file RootNeutronReader.cc.
RootChamberReader & RootNeutronReader::chamberReader | ( | int | chamberType | ) |
Definition at line 10 of file RootNeutronReader.cc.
References theChamberReaders, and theFile.
Referenced by readNextEvent().
{ std::map<int, RootChamberReader>::iterator mapItr = theChamberReaders.find(chamberType); if(mapItr != theChamberReaders.end()) { return mapItr->second; } else { // make a new one std::ostringstream treeName; treeName << "ChamberType" << chamberType; theChamberReaders[chamberType] = RootChamberReader(theFile, treeName.str()); return theChamberReaders[chamberType]; } }
void RootNeutronReader::readNextEvent | ( | int | chamberType, |
edm::PSimHitContainer & | result | ||
) | [virtual] |
Implements NeutronReader.
Definition at line 30 of file RootNeutronReader.cc.
References chamberReader(), and RootChamberReader::read().
{ chamberReader(chamberType).read(result); }
std::map<int, RootChamberReader> RootNeutronReader::theChamberReaders [private] |
Definition at line 26 of file RootNeutronReader.h.
Referenced by chamberReader().
TFile* RootNeutronReader::theFile [private] |
Definition at line 25 of file RootNeutronReader.h.
Referenced by chamberReader().