45 theFile =
new TFile(theRootInputFile.c_str(),
"READ");
49 theFitter->setVerbosity(1);
52 theFitter->setFitSigma(sigmaFit);
61 cout <<
"[DTTTrigWriter]Constructor called!" << endl;
69 cout <<
"[DTTTrigWriter]Destructor called!" << endl;
79 cout <<
"[DTTTrigWriter]Analyzer called!" << endl;
86 const vector<const DTSuperLayer*> superLayers = dtGeom->
superLayers();
89 for(
auto sl = superLayers.begin();
90 sl != superLayers.end(); sl++) {
94 TH1F*
histo = (TH1F*)
theFile->Get((getTBoxName(slId)).c_str());
97 pair<double, double> meanAndSigma = theFitter->fitTimeBox(histo);
106 cout <<
" SL: " << slId
107 <<
" mean = " << meanAndSigma.first
108 <<
" sigma = " << meanAndSigma.second << endl;
119 cout <<
"[DTTTrigWriter]Writing ttrig object to DB!" << endl;
122 string tTrigRecord =
"DTTtrigRcd";
134 stringstream theStream;
137 theStream >> histoName;
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Compute the ttrig by fiting the TB rising edge.
void endJob()
Write ttrig in the DB.
DTTTrigWriter(const edm::ParameterSet &pset)
Constructor.
std::string getTBoxName(const DTSuperLayerId &slId) const
int superlayer() const
Return the superlayer number (deprecated method name)
int station() const
Return the station number.
int wheel() const
Return the wheel number.
static void writeToDB(std::string record, T *payload)
const std::vector< const DTSuperLayer * > & superLayers() const
Return a vector of all SuperLayer.
virtual ~DTTTrigWriter()
Destructor.