/
DumpFileToDB.h
56 lines (39 loc) · 1.2 KB
/
DumpFileToDB.h
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
#ifndef DumpFileToDB_H
#define DumpFileToDB_H
/** \class DumpFileToDB
* Dump the content of a txt file with the format
* of ORCA MuBarDigiParameters (see DTCalibrationMap for details)
* into a DB. At the moment only the ttrig info is handled.
*
* \author G. Cerminara - INFN Torino
*/
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include <string>
#include <fstream>
#include <vector>
class DTCalibrationMap;
class DTTtrig;
class DumpFileToDB : public edm::EDAnalyzer {
public:
/// Constructor
DumpFileToDB(const edm::ParameterSet& pset);
/// Destructor
virtual ~DumpFileToDB();
// Operations
// Operations
virtual void beginRun(const edm::Run& run, const edm::EventSetup& setup );
virtual void analyze(const edm::Event& event, const edm::EventSetup& setup){}
virtual void endJob();
protected:
private:
std::vector<int> readChannelsMap (std::stringstream &linestr);
const DTCalibrationMap *theCalibFile;
std::string mapFileName;
std::string dbToDump;
std::string format;
// sum the correction in the txt file (for the mean value) to what is input DB
bool diffMode;
const DTTtrig *tTrigMapOrig;
};
#endif