| 
    Jpp
    18.5.2
    
   the software that should make you happy 
   | 
 
Helper class for event weighing. More...
#include <JEvtWeightHelper.hh>
  
 Public Member Functions | |
| JEvtWeightHelper () | |
| Default constructor.  More... | |
| JEvtWeightHelper (const JEvtWeight &weighter) | |
| Constructor.  More... | |
| void | configure (const JEvtWeight &weighter) | 
| Configuration.  More... | |
| bool | check (const JHead &header) const | 
| Check if a given header is consistent with this event weighter.  More... | |
| JEvtWeight & | getEvtWeighter () const | 
| Get reference to event-weighter.  More... | |
| void | add (const JHead &header) | 
| Add header.  More... | |
| double | getWeight (const Evt &evt) const | 
| Get weight of given event.  More... | |
| double | getNormalisation () const | 
| Get event-weight normalisation.  More... | |
| double | getNormalisation (const Evt &evt) const | 
| Get event-weight normalisation.  More... | |
| Vec | coord_origin () const | 
| Get coordinate origin.  More... | |
| const JHead & | getHeader () const | 
| Get header.  More... | |
| JHead & | getHeader () | 
| Get header.  More... | |
| void | setHeader (const JHead &header) | 
| Set header.  More... | |
| void | createUUID () | 
| Create UUID if not already set.  More... | |
| template<class T > | |
| bool | is_valid (T JHead::*pd) const | 
| Check validity of given data member in JHead.  More... | |
| template<class T > | |
| const_iterator | pull (T JHead::*pd) const | 
| Pull given data member from Head.  More... | |
| template<class T > | |
| iterator | pull (T JHead::*pd) | 
| Pull given data member from Head.  More... | |
| template<class T > | |
| void | push (T JHead::*pd) | 
| Push given data member to Head.  More... | |
| void | push () | 
| Push all data members to Head.  More... | |
| template<class T > | |
| void | erase (T JHead::*pd) | 
| Reset and remove given data member from Head.  More... | |
| JHead | getMatch (const JHead &header) const | 
| Get matching fields.  More... | |
| size_t | getNumberOfMatches (const JHead &header) const | 
| Get number of matching fields.  More... | |
| bool | match (const JHead &header) const | 
| Test match of headers.  More... | |
| bool | less (const JHead &header) const | 
| Comparison of headers.  More... | |
| std::istream & | read (std::istream &in) | 
| Read header from input.  More... | |
| std::ostream & | write (std::ostream &out) const | 
| Write header to output.  More... | |
| std::ostream & | print (std::ostream &out) const | 
| Print header to output.  More... | |
| ClassDef (JHead, 5) | |
| ClassDef (Head, 2) | |
| bool | have_line (std::string key) const | 
| Check availability of data with the given key.  More... | |
| const std::string & | get_line (std::string key) const | 
| Get data with the given key.  More... | |
| std::string & | get_line (std::string key) | 
| Get data with the given key.  More... | |
| std::vector< std::string > | matching_keys (const std::string &tag) const | 
| In case of duplicate keys, they are internally stored in the map with a suffix "_n".  More... | |
| std::vector< std::string > | get_lines (const std::string &tag) const | 
| Get all data compatible with the given key.  More... | |
| std::string | set_line (std::string tag, std::string line, bool ensure_unique=true) | 
| Set data with the given tag.  More... | |
| std::string | get_field (std::string key, int idx) const | 
| Get data with the given key at given index.  More... | |
| std::string | get_field (std::string key, std::string field) const | 
| Get data with the given key at given field.  More... | |
| int | get_index_of_field (std::string key, std::string field) const | 
| Get index of data with the given key at given field.  More... | |
| void | set_field (std::string key, std::string field, std::string value) | 
| Set data with the given key at given field.  More... | |
| double | ngen () const | 
| Get the number of generated events needed for computing event rates.  More... | |
| double | daq_livetime () const | 
| Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).  More... | |
| double | mc_livetime () const | 
| Get the Monte Carlo live time.  More... | |
| Vec | translate () const | 
| Get coordinate translation.  More... | |
Static Public Member Functions | |
| template<class T > | |
| static bool | is_valid (const T &object) | 
| Check validity of given data member in JHead.  More... | |
| static const size_t | getMaximumNumberOfMatches () | 
| Get maximum number of matching header fields.  More... | |
| static JLANG::JEquationParameters & | getEquationParameters () | 
| Get equation parameters corresponding to Monte Carlo ASCII format, i.e:  More... | |
| static void | setEquationParameters (const JLANG::JEquationParameters &equation) | 
| Set equation parameters.  More... | |
| static const std::map < std::string, std::vector < std::string > > &  | _hdr_dict () | 
| Get internal description of the known lines in header.  More... | |
| static void | actionAtFileOpen (int version) | 
| Action method at file open.  More... | |
Static Public Attributes | |
| static int | ROOT_IO_VERSION = -1 | 
| Streamer version as obtained from ROOT file.  More... | |
Private Attributes | |
| int | counter | 
| Counter to check how many headers have been added.  More... | |
Helper class for event weighing.
Definition at line 25 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Default constructor.
Definition at line 32 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Constructor.
| weighter | event weighter | 
Definition at line 42 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Configuration.
| weighter | event weighter | 
Definition at line 54 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Check if a given header is consistent with this event weighter.
| header | header | 
Definition at line 68 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Get reference to event-weighter.
Definition at line 81 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Add header.
| header | header | 
Definition at line 98 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Get weight of given event.
| evt | event | 
Definition at line 129 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Get event-weight normalisation.
Definition at line 142 of file JEvtWeightHelper.hh.
      
  | 
  inline | 
