| 
    Jpp test-rotations-old
    
   the software that should make you happy 
   | 
 
Template event-weighter-associated file scanner. More...
#include <JEvtWeightFileScanner.hh>
  
Public Types | |
| typedef JFileScanner_t::input_type | input_type | 
| typedef std::shared_ptr< JEvtWeight > | pointer_type | 
| typedef JRewindableObjectIterator< T >::pointer_type | pointer_type | 
Public Member Functions | |
| JEvtWeightFileScanner () | |
| Default constructor.   | |
| JEvtWeightFileScanner (const JEvtWeight &weighter) | |
| Constructor.   | |
| JEvtWeightFileScanner (const input_type &input) | |
| Constructor.   | |
| void | reset (const JEvtWeight &weighter) | 
| Reset file scanner and event weighter.   | |
| size_t | put (const input_type &input) | 
| Put files.   | |
| bool | put (const std::string &input) | 
| Put file.   | |
| template<class JEvtWeightFactorHelper_t > | |
| bool | setEvtWeightFactor (const JEvtWeightFactorHelper_t &factor) | 
| Set event-weight factor for the event-weighter associated with this file scanner.   | |
| bool | setEvtWeightFactor (const JEvtCategoryHelper &category, const JEvtWeightFactorHelper &factor) | 
| Set event-weight factor corresponding to a given event category.   | |
| bool | setEvtWeightFactor (const JEvtCategorySet &categories, const JEvtWeightFactorHelper &factor) | 
| Set event-weight factor corresponding to a given set of event categories.   | |
| template<class JEvtWeightFactorHelper_t > | |
| bool | setEvtWeightFactor (const JEvtCategoryMap< JEvtWeightFactorHelper_t > &object) | 
| Set event-weight factor according to a given map between event categories and event-weight factors.   | |
| bool | setFlux (const JFluxHelper &flux) | 
| Set flux function for the event-weighter associated with this file scanner.   | |
| bool | setFlux (const JEvtCategoryHelper &category, const JFluxHelper &flux) | 
| Set flux function corresponding to a given event category.   | |
| bool | setFlux (const JEvtCategorySet &categories, const JFluxHelper &flux) | 
| Set flux function corresponding to a given set of event categories.   | |
| bool | setFlux (const JEvtCategoryMap< JFluxHelper > &object) | 
| Set flux function according to a given map between event categories and flux functions.   | |
| const char *const | getName () const | 
| Get name.   | |
| void | configure (const JEvtWeight &weighter) | 
| Configuration.   | |
| bool | check (const JHead &header) const | 
| Check if a given header is consistent with this event weighter.   | |
| JEvtWeight & | getEvtWeighter () const | 
| Get reference to event-weighter.   | |
| void | add (const JHead &header) | 
| Add header.   | |
| double | getWeight (const Evt &evt) const | 
| Get weight of given event.   | |
| double | getNormalisation () const | 
| Get event-weight normalisation.   | |
| double | getNormalisation (const Evt &evt) const | 
| Get event-weight normalisation.   | |
| Vec | coord_origin () const | 
| Get coordinate origin.   | |
| const JHead & | getHeader () const | 
| Get header.   | |
| JHead & | getHeader () | 
| Get header.   | |
| void | setHeader (const JHead &header) | 
| Set header.   | |
| void | createUUID () | 
| Create UUID if not already set.   | |
| template<class T > | |
| bool | is_valid (T JHead::*pd) const | 
| Check validity of given data member in JHead.   | |
| template<class T > | |
| const_iterator | pull (T JHead::*pd) const | 
| Pull given data member from Head.   | |
| template<class T > | |
| iterator | pull (T JHead::*pd) | 
| Pull given data member from Head.   | |
| template<class T > | |
| void | push (T JHead::*pd) | 
| Push given data member to Head.   | |
| void | push () | 
| Push all data members to Head.   | |
| template<class T > | |
| void | erase (T JHead::*pd) | 
| Reset and remove given data member from Head.   | |
| JHead | getMatch (const JHead &header) const | 
| Get matching fields.   | |
| size_t | getNumberOfMatches (const JHead &header) const | 
| Get number of matching fields.   | |
| bool | match (const JHead &header) const | 
| Test match of headers.   | |
| bool | less (const JHead &header) const | 
| Comparison of headers.   | |
| std::istream & | read (std::istream &in) | 
| Read header from input.   | |
| std::ostream & | write (std::ostream &out) const | 
| Write header to output.   | |
| std::ostream & | print (std::ostream &out) const | 
| Print header to output.   | |
| ClassDef (JHead, 5) | |
| ClassDef (Head, 2) | |
| bool | have_line (std::string key) const | 
| Check availability of data with the given key.   | |
| const std::string & | get_line (std::string key) const | 
| Get data with the given key.   | |
| std::string & | get_line (std::string key) | 
| Get data with the given key.   | |
| 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".   | |
| std::vector< std::string > | get_lines (const std::string &tag) const | 
| Get all data compatible with the given key.   | |
| std::string | set_line (std::string tag, std::string line, bool ensure_unique=true) | 
| Set data with the given tag.   | |
| std::string | get_field (std::string key, int idx) const | 
| Get data with the given key at given index.   | |
| std::string | get_field (std::string key, std::string field) const | 
| Get data with the given key at given field.   | |
| int | get_index_of_field (std::string key, std::string field) const | 
| Get index of data with the given key at given field.   | |
| void | set_field (std::string key, std::string field, std::string value) | 
| Set data with the given key at given field.   | |
| double | ngen () const | 
| Get the number of generated events needed for computing event rates.   | |
| double | daq_livetime () const | 
| Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).   | |
| double | mc_livetime () const | 
| Get the Monte Carlo live time.   | |
| Vec | translate () const | 
| Get coordinate translation.   | |
| const std::string & | getFilename () const | 
| Get current file name.   | |
| counter_type | getCounter () const | 
| Get counter.   | |
| virtual void | rewind () override | 
| Rewind.   | |
| virtual bool | hasNext () override | 
| Check availability of next element.   | |
| virtual const pointer_type & | next () override | 
| Get next element.   | |
| virtual skip_type | skip (const skip_type ns) override | 
| Skip items.   | |
Static Public Member Functions | |
| template<class T > | |
| static bool | is_valid (const T &object) | 
| Check validity of given data member in JHead.   | |
| static const size_t | getMaximumNumberOfMatches () | 
| Get maximum number of matching header fields.   | |
| static JLANG::JEquationParameters & | getEquationParameters () | 
| Get equation parameters corresponding to Monte Carlo ASCII format, i.e:   | |
| static void | setEquationParameters (const JLANG::JEquationParameters &equation) | 
| Set equation parameters.   | |
| static const std::map< std::string, std::vector< std::string > > & | _hdr_dict () | 
| Get internal description of the known lines in header.   | |
| static void | actionAtFileOpen (int version) | 
| Action method at file open.   | |
Static Public Attributes | |
| static int | ROOT_IO_VERSION = -1 | 
| Streamer version as obtained from ROOT file.   | |
Protected Attributes | |
| JFileScanner< T > | scanner | 
| unsigned int | index | 
| counter_type | counter | 
Static Private Member Functions | |
| template<class T > | |
| static bool | match (const T &first, const T &second) | 
| Test match.   | |
| template<class T > | |
| static bool | match (const std::vector< T > &first, const std::vector< T > &second) | 
| Test is containers match.   | |
| template<class T > | |
| static bool | match (const JHead &first, const JHead &second, T JHead::*pd) | 
| Test match of given data member of headers.   | |
| template<class T > | |
| static bool | less (const T &first, const T &second) | 
| Comparison.   | |
| template<class T > | |
| static bool | less (const std::vector< T > &first, const std::vector< T > &second) | 
| Comparison of containers.   | |
Private Attributes | |
| int | counter | 
| Counter to check how many headers have been added.   | |
Template event-weighter-associated file scanner.
Note: The template class must be derived from JMultipleFileScanner<Evt>
Definition at line 62 of file JEvtWeightFileScanner.hh.
| JFileScanner_t::input_type JSUPPORT::JEvtWeightFileScanner< JFileScanner_t >::input_type | 
Definition at line 66 of file JEvtWeightFileScanner.hh.
      
  | 
  inherited | 
