22 #include <boost/algorithm/string/split.hpp>
23 #include <boost/algorithm/string_regex.hpp>
38 cout <<
"[DTTPGParamsWriter]Constructor called!" << endl;
48 cout <<
"[DTTPGParamsWriter]Destructor called!" << endl;
56 cout <<
"[DTTPGParamsWriter]Reading data from file." << endl;
58 std::ifstream inputFile_(inputFileName_.c_str());
62 while(std::getline(inputFile_, line)) {
66 pharseLine(line,chId,fine,coarse);
72 std::cout <<
"[DTTPGParamsWriter] Read data for chamber " << chId
73 <<
". File params -> fine: " << fine <<
" coarse: " << coarse
74 <<
". DB params -> fine: " << fineDB <<
" coarse: " << coarseDB << std::endl;
79 std::cout <<
"[DTTPGParamsWriter] # of entries written the the DB: " << nLines << std::endl;
82 std::cout <<
"[DTTPGParamsWriter] # of DB entries != 250. Check you input file!" << std::endl;
95 if (elements.size() != 5) {
96 std::cout <<
"[DTTPGParamsWriter] wrong number of entries in line : " << line <<
" pleas check your input file syntax!" << std::endl;
98 chId =
DTChamberId(atoi(elements[0].c_str()),atoi(elements[1].c_str()),atoi(elements[2].c_str()));
99 fine = atof(elements[3].c_str());
100 coarse = atoi(elements[4].c_str());
108 cout <<
"[DTTPGParamsWriter] Writing ttrig object to DB!" << endl;
110 string delayRecord =
"DTTPGParametersRcd";
T getUntrackedParameter(std::string const &, T const &) const
void pharseLine(std::string &line, DTChamberId &chId, float &fine, int &coarse)
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Compute the ttrig by fiting the TB rising edge.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual ~DTTPGParamsWriter()
Destructor.
void endJob()
Write ttrig in the DB.
static void writeToDB(std::string record, T *payload)
DTTPGParamsWriter(const edm::ParameterSet &pset)
Constructor.