41 ExternalInputSource(ps, desc) {
43 produces<std::vector<L1MuRegionalCand> >(
"DT");
44 produces<std::vector<L1MuRegionalCand> >(
"CSC");
45 produces<std::vector<L1MuRegionalCand> >(
"RPCb");
46 produces<std::vector<L1MuRegionalCand> >(
"RPCf");
48 produces<L1CaloRegionCollection>();
51 throw std::runtime_error(
"L1MuGMTHWFileReader: no input file");
56 throw std::runtime_error(
"L1MuGMTHWFileReader: file " +
fileNames()[0]
57 +
" could not be openned");
86 std::auto_ptr<std::vector<L1MuRegionalCand> > DTCands(
new std::vector<L1MuRegionalCand>);
87 for (
unsigned i = 0;
i < 4;
i++) {
89 if (!mu) mu = &empty_mu;
90 DTCands->push_back(*mu);
94 std::auto_ptr<std::vector<L1MuRegionalCand> > CSCCands(
new std::vector<L1MuRegionalCand>);
95 for (
unsigned i = 0;
i < 4;
i++) {
97 if (!mu) mu = &empty_mu;
98 CSCCands->push_back(*mu);
100 e.
put(CSCCands,
"CSC");
102 std::auto_ptr<std::vector<L1MuRegionalCand> > RPCbCands(
new std::vector<L1MuRegionalCand>);
103 for (
unsigned i = 0;
i < 4;
i++) {
105 if (!mu) mu = &empty_mu;
106 RPCbCands->push_back(*mu);
108 e.
put(RPCbCands,
"RPCb");
110 std::auto_ptr<std::vector<L1MuRegionalCand> > RPCfCands(
new std::vector<L1MuRegionalCand>);
111 for (
unsigned i = 0;
i < 4;
i++) {
113 if (!mu) mu = &empty_mu;
114 RPCfCands->push_back(*mu);
116 e.
put(RPCfCands,
"RPCf");
119 for(
int ieta = 4; ieta < 18; ieta++) {
120 for(
int iphi = 0; iphi < 18; iphi++) {
138 if (line_id ==
"--")
continue;
140 if (line_id ==
"RUN") {
146 if (line_id ==
"EVT") {
153 if (line_id ==
"DT" || line_id ==
"CSC" || line_id ==
"BRPC" || line_id ==
"FRPC")
160 m_in >> val; inpmu |= (val & 0x01) << 24;
161 m_in >> val; inpmu |= (val & 0x01) << 23;
162 m_in >> val; inpmu |= (val & 0x01) << 22;
163 m_in >> val; inpmu |= (val & 0x3f) << 16;
164 m_in >> val; inpmu |= (val & 0x07) << 13;
165 m_in >> val; inpmu |= (val & 0x1f) << 8;
166 m_in >> val; inpmu |= (val & 0xff) ;
168 std::string chipid(
"IN");
169 chipid += line_id[0];
172 if (line_id ==
"DT") type = 0;
173 if (line_id ==
"CSC") type = 2;
174 if (line_id ==
"BRPC") type = 1;
175 if (line_id ==
"FRPC") type = 3;
184 if (line_id ==
"MIP") {
187 for (
int i=0;
i<nPairs;
i++) {
192 if (phi >= 9) phi-=9;
198 if (line_id ==
"NQ") {
201 for (
int i=0;
i<nPairs;
i++) {
206 if (phi >= 9) phi-=9;
213 const int sz=4000;
char buf[sz];
214 m_in.getline(buf, sz);
216 }
while (line_id !=
"NQ" && !
m_in.eof());
virtual void setRunAndEventInfo()
L1MuGMTHWFileReader(edm::ParameterSet const &, edm::InputSourceDescription const &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void setBx(int bx)
Set Bunch Crossing.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
virtual bool produce(edm::Event &)
A calorimeter trigger region (sum of 4x4 trigger towers)
std::vector< L1CaloRegion > L1CaloRegionCollection