|
| template<typename BaggageType> |
| const BaggageType & | get (const std::string &name) |
| template<typename BaggageType> |
| void | board (const std::string &name) |
| template<typename BaggageType> |
| void | update (const std::string &name, const BaggageType &obj) |
| TBranch * | attach (TTree *tree, const std::string &name, bool can_create) |
| bool | isOnBoard (const std::string &name) |
| void | clear () |
| void | clear (const std::string &name) |
| void | everybodyOff () |
| void | stream (std::ostream &s) const |
A map of bus passengers
This is the actual bus that the passengers ride on during event processing. At its core, it is simply a specialization of a map between branch names and handles to the bus passengers (Seats) with some special accessors for connecting TTrees and updating contents.
- See also
- Bus::Seat for how we keep a handle on the Passengers
-
Bus::Passenger for what actually carries the event objects
Definition at line 29 of file Bus.h.
template<typename BaggageType>
| void board |
( |
const std::string & | name | ) |
|
|
inline |
Board a new passenger onto the bus
- Note
- Does not check if we are overwriting any other passenger!
Creates a new passenger that carries an object of type BaggageType and puts this passenger into the map of passengers.
- Note
- If you are seeing some funky "Clear not defined" compiling error while attempting to use a newly created event bus object, you should check that the class you have written matches the requirements for any of the bus types in the documentation for Bus::Passenger.
- Template Parameters
-
in] BaggageType type of object new passenger is carrying
- Parameters
-
| [in] | name | Name of new passenger (corresponds to branch name) |
Definition at line 65 of file Bus.h.
| void clear |
( |
const std::string & | name | ) |
|
|
inline |
Reset the object carried by a single passenger
Useful when only a subset of the bus should be reset – for example resetting the output passengers at the start of an event while leaving the input passengers alone, since those are refilled from the input TTree rather than by the processor.
Passengers that are not on the bus are silently ignored.
- See also
- Passenger::clear for how we clear the individual passengers
- Parameters
-
| [in] | name | name of passenger to clear |
Definition at line 143 of file Bus.h.