Get event-weight normalisation.
| evt | event | 
Definition at line 156 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get coordinate origin.
Definition at line 398 of file Head.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Create UUID if not already set.
Definition at line 1301 of file JHead.hh.
      
  | 
  inlineinherited | 
Check validity of given data member in JHead.
The validity is defined by the presence of the name of the data member in the underlying map.
| pd | pointer to data member | 
Definition at line 1319 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Check validity of given data member in JHead.
The validity is defined by difference between actual and default value.
| object | object | 
Definition at line 1334 of file JHead.hh.
      
  | 
  inlineinherited | 
Pull given data member from Head.
| pd | pointer to data member | 
Definition at line 1349 of file JHead.hh.
Pull given data member from Head.
| pd | pointer to data member | 
Definition at line 1362 of file JHead.hh.
      
  | 
  inlineinherited | 
Push given data member to Head.
| pd | pointer to data member | 
Definition at line 1374 of file JHead.hh.
      
  | 
  inherited | 
      
  | 
  inlineinherited | 
Reset and remove given data member from Head.
| pd | pointer to data member | 
Definition at line 1392 of file JHead.hh.
      
  | 
  inlineinherited | 
Get number of matching fields.
| header | header | 
Definition at line 1458 of file JHead.hh.
      
  | 
  inlineinherited | 
Test match of headers.
| header | second header | 
Definition at line 1472 of file JHead.hh.
      
  | 
  inlineinherited | 
Comparison of headers.
| header | header | 
Definition at line 1484 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Get maximum number of matching header fields.
Definition at line 1618 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
<key>: <value> [<value>]* <key>: <value> [<value>]*
Definition at line 1639 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Set equation parameters.
| equation | equation parameters | 
Definition at line 1652 of file JHead.hh.
      
  | 
  inherited | 
Read header from input.
| in | input stream | 
Definition at line 53 of file JHead.cc.
      
  | 
  inherited | 
Write header to output.
| out | output stream | 
Definition at line 91 of file JHead.cc.
      
  | 
  inherited | 
Print header to output.
| out | output stream | 
Definition at line 122 of file JHead.cc.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Get all data compatible with the given key.
This means all data that is internally stored with "key_n", with n an integer 
This method throws a run-time exception if no data are available.
| tag | tag (without suffix) | 
Definition at line 155 of file Head.hh.
      
  | 
  inlineinherited | 
Set data with the given tag.
The function will return the actual key that is used internally to store the result, which is equal to the tag with an optional "_n" added to ensure uniqueness.
| tag | tag | 
| line | data | 
| ensure_unique | add '_n' (with n an integer) to the tag if it would overwrite an existing key. | 
Definition at line 177 of file Head.hh.
      
  | 
  inlineinherited | 
Get data with the given key at given index.
This method throws a run-time exception if no data are available.
| key | key | 
| idx | index | 
Definition at line 199 of file Head.hh.
      
  | 
  inlineinherited | 
Get data with the given key at given field.
This method throws a run-time exception if no field is available.
Note that this method uses the dictionary define in method Head::_hdr_dict.
| key | key | 
| field | field | 
Definition at line 241 of file Head.hh.
      
  | 
  inlineinherited | 
Get index of data with the given key at given field.
 Note that this method uses the dictionary define in method Head::_hdr_dict.
| key | key | 
| field | field | 
Definition at line 221 of file Head.hh.
      
  | 
  inlineinherited | 
Set data with the given key at given field.
This method throws a run-time exception if no field available.
Note that this method uses the dictionary define in method Head::_hdr_dict.
| key | key | 
| field | field | 
| value | vakue | 
Definition at line 264 of file Head.hh.
      
  | 
  inlinestaticinherited | 
Get internal description of the known lines in header.
Definition at line 316 of file Head.hh.
      
  | 
  inlineinherited | 
Get the number of generated events needed for computing event rates.
Definition at line 367 of file Head.hh.
      
  | 
  inlineinherited | 
Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).
Definition at line 377 of file Head.hh.
      
  | 
  inlineinherited | 
Get the Monte Carlo live time.
Definition at line 388 of file Head.hh.
      
  | 
  inlineinherited | 
Get coordinate translation.
Definition at line 410 of file Head.hh.
      
  | 
  inlinestaticinherited | 
Action method at file open.
| version | version | 
Definition at line 424 of file Head.hh.
      
  | 
  private | 
Counter to check how many headers have been added.
Definition at line 166 of file JEvtWeightHelper.hh.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  staticinherited | 
 1.8.5