Definition at line 29 of file JEvtWeightHelper.hh.
      
  | 
  inherited | 
Definition at line 310 of file JMultipleFileScanner.hh.
      
  | 
  inline | 
Default constructor.
Definition at line 72 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Constructor.
| weighter | event weighter | 
Definition at line 83 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Constructor.
| input | input | 
Definition at line 96 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Reset file scanner and event weighter.
| weighter | event weighter | 
Definition at line 115 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Put files.
| input | input files | 
Definition at line 128 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Put file.
| input | input file | 
Definition at line 146 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set event-weight factor for the event-weighter associated with this file scanner.
The template argument refers to the desired helper class for an event-weight factor
(c.f. JAANET::JEvtWeightFactorHelper, JAANET::JFluxHelper or JAANET::JDiffuseFluxHelper).
| factor | event-weight factor | 
Definition at line 176 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set event-weight factor corresponding to a given event category.
| category | event category | 
| factor | event-weight factor | 
Definition at line 200 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set event-weight factor corresponding to a given set of event categories.
Note that the given event-weight factor will only be assigned
if the header matches < b>all< /b> of the specified event categories.
| categories | set of event categories | 
| factor | event-weight factor | 
Definition at line 219 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set event-weight factor according to a given map between event categories and event-weight factors.
The template argument refers either to the class JAANET::JEvtWeightFactorHelper or JAANET::JFluxHelper.
Note that the given event-weight factors will only be assigned
if the header matches < b>all< /b> of the event categories associated with the given map.
| object | map between event categories and event-weight factors | 
Definition at line 254 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set flux function for the event-weighter associated with this file scanner.
| flux | flux function | 
Definition at line 285 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set flux function corresponding to a given event category.
| category | event category | 
| flux | flux function | 
Definition at line 298 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set flux function corresponding to a given set of event categories.
Note that the given flux function will only be assigned
if the header matches < b>all< /b> of the specified event categories.
| categories | set of event categories | 
| flux | flux function | 
Definition at line 315 of file JEvtWeightFileScanner.hh.
      
  | 
  inline | 
