1 |
konec |
1.1 |
#include "UserCode/L1RpcTriggerAnalysis/interface/Pattern.h"
|
2 |
|
|
|
3 |
|
|
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
|
4 |
|
|
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
|
5 |
|
|
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
|
6 |
|
|
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
|
7 |
|
|
#include "UserCode/L1RpcTriggerAnalysis/interface/RPCDetIdUtil.h"
|
8 |
|
|
#include "UserCode/L1RpcTriggerAnalysis/interface/DTphDigiSpec.h"
|
9 |
|
|
#include "UserCode/L1RpcTriggerAnalysis/interface/CSCDigiSpec.h"
|
10 |
|
|
#include "UserCode/L1RpcTriggerAnalysis/interface/RPCDigiSpec.h"
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
bool Pattern::add ( std::pair<uint32_t, unsigned int > aData)
|
14 |
|
|
{
|
15 |
|
|
for (DataType::const_iterator it=theData.begin(); it!= theData.end(); it++) {
|
16 |
|
|
if (it->first == aData.first) {
|
17 |
|
|
return false;
|
18 |
|
|
}
|
19 |
|
|
}
|
20 |
|
|
theData.push_back(aData);
|
21 |
|
|
return true;
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
std::ostream & operator << (std::ostream &out, const Pattern &o)
|
25 |
|
|
{
|
26 |
|
|
out <<" Pattern: size: "<<o.size();
|
27 |
|
|
for (Pattern::DataType::const_iterator it=o.theData.begin(); it!= o.theData.end(); it++) {
|
28 |
|
|
DetId detId( it->first);
|
29 |
|
|
switch (detId.subdetId()) {
|
30 |
|
|
case MuonSubdetId::RPC: { out << std::endl <<" RPC: "<<RPCDigiSpec(it->first, it->second); break; }
|
31 |
|
|
case MuonSubdetId::DT: { out << std::endl <<" DT: "<<DTphDigiSpec(it->first, it->second); break; }
|
32 |
|
|
case MuonSubdetId::CSC: { out << std::endl <<" CSC: "<<CSCDigiSpec(it->first, it->second); break; }
|
33 |
|
|
};
|
34 |
|
|
}
|
35 |
|
|
return out;
|
36 |
|
|
}
|
37 |
|
|
|