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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef DTTPDeadWriter_H
#define DTTPDeadWriter_H
/* Class to find test-pulse dead channels from a t0 databases:
* wires without t0 value are tp-dead.
* \author S. Bolognesi
*/
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "Geometry/DTGeometry/interface/DTGeometry.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "CondFormats/DTObjects/interface/DTT0.h"
#include "CondFormats/DataRecord/interface/DTT0Rcd.h"
#include <string>
namespace edm {
class ParameterSet;
class Event;
class EventSetup;
} // namespace edm
class DTT0;
class DTDeadFlag;
class DTTPDeadWriter : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
public:
/// Constructor
DTTPDeadWriter(const edm::ParameterSet& pset);
/// Destructor
~DTTPDeadWriter() override;
// Operations
///Read t0 map from event
void beginRun(const edm::Run&, const edm::EventSetup& setup) override;
/// Compute the ttrig by fiting the TB rising edge
void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
void endRun(const edm::Run&, const edm::EventSetup& setup) override {}
/// Write ttrig in the DB
void endJob() override;
protected:
private:
// Debug flag
bool debug;
//The map of t0 to be read from event
const DTT0* tZeroMap;
edm::ESGetToken<DTT0, DTT0Rcd> t0Token_;
// The object to be written to DB
DTDeadFlag* tpDeadList;
//The DTGeometry
edm::ESHandle<DTGeometry> muonGeom;
const edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
};
#endif
|