@@ -30,14 +30,13 @@ sbndDB::PMTCalibrationDatabaseProvider::PMTCalibrationDatabaseProvider(
3030 , fLogCategory {pset.get <std::string>(" LogCategory" , " PMTTimingCorrection" )}
3131{
3232 fhicl::ParameterSet const tags{pset.get <fhicl::ParameterSet>(" CorrectionTags" )};
33- fCablesTag = tags.get <std::string>(" CablesTag " );
33+ fPMTCalibrationDatabaseTag = tags.get <std::string>(" PMTCalibrationDatabaseTag " );
3434 fDatabaseTimeStamp = tags.get <long >(" DatabaseTimeStamp" );
3535 fTableName = tags.get <std::string>(" TableName" );
36- fVariabletoread = tags.get <std::string>(" VariableToRead" );
3736 fSERLength = tags.get <size_t >(" SERLength" );
3837 if (fVerbose )
3938 mf::LogInfo (fLogCategory ) << " Database tags for timing corrections:\n "
40- << " Cables corrections " << fCablesTag << " \n " ;
39+ << " Cables corrections " << fPMTCalibrationDatabaseTag << " \n " ;
4140}
4241
4342// -------------------------------------------------------------------------------
@@ -47,7 +46,7 @@ uint64_t sbndDB::PMTCalibrationDatabaseProvider::RunToDatabaseTimestamp(uint32_t
4746
4847 // Run number to timestamp used in the db
4948 // DBFolder.h only takes 19 digit (= timestamp in nano second),
50- // but ICARUS tables are currently using run numbers
49+ // but SBND tables are currently using run numbers
5150 // Step 1) Add 1000000000 to the run number; e.g., run XXXXX -> 10000XXXXX
5251 // Step 2) Multiply 1000000000
5352 uint64_t runNum = uint64_t (run);
@@ -65,14 +64,10 @@ uint64_t sbndDB::PMTCalibrationDatabaseProvider::RunToDatabaseTimestamp(uint32_t
6564// / Function to look up the calibration database at the table holding the pmt hardware cables corrections
6665void sbndDB::PMTCalibrationDatabaseProvider::ReadPMTCalibration (uint32_t run)
6766{
68-
69- // pmt_cables_delay: delays of the cables relative to trigger
70- // and reset distribution
71-
7267 const std::string dbname (fTableName );
73- lariov::DBFolder db (dbname, " " , " " , fCablesTag , true , false );
68+ lariov::DBFolder db (dbname, " " , " " , fPMTCalibrationDatabaseTag , true , false );
7469
75- bool ret = db.UpdateData (fDatabaseTimeStamp ); // select table based on run number
70+ bool ret = db.UpdateData (fDatabaseTimeStamp ); // select table based on timestamp (this is temporary, once we generate db based on run numbers this should be changed)
7671 mf::LogDebug (fLogCategory ) << dbname + " corrections" << (ret ? " " : " not" )
7772 << " updated for run " << run;
7873 mf::LogTrace (fLogCategory )
0 commit comments