Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add member function in FillInfo to check the injection scheme for 25 ns. #11588

Merged
merged 1 commit into from
Oct 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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