29 for(
auto & train :
getList(
"bcids") ) {
30 size_t first = train.getAttribute<
size_t>(
"first");
31 size_t length = train.getAttribute<
size_t>(
"length");
48 if( bcid >= train.first and bcid < train.first+train.second ) {
63 for (uint16_t i = 0; i < train.second; ++i)
65 bunches.push_back(train.first + i);
100 for(
auto & bg :
data().get_child(
"bunchGroups") ) {
101 auto bg_sptr = std::make_shared<L1BunchGroup>(bg.second);
103 std::forward_as_tuple(bg.first),
104 std::forward_as_tuple(bg_sptr->id()) );
117const std::shared_ptr<TrigConf::L1BunchGroup> &
122const std::shared_ptr<TrigConf::L1BunchGroup> &
151 std::cout <<
"Name '" <<
name() <<
"'" << std::endl;
152 std::cout <<
"Number of non-empty bunchgroups: " <<
sizeNonEmpty() << std::endl;
156 std::cout <<
" " << bg->name() <<
" (id " << bg->id() <<
") has " << bg->size() <<
" bunches" << std::endl;
162 std::cout <<
"Bunchgroup " << paired->name() <<
" has " << paired->size() <<
" bunches" << std::endl;
char data[hepevt_bytes_allocation_ATLAS]
static const Attributes_t empty
virtual const std::string & name() const final
std::vector< DataStructure > getList(const std::string &pathToChild, bool ignoreIfMissing=false) const
Access to array structure.
bool isInitialized() const
const ptree & data() const
Access to the underlying data, if needed.
DataStructure()
Default constructor, leading to an uninitialized configuration object.
T getAttribute(const std::string &key, bool ignoreIfMissing=false, const T &def=T()) const
Access to simple attribute.
std::vector< std::shared_ptr< L1BunchGroup > > m_bunchGroups
vector of size 16 (L1BunchGroup::s_maxBunchGroups
static const size_t s_maxBunchGroups
Hardware limit for number of bunch group.
std::map< std::string, size_t > m_bunchGroupsByName
maps bgrp name (BGRP0, BGRP1,...) to bunchgroup
bgPattern_t bgPattern(size_t bcid) const
Return word with bit-pattern of fired bunchgroups for given bcid.
L1BunchGroupSet()
Constructor.
std::size_t size() const
Accessor to the number of defined bunchgroups.
const std::shared_ptr< L1BunchGroup > & getBunchGroup(const std::string &name) const
Accessor to the bunchgroup by name.
unsigned int m_bgsk
the bunch group key
virtual void clear() override
Clearing the configuration data.
uint16_t bgPattern_t
type for bunchgroup pattern bitset
virtual ~L1BunchGroupSet()
Destructor.
std::size_t sizeNonEmpty() const
Accessor to the number of non-empty bunchgroups.
void printSummary(bool detailed=false) const
print a more or less detailed summary
bool contains(size_t bcid) const
check if bunchgroup contains a certain bunch
std::vector< std::pair< size_t, size_t > > m_bunchdef
std::size_t size() const
Accessor to the number of bunches.
L1BunchGroup()
Constructor.
std::vector< uint16_t > bunches() const
list of all bunches
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring