SimMuon
Neutron
src
RootNeutronReader.cc
Go to the documentation of this file.
1
#include "
SimMuon/Neutron/src/RootNeutronReader.h
"
2
#include <sstream>
3
4
RootNeutronReader::RootNeutronReader
(
const
std::string
&
fileName
) :
theFile
(new TFile(
fileName
.c_str())) {}
5
6
RootChamberReader
&
RootNeutronReader::chamberReader
(
int
chamberType) {
7
std::map<int, RootChamberReader>::iterator mapItr =
theChamberReaders
.find(chamberType);
8
9
if
(mapItr !=
theChamberReaders
.end()) {
10
return
mapItr->second;
11
}
else
{
12
// make a new one
13
std::ostringstream treeName;
14
treeName <<
"ChamberType"
<< chamberType;
15
theChamberReaders
[chamberType] =
RootChamberReader
(
theFile
, treeName.str());
16
return
theChamberReaders
[chamberType];
17
}
18
}
19
20
void
RootNeutronReader::readNextEvent
(
int
chamberType,
edm::PSimHitContainer
&
result
) {
21
chamberReader
(chamberType).
read
(
result
);
22
}
RootNeutronReader::theChamberReaders
std::map< int, RootChamberReader > theChamberReaders
Definition:
RootNeutronReader.h:25
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
RootChamberReader::read
void read(edm::PSimHitContainer &hits)
Definition:
RootChamberReader.cc:25
RootChamberReader
Definition:
RootChamberReader.h:8
RootNeutronReader.h
interactiveExample.theFile
theFile
Definition:
interactiveExample.py:17
RootNeutronReader::RootNeutronReader
RootNeutronReader(const std::string &fileName)
Definition:
RootNeutronReader.cc:4
RootNeutronReader::chamberReader
RootChamberReader & chamberReader(int chamberType)
Definition:
RootNeutronReader.cc:6
RootNeutronReader::readNextEvent
void readNextEvent(int chamberType, edm::PSimHitContainer &result) override
Definition:
RootNeutronReader.cc:20
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
mps_fire.result
result
Definition:
mps_fire.py:311
RootNeutronReader::theFile
TFile * theFile
Definition:
RootNeutronReader.h:24
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition:
PSimHitContainer.h:11
Generated for CMSSW Reference Manual by
1.8.16