Set flux function according to a given map between event categories and flux functions.
Note that the given flux functions will only be assigned
if the header matches < b>all< /b> of the event categories associated with the given map.
| object | map between event categories and flux functions | 
Definition at line 331 of file JEvtWeightFileScanner.hh.
      
  | 
  inlineinherited | 
Get name.
Definition at line 56 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Configuration.
| weighter | event weighter | 
Definition at line 67 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Check if a given header is consistent with this event weighter.
| header | header | 
Definition at line 81 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get reference to event-weighter.
Definition at line 94 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Add header.
| header | header | 
Definition at line 111 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get weight of given event.
| evt | event | 
Definition at line 142 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get event-weight normalisation.
Definition at line 155 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get event-weight normalisation.
| evt | event | 
Definition at line 169 of file JEvtWeightHelper.hh.
      
  | 
  inlineinherited | 
Get coordinate origin.
Definition at line 397 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.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Push given data member to Head.
| pd | pointer to data member | 
      
  | 
  inherited | 
Push all data members to Head.
Definition at line 29 of file JHead.cc.
      
  | 
  inlineinherited | 
Reset and remove given data member from Head.
| pd | pointer to data member | 
Definition at line 1392 of file JHead.hh.
Get matching fields.
| header | header | 
Definition at line 1410 of file JHead.hh.
      
  | 
  inlineinherited | 
Get number of matching fields.
| header | header | 
Definition at line 1460 of file JHead.hh.
      
  | 
  inlineinherited | 
