15 declareProperty(
"RunLumiList",
m_runlumilist,
"List of all IOVTimes ((run << 32) + (0xFFFFFFFF & lumiblock)). Same length as ScaleFactorList." );
16 declareProperty(
"ScaleFactorList",
m_scalefactorlist,
"List of scale factors for the luminosity. Same length as RunLumiList.");
27 std::vector<uint64_t>::const_iterator iRL(rProp.begin());
28 std::vector<uint64_t>::const_iterator prEnd(rProp.end());
30 std::vector<float>::const_iterator iSF(sProp.begin());
31 std::vector<float>::const_iterator psEnd(sProp.end());
32 if (rProp.size() != sProp.size())
34 ATH_MSG_ERROR(
"Length of RunLumiList differs from length of ScaleFactorList!");
35 return StatusCode::FAILURE;
37 for( ; iRL != prEnd && iSF != psEnd; ++iRL, ++iSF )
41 return StatusCode::SUCCESS;
46 uint64_t now = (( (uint64_t)
run << 32) + lumi);
54 ATH_MSG_WARNING(
"Did not find lumi scale factor for run " <<
run <<
" lb " << lumi <<
"; using cached value.");
#define ATH_MSG_WARNING(x)
A IBeamLuminosity service configured with a run/lumi list.
virtual StatusCode initialize() override final
virtual ~LumiProfileSvc()
SimpleProperty< std::vector< float > > m_scalefactorlist
float m_currentSF
cached scale factor
uint64_t m_now
cached iovtime
LumiProfileSvc(const std::string &name, ISvcLocator *svc)
SimpleProperty< std::vector< uint64_t > > m_runlumilist
look-up table of lumi scale factor by run, lumiblock
virtual float scaleFactor(unsigned int run, unsigned int lumi, bool &updated) override final
std::map< uint64_t, float > m_scaleFactorMap
map from properties
int run(int argc, char *argv[])