42 theFile =
new TFile(theRootInputFile.c_str(),
"READ");
58 cout <<
"[DTTTrigWriter]Constructor called!" << endl;
64 cout <<
"[DTTTrigWriter]Destructor called!" << endl;
72 cout <<
"[DTTTrigWriter]Analyzer called!" << endl;
78 const vector<const DTSuperLayer*> superLayers =
dtGeom->superLayers();
81 for (
auto sl = superLayers.begin(); sl != superLayers.end(); sl++) {
92 cout <<
" SL: " << slId <<
" mean = " << meanAndSigma.first <<
" sigma = " << meanAndSigma.second << endl;
101 cout <<
"[DTTTrigWriter]Writing ttrig object to DB!" << endl;
104 string tTrigRecord =
"DTTtrigRcd";
DTTimeBoxFitter * theFitter
T getUntrackedParameter(std::string const &, T const &) const
static void writeToDB(std::string record, const T &payload)
std::string theRootInputFile
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
std::string to_string(const V &value)
void setVerbosity(unsigned int lvl)
Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug.
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Compute the ttrig by fiting the TB rising edge.
DTTTrigWriter(const edm::ParameterSet &pset)
Constructor.
std::string getTBoxName(const DTSuperLayerId &slId) const
edm::ESHandle< DTGeometry > dtGeom
void setFitSigma(double sigma)
int superlayer() const
Return the superlayer number (deprecated method name)
std::pair< double, double > fitTimeBox(TH1F *hTimeBox)
Fit the rising edge of the time box returning mean value and sigma (first and second respectively) ...
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
int station() const
Return the station number.
int wheel() const
Return the wheel number.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
void endJob() override
Write ttrig in the DB.
~DTTTrigWriter() override
Destructor.