Test match of headers.
| header | second header | 
Definition at line 1474 of file JHead.hh.
      
  | 
  inlinestaticprivateinherited | 
      
  | 
  inlinestaticprivateinherited | 
Test is containers match.
It is assumed that the containers are ordered in the same way.
| first | first object | 
| second | second object | 
Definition at line 1759 of file JHead.hh.
      
  | 
  inlinestaticprivateinherited | 
Test match of given data member of headers.
| first | first header | 
| second | second header | 
| pd | pointer to data member  | 
      
  | 
  inlineinherited | 
Comparison of headers.
| header | header | 
Definition at line 1486 of file JHead.hh.
      
  | 
  inlinestaticprivateinherited | 
      
  | 
  inlinestaticprivateinherited | 
Comparison of containers.
It is assumed that the containers are ordered in the same way.
| first | first object | 
| second | second object | 
Definition at line 1730 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
<key>: <value> [<value>]* <key>: <value> [<value>]*
Definition at line 1642 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Set equation parameters.
| equation | equation parameters | 
Definition at line 1655 of file JHead.hh.
      
  | 
  inherited | 
Read header from input.
| in | input stream | 
Definition at line 54 of file JHead.cc.
      
  | 
  inherited | 
Write header to output.
| out | output stream | 
Definition at line 92 of file JHead.cc.
      
  | 
  inherited | 
Print header to output.
| out | output stream | 
Definition at line 123 of file JHead.cc.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
In case of duplicate keys, they are internally stored in the map with a suffix "_n".
This function returns all the keys that start with 'key' and end in "_n", with n an integer
| tag | tag (without suffix) | 
Definition at line 115 of file Head.hh.
      
  | 
  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 154 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 176 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 198 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 240 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 220 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 263 of file Head.hh.
      
  | 
  inlinestaticinherited | 
Get internal description of the known lines in header.
Definition at line 315 of file Head.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlinestaticinherited | 
Action method at file open.
| version | version | 
Definition at line 423 of file Head.hh.
      
  | 
  inlineinherited | 
Get current file name.
Note that this method should only be called when method hasNext() returns true.
Definition at line 371 of file JMultipleFileScanner.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineoverridevirtualinherited | 
Rewind.
Implements JLANG::JRewindable< T >.
Reimplemented in JSUPPORT::JMultipleFileScanner< Head >, JSUPPORT::JMultipleFileScanner< JTriggerParameters >, and JSUPPORT::JMultipleFileScanner< JTypeList< JHead_t, JTail_t > >.
Definition at line 391 of file JMultipleFileScanner.hh.
      
  | 
  inlineoverridevirtualinherited | 
Check availability of next element.
Implements JLANG::JObjectIterator< T >.
Reimplemented in JSUPPORT::JTriggeredFileScanner< JTypelist_t, JFileScanner_t >.
Definition at line 409 of file JMultipleFileScanner.hh.
      
  | 
  inlineoverridevirtualinherited | 
Get next element.
Implements JLANG::JObjectIterator< T >.
Reimplemented in JSUPPORT::JParallelFileScanner< JTypeList< JDAQEvent, JNullType >, JMultipleFileScanner >, and JSUPPORT::JTriggeredFileScanner< JTypelist_t, JFileScanner_t >.
Definition at line 457 of file JMultipleFileScanner.hh.
      
  | 
  inlineoverridevirtualinherited | 
Skip items.
| ns | number of items to skip | 
Reimplemented from JLANG::JObjectIterator< T >.
Reimplemented in JSUPPORT::JMultipleFileScanner< JTypeList< JHead_t, JTail_t > >.
Definition at line 471 of file JMultipleFileScanner.hh.
      
  | 
  privateinherited | 
Counter to check how many headers have been added.
Definition at line 179 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 | 
      
  | 
  protectedinherited | 
Definition at line 486 of file JMultipleFileScanner.hh.
      
  | 
  protectedinherited | 
Definition at line 487 of file JMultipleFileScanner.hh.
      
  | 
  protectedinherited | 
Definition at line 488 of file JMultipleFileScanner.hh.