Skip to content

Commit

Permalink
Add member function in FillInfo to check the injection scheme for 25 ns.
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvatore Di Guida committed Oct 1, 2015
1 parent 8f7ce9a commit c760381
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 c760381

Please sign in to comment.