diff --git a/CondFormats/RunInfo/interface/FillInfo.h b/CondFormats/RunInfo/interface/FillInfo.h index ec69ac954d6cf..5b0c4ed96b286 100644 --- a/CondFormats/RunInfo/interface/FillInfo.h +++ b/CondFormats/RunInfo/interface/FillInfo.h @@ -62,7 +62,11 @@ class FillInfo { cond::Time_t const endTime() const; std::string const & injectionScheme() const; - + + //returns a boolean, true if the injection scheme has a leading 25ns + //TODO: parse the circulating bunch configuration, instead of the string. + bool is25nsBunchSpacing() const; + //returns a boolean, true if the bunch slot number is in the circulating bunch configuration bool isBunchInBeam1( size_t const & bunch ) const; diff --git a/CondFormats/RunInfo/src/FillInfo.cc b/CondFormats/RunInfo/src/FillInfo.cc index a6b6116edd66b..0972adf183091 100644 --- a/CondFormats/RunInfo/src/FillInfo.cc +++ b/CondFormats/RunInfo/src/FillInfo.cc @@ -208,6 +208,13 @@ std::string const & FillInfo::injectionScheme() const { return m_injectionScheme; } +//returns a boolean, true if the injection scheme has a leading 25ns +//TODO: parse the circulating bunch configuration, instead of the string. +bool FillInfo::is25nsBunchSpacing() const { + const std::string prefix( "25ns" ); + return std::equal( prefix.begin(), prefix.end(), m_injectionScheme.begin() ); +} + //returns a boolean, true if the bunch slot number is in the circulating bunch configuration bool FillInfo::isBunchInBeam1( size_t const & bunch ) const { if( bunch == 0 )