1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/**
* \file DummyHitFinderModule.h
* dummy module for the test of DaqFileInputService
*
*
* \author N. Amapane - S. Argiro'
*
*/
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/DTDigi/interface/DTDigiCollection.h"
#include <iostream>
#include <vector>
class DummyHitFinderModule : public edm::one::EDAnalyzer<> {
public:
DummyHitFinderModule(const edm::ParameterSet& ps) {}
protected:
void analyze(edm::Event const& e, const edm::EventSetup& c) {
// ...Reconstruction, first step are the unpacking modules to
// build digis...
edm::Handle<DTDigiCollection> dtdigis;
e.getByLabel("dtunpacker", dtdigis);
DTDigiCollection::DigiRangeIterator detUnitIt;
for (detUnitIt = dtdigis->begin(); detUnitIt != dtdigis->end(); ++detUnitIt) {
for (DTDigiCollection::const_iterator digiIt = (*detUnitIt).second.first; digiIt != (*detUnitIt).second.second;
++digiIt) {
std::cout << "Digi: " << *digiIt << std::endl;
} // for cells
} // for layers
} // analyze
}; // class DummyHitFinderModule
DEFINE_FWK_MODULE(DummyHitFinderModule);
|