41 ProducerSourceFromFiles(ps, desc,
true) {
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++) {
136 if (line_id ==
"--")
continue;
138 if (line_id ==
"RUN") {
144 if (line_id ==
"EVT") {
151 if (line_id ==
"DT" || line_id ==
"CSC" || line_id ==
"BRPC" || line_id ==
"FRPC")
158 m_in >> val; inpmu |= (val & 0x01) << 24;
159 m_in >> val; inpmu |= (val & 0x01) << 23;
160 m_in >> val; inpmu |= (val & 0x01) << 22;
161 m_in >> val; inpmu |= (val & 0x3f) << 16;
162 m_in >> val; inpmu |= (val & 0x07) << 13;
163 m_in >> val; inpmu |= (val & 0x1f) << 8;
164 m_in >> val; inpmu |= (val & 0xff) ;
167 chipid += line_id[0];
170 if (line_id ==
"DT") type = 0;
171 if (line_id ==
"CSC") type = 2;
172 if (line_id ==
"BRPC") type = 1;
173 if (line_id ==
"FRPC") type = 3;
182 if (line_id ==
"MIP") {
185 for (
int i=0;
i<nPairs;
i++) {
190 if (phi >= 9) phi-=9;
196 if (line_id ==
"NQ") {
199 for (
int i=0;
i<nPairs;
i++) {
204 if (phi >= 9) phi-=9;
211 const int sz=4000;
char buf[sz];
212 m_in.getline(buf, sz);
214 }
while (line_id !=
"NQ" && !
m_in.eof());
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.
virtual bool setRunAndEventInfo(edm::EventID &id, edm::TimeValue_t &time)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &)
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
unsigned long long TimeValue_t
A calorimeter trigger region (sum of 4x4 trigger towers)
std::vector< L1CaloRegion > L1CaloRegionCollection