39 ProducerSourceFromFiles(ps, desc,
true) {
41 produces<std::vector<L1MuRegionalCand> >(
"DT");
42 produces<std::vector<L1MuRegionalCand> >(
"CSC");
43 produces<std::vector<L1MuRegionalCand> >(
"RPCb");
44 produces<std::vector<L1MuRegionalCand> >(
"RPCf");
46 produces<L1CaloRegionCollection>();
49 throw std::runtime_error(
"L1MuGMTHWFileReader: no input file");
54 throw std::runtime_error(
"L1MuGMTHWFileReader: file " +
fileNames()[0]
55 +
" could not be openned");
84 std::unique_ptr<std::vector<L1MuRegionalCand> > DTCands(
new std::vector<L1MuRegionalCand>);
85 for (
unsigned i = 0;
i < 4;
i++) {
87 if (!mu) mu = &empty_mu;
88 DTCands->push_back(*mu);
92 std::unique_ptr<std::vector<L1MuRegionalCand> > CSCCands(
new std::vector<L1MuRegionalCand>);
93 for (
unsigned i = 0;
i < 4;
i++) {
95 if (!mu) mu = &empty_mu;
96 CSCCands->push_back(*mu);
100 std::unique_ptr<std::vector<L1MuRegionalCand> > RPCbCands(
new std::vector<L1MuRegionalCand>);
101 for (
unsigned i = 0;
i < 4;
i++) {
103 if (!mu) mu = &empty_mu;
104 RPCbCands->push_back(*mu);
108 std::unique_ptr<std::vector<L1MuRegionalCand> > RPCfCands(
new std::vector<L1MuRegionalCand>);
109 for (
unsigned i = 0;
i < 4;
i++) {
111 if (!mu) mu = &empty_mu;
112 RPCfCands->push_back(*mu);
117 for(
int ieta = 4; ieta < 18; ieta++) {
118 for(
int iphi = 0; iphi < 18; iphi++) {
134 if (line_id ==
"--")
continue;
136 if (line_id ==
"RUN") {
142 if (line_id ==
"EVT") {
149 if (line_id ==
"DT" || line_id ==
"CSC" || line_id ==
"BRPC" || line_id ==
"FRPC")
156 m_in >>
val; inpmu |= (val & 0x01) << 24;
157 m_in >>
val; inpmu |= (val & 0x01) << 23;
158 m_in >>
val; inpmu |= (val & 0x01) << 22;
159 m_in >>
val; inpmu |= (val & 0x3f) << 16;
160 m_in >>
val; inpmu |= (val & 0x07) << 13;
161 m_in >>
val; inpmu |= (val & 0x1f) << 8;
162 m_in >>
val; inpmu |= (val & 0xff) ;
165 chipid += line_id[0];
168 if (line_id ==
"DT") type = 0;
169 if (line_id ==
"CSC") type = 2;
170 if (line_id ==
"BRPC") type = 1;
171 if (line_id ==
"FRPC") type = 3;
180 if (line_id ==
"MIP") {
183 for (
int i=0;
i<nPairs;
i++) {
188 if (phi >= 9) phi-=9;
194 if (line_id ==
"NQ") {
197 for (
int i=0;
i<nPairs;
i++) {
202 if (phi >= 9) phi-=9;
209 const int sz=4000;
char buf[sz];
210 m_in.getline(buf, sz);
212 }
while (line_id !=
"NQ" && !
m_in.eof());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
L1MuGMTHWFileReader(edm::ParameterSet const &, edm::InputSourceDescription const &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< std::string > const & fileNames() const
void setBx(int bx)
Set Bunch Crossing.
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
unsigned long long TimeValue_t
~L1MuGMTHWFileReader() override
A calorimeter trigger region (sum of 4x4 trigger towers)
std::vector< L1CaloRegion > L1CaloRegionCollection
bool setRunAndEventInfo(edm::EventID &id, edm::TimeValue_t &time, edm::EventAuxiliary::ExperimentType &eType) override
void produce(edm::Event &) override