CondFormats
CSCObjects
src
CSCReadoutMappingFromFile.cc
Go to the documentation of this file.
1
#include "
CondFormats/CSCObjects/interface/CSCReadoutMappingFromFile.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
#include <iostream>
4
#include <fstream>
5
#include <sstream>
6
7
CSCReadoutMappingFromFile::CSCReadoutMappingFromFile
(
std::string
iName) {
fill
(
std::move
(iName)); }
8
9
CSCReadoutMappingFromFile::~CSCReadoutMappingFromFile
() {}
10
11
void
CSCReadoutMappingFromFile::fill
(
std::string
fileName
) {
12
theMappingFile
=
std::move
(
fileName
);
13
std::ifstream
in
(
theMappingFile
.c_str());
14
std::string
line
;
15
const
std::string
commentFlag =
"#"
;
16
if
(!
in
) {
17
edm::LogError
(
"CSC"
) <<
" Failed to open file "
<<
theMappingFile
<<
" containing mapping."
;
18
}
else
{
19
edm::LogInfo
(
"CSC"
) <<
" Opened file "
<<
theMappingFile
<<
" containing mapping."
;
20
21
while
(getline(
in
,
line
)) {
// getline() from <string>
22
// LogDebug("CSC") << line;
23
if
(
line
[0] != commentFlag[0]) {
24
int
i1
,
i2
,
i3
, i4, i5, i6, i7, i8, i9, i10, i11;
25
std::istringstream is(
line
);
26
is >>
i1
>>
i2
>>
i3
>> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10 >> i11;
27
// LogDebug("CSC") << i1 << " " << i2 << " " << i3 << " " << i4 << " " <<
28
// i5 << " " << i6 << " " << i7 << " " << i8 << " " << i9;
29
addRecord
(
i1
,
i2
,
i3
, i4, i5, i6, i7, i8, i9, i10, i11);
30
}
31
}
32
}
33
34
return
;
35
}
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition:
testProducerWithPsetDescEmpty_cfi.py:46
testProducerWithPsetDescEmpty_cfi.i3
i3
Definition:
testProducerWithPsetDescEmpty_cfi.py:47
MessageLogger.h
CSCReadoutMappingFromFile::~CSCReadoutMappingFromFile
~CSCReadoutMappingFromFile() override
Destructor.
Definition:
CSCReadoutMappingFromFile.cc:9
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition:
testProducerWithPsetDescEmpty_cfi.py:45
edm::LogInfo
Log< level::Info, false > LogInfo
Definition:
MessageLogger.h:125
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
CSCReadoutMappingFromFile::theMappingFile
std::string theMappingFile
Definition:
CSCReadoutMappingFromFile.h:27
CSCReadoutMappingFromFile.h
CSCReadoutMappingFromFile::CSCReadoutMappingFromFile
CSCReadoutMappingFromFile()
Definition:
CSCReadoutMappingFromFile.h:18
CSCReadoutMapping::addRecord
void addRecord(int endcap, int station, int ring, int chamber, int vmecrate, int dmb, int tmb, int tsector, int cscid, int ddu, int dcc)
Definition:
CSCReadoutMapping.cc:47
CSCReadoutMappingFromFile::fill
void fill(std::string iFullPathFileName)
Fill mapping store.
Definition:
CSCReadoutMappingFromFile.cc:11
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
eostools.move
def move(src, dest)
Definition:
eostools.py:511
mps_splice.line
line
Definition:
mps_splice.py:76
Generated for CMSSW Reference Manual by
1.8.16