src
CondFormats
CSCObjects
src
CSCTriggerMappingFromFile.cc
Go to the documentation of this file.
1
#include "
CondFormats/CSCObjects/interface/CSCTriggerMappingFromFile.h
"
2
#include <iostream>
3
#include <fstream>
4
#include <sstream>
5
6
CSCTriggerMappingFromFile::CSCTriggerMappingFromFile
(
std::string
filename
) : filename_(
filename
) {
fill
(); }
7
8
CSCTriggerMappingFromFile::~CSCTriggerMappingFromFile
() {}
9
10
void
CSCTriggerMappingFromFile::fill
(
void
) {
11
std::ifstream
in
(
filename_
.c_str());
12
std::string
line
;
13
const
std::string
commentFlag =
"#"
;
14
if
(!
in
) {
15
std::cout
<<
"CSCTriggerMappingFromFile: ERROR! Failed to open file containing mapping, "
<<
filename_
<< std::endl;
16
}
else
{
17
std::cout
<<
"CSCTriggerMappingFromFile: opened file containing mapping, "
<<
filename_
<< std::endl;
18
19
while
(getline(
in
,
line
)) {
// getline() from <string>
20
if
(
debugV
())
21
std::cout
<<
line
<< std::endl;
22
if
(
line
[0] != commentFlag[0]) {
23
int
i1
,
i2
,
i3
, i4, i5, i6, i7, i8, i9, i10;
24
std::istringstream is(
line
);
25
is >>
i1
>>
i2
>>
i3
>> i4 >> i5 >> i6 >> i7 >> i8 >> i9 >> i10;
26
if
(
debugV
())
27
std::cout
<<
i1
<<
" "
<<
i2
<<
" "
<<
i3
<<
" "
<< i4 <<
" "
<< i5 <<
" "
<< i6 <<
" "
<< i7 <<
" "
<< i8
28
<<
" "
<< i9 <<
" "
<< i10 << std::endl;
29
addRecord
(
i1
,
i2
,
i3
, i4, i5, i6, i7, i8, i9, i10);
30
}
31
}
32
}
33
34
return
;
35
}
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:123
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition:
testProducerWithPsetDescEmpty_cfi.py:46
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
CSCTriggerMapping::addRecord
void addRecord(int rendcap, int rstation, int rsector, int rsubsector, int rcscid, int cendcap, int cstation, int csector, int csubsector, int ccscid)
Definition:
CSCTriggerMapping.cc:31
CSCTriggerMappingFromFile.h
mps_splice.line
line
Definition:
mps_splice.py:76
CSCTriggerMappingFromFile::fill
void fill(void) override
Fill mapping store.
Definition:
CSCTriggerMappingFromFile.cc:10
testProducerWithPsetDescEmpty_cfi.i3
i3
Definition:
testProducerWithPsetDescEmpty_cfi.py:47
CSCTriggerMapping::debugV
bool debugV(void) const
Definition:
CSCTriggerMapping.h:121
CSCTriggerMappingFromFile::CSCTriggerMappingFromFile
CSCTriggerMappingFromFile()
Definition:
CSCTriggerMappingFromFile.h:17
CSCTriggerMappingFromFile::filename_
std::string filename_
Definition:
CSCTriggerMappingFromFile.h:26
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition:
testProducerWithPsetDescEmpty_cfi.py:45
CSCTriggerMappingFromFile::~CSCTriggerMappingFromFile
~CSCTriggerMappingFromFile() override
Destructor.
Definition:
CSCTriggerMappingFromFile.cc:8
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
Generated for CMSSW Reference Manual by
1.8.14