Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preparing alternative e-map handling #8600

Merged
merged 1 commit into from
Apr 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion EventFilter/HcalRawToDigi/plugins/HcalRawToDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ HcalRawToDigi::HcalRawToDigi(edm::ParameterSet const& conf):
unpackerMode_(conf.getUntrackedParameter<int>("UnpackerMode",0)),
expectedOrbitMessageTime_(conf.getUntrackedParameter<int>("ExpectedOrbitMessageTime",-1))
{
electronicsMapLabel_ = conf.getParameter<std::string>("ElectronicsMap");
tok_data_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("InputLabel"));

if (fedUnpackList_.empty()) {
Expand Down Expand Up @@ -77,6 +78,7 @@ void HcalRawToDigi::fillDescriptions(edm::ConfigurationDescriptions& description
desc.addUntracked<int>("UnpackerMode",0);
desc.addUntracked<int>("ExpectedOrbitMessageTime",-1);
desc.add<edm::InputTag>("InputLabel",edm::InputTag("rawDataCollector"));
desc.add<std::string>("ElectronicsMap","");
descriptions.add("hcalRawToDigi",desc);
}

Expand All @@ -90,7 +92,9 @@ void HcalRawToDigi::produce(edm::Event& e, const edm::EventSetup& es)
// get the mapping
edm::ESHandle<HcalDbService> pSetup;
es.get<HcalDbRecord>().get( pSetup );
const HcalElectronicsMap* readoutMap=pSetup->getHcalMapping();
edm::ESHandle<HcalElectronicsMap> item;
es.get<HcalElectronicsMapRcd>().get(electronicsMapLabel_, item);
const HcalElectronicsMap* readoutMap = item.product();

// Step B: Create empty output : three vectors for three classes...
std::vector<HBHEDataFrame> hbhe;
Expand Down
1 change: 1 addition & 0 deletions EventFilter/HcalRawToDigi/plugins/HcalRawToDigi.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class HcalRawToDigi : public edm::stream::EDProducer <>
const bool unpackCalib_, unpackZDC_, unpackTTP_;
const bool silent_, complainEmptyData_;
const int unpackerMode_, expectedOrbitMessageTime_;
std::string electronicsMapLabel_;

struct Statistics {
int max_hbhe, ave_hbhe;
Expand Down