Skip to content

Commit

Permalink
Merge pull request #11588 from diguida/FillInfo_injSchemeParsing
Browse files Browse the repository at this point in the history
Add member function in FillInfo to check the injection scheme for 25 ns.
  • Loading branch information
cmsbuild committed Oct 5, 2015
2 parents 8207c9b + c760381 commit 36cb33d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CondFormats/RunInfo/interface/FillInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 7 additions & 0 deletions CondFormats/RunInfo/src/FillInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 36cb33d

Please sign in to comment.