| 
    Jpp
    
   | 
 
Template file scanner with event weight. More...
#include <JWeightFileScanner.hh>
  
 Public Types | |
| typedef JPointer< JClass_t > | pointer_type | 
| typedef JStorage< JClass_t,  JMemory_t >  | storage_type | 
| typedef JMemory_t< JClass_t > | memory_type | 
Public Member Functions | |
| JWeightFileScanner () | |
| Default constructor.  More... | |
| JWeightFileScanner (const JWeightEvent &weighter) | |
| Constructor.  More... | |
| void | reset (const JWeightEvent &weighter) | 
| Reset file scanner and event weighter.  More... | |
| size_t | put (const JFileScanner_t &input) | 
| Put list of files.  More... | |
| bool | put (const std::string &input) | 
| Put file.  More... | |
| void | configure (const JWeightEvent &weighter) | 
| Configuration.  More... | |
| bool | check (const JHead &header) const | 
| Check if a given header is consistent with this event weighter.  More... | |
| void | add (const JHead &header) | 
| Add header.  More... | |
| double | getWeight (const Evt &evt) const | 
| Get weight of given event.  More... | |
| const JSharedPointer & | getSharedPointer () const | 
| Get shared pointer.  More... | |
| JSharedPointer & | getSharedPointer () | 
| Get shared pointer.  More... | |
| void | setSharedPointer (const JSharedPointer &object) | 
| Set shared pointer.  More... | |
| virtual void | reset () override | 
| Reset pointer.  More... | |
| template<class T > | |
| void | reset (const JPointer< T > &pointer) | 
| Reset pointer.  More... | |
| void | reset (JClass_t *p) | 
| Reset pointer.  More... | |
| template<class T > | |
| void | set (const JPointer< T > &pointer) | 
| Set pointer.  More... | |
| void | initialise () | 
| Initialise counter.  More... | |
| void | attach (const JSharedCounter &object) | 
| Attach this counter to given shared counter object.  More... | |
| bool | detach () | 
| Detach.  More... | |
| const int | getCount () | 
| Get count.  More... | |
| void | recreate () | 
| Recreate object in memory.  More... | |
| void | create () | 
| Create object in memory.  More... | |
| void | create (const unsigned int size) | 
| Create array of objects in memory.  More... | |
| virtual JClass_t * | get () const override | 
| Get pointer.  More... | |
| JClass_t *const & | getReference () const | 
| Get rereference to internal pointer.  More... | |
| JClass_t *& | getReference () | 
| Get rereference to internal pointer.  More... | |
| virtual bool | equals (const JAbstractPointer &object) const | 
| Equals.  More... | |
| bool | is_valid () const | 
| Check validity of pointer.  More... | |
| template<class T > | |
| bool | is_valid (T JHead::*pd) const | 
| Check validity of given data member in JHead.  More... | |
| JClass_t * | operator-> () const | 
| Smart pointer operator.  More... | |
| operator JClass_t * () const | |
| Type conversion operator.  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... | |
| 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... | |
| template<class T > | |
| void | erase (T JHead::*pd) | 
| Remove given data member from Head.  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, 3) | |
| 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 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 std::map< std::string,  std::vector< std::string > > &  | _hdr_dict () | 
| Get internal description of the known lines in header.  More... | |
Protected Member Functions | |
| void | set (const JSharedPointer &object) | 
| Set pointer.  More... | |
| virtual void | set (JClass_t *p) override | 
| Set pointer.  More... | |
| void | release () | 
| Release memory.  More... | |
Protected Attributes | |
| JClass_t * | __p | 
| pointer to object  More... | |
Template file scanner with event weight.
Definition at line 28 of file JWeightFileScanner.hh.
      
  | 
  inherited | 
Definition at line 34 of file JSharedPointer.hh.
      
  | 
  inherited | 
Definition at line 35 of file JSharedPointer.hh.
      
  | 
  inherited | 
Definition at line 33 of file JStorage.hh.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Reset file scanner and event weighter.
| weighter | event weighter | 
Definition at line 55 of file JWeightFileScanner.hh.
      
  | 
  inline | 
Put list of files.
| input | file list | 
Definition at line 68 of file JWeightFileScanner.hh.
      
  | 
  inline | 
Put file.
| input | file name | 
Definition at line 86 of file JWeightFileScanner.hh.
      
  | 
  inlineinherited | 
Configuration.
| weighter | event weighter | 
Definition at line 61 of file JWeightEventHelper.hh.
      
  | 
  inlineinherited | 
Check if a given header is consistent with this event weighter.
| header | header | 
Definition at line 75 of file JWeightEventHelper.hh.
      
  | 
  inlineinherited | 
Add header.
| header | header | 
Definition at line 86 of file JWeightEventHelper.hh.
      
  | 
  inlineinherited | 
Get weight of given event.
| evt | event | 
Definition at line 112 of file JWeightEventHelper.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set shared pointer.
| object | shared pointer | 
Definition at line 117 of file JSharedPointer.hh.
      
  | 
  inlineoverridevirtualinherited | 
Reset pointer.
The reference counter is decremented by one and the object pointed to previously is deleted when its reference counter is zero.
Reimplemented from JLANG::JStorage< JClass_t, JMemory_t >.
Definition at line 171 of file JSharedPointer.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineprotectedinherited | 
Set pointer.
The reference counter of the shared object pointed to is incremented by one.
| object | shared pointer | 
Definition at line 188 of file JSharedPointer.hh.
      
  | 
  inlineoverrideprotectedvirtualinherited | 
Set pointer.
The reference counter of the shared object pointed to is initialised to one.
| p | pointer to derived class object | 
Reimplemented from JLANG::JPointer< JClass_t >.
Definition at line 202 of file JSharedPointer.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Initialise counter.
Definition at line 33 of file JSharedCounter.hh.
      
  | 
  inlineinherited | 
Attach this counter to given shared counter object.
| object | shared counter | 
Definition at line 46 of file JSharedCounter.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Recreate object in memory.
A new object is created if no memory is allocated yet, else the previously created object is maintained.
Definition at line 57 of file JStorage.hh.
      
  | 
  inlineinherited | 
Create object in memory.
The memory allocated by a previously created object will be released.
Definition at line 69 of file JStorage.hh.
      
  | 
  inlineinherited | 
Create array of objects in memory.
The memory allocated by previously created objects will be released.
| size | number of elements | 
Definition at line 81 of file JStorage.hh.
      
  | 
  inlineprotectedinherited | 
Release memory.
Definition at line 91 of file JStorage.hh.
      
  | 
  inlineoverridevirtualinherited | 
Get pointer.
Implements JLANG::JAbstractPointer< JClass_t >.
Reimplemented in JLANG::JMultiPointer< JTypeList< JHead_t, JTail_t > >, JLANG::JMultiPointer< JClass_t >, JLANG::JMultiPointer< JTail_t >, JLANG::JMultiPointer< JHead_t >, JLANG::JMultiPointer< T >, and JLANG::JMultiPointer< JTypeList< JDAQEvent, JTypelist_t > >.
Definition at line 64 of file JPointer.hh.
      
  | 
  inlineinherited | 
Get rereference to internal pointer.
Definition at line 119 of file JPointer.hh.
      
  | 
  inlineinherited | 
Get rereference to internal pointer.
Definition at line 130 of file JPointer.hh.
      
  | 
  inlinevirtualinherited | 
Equals.
The equality is evaluated by comparison of the internal pointers.
| object | abstract pointer | 
Definition at line 50 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Check validity of pointer.
Definition at line 83 of file JAbstractPointer.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 1161 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 1176 of file JHead.hh.
      
  | 
  inlineinherited | 
Smart pointer operator.
Definition at line 112 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Type conversion operator.
Definition at line 126 of file JAbstractPointer.hh.
      
  | 
  inlineinherited | 
Get coordinate origin.
Definition at line 393 of file Head.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Pull given data member from Head.
| pd | pointer to data member | 
Definition at line 1191 of file JHead.hh.
Pull given data member from Head.
| pd | pointer to data member | 
Definition at line 1204 of file JHead.hh.
      
  | 
  inlineinherited | 
Push given data member to Head.
| pd | pointer to data member | 
Definition at line 1216 of file JHead.hh.
      
  | 
  inlineinherited | 
Remove given data member from Head.
| pd | pointer to data member | 
Definition at line 1228 of file JHead.hh.
      
  | 
  inlineinherited | 
Test match of headers.
| header | second header | 
Definition at line 1247 of file JHead.hh.
      
  | 
  inlineinherited | 
Comparison of headers.
| header | header | 
Definition at line 1278 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 1407 of file JHead.hh.
      
  | 
  inlinestaticinherited | 
Set equation parameters.
| equation | equation parameters | 
Definition at line 1420 of file JHead.hh.
      
  | 
  inherited | 
Read header from input.
| in | input stream | 
Definition at line 30 of file JHead.cc.
      
  | 
  inherited | 
Write header to output.
| out | output stream | 
Definition at line 68 of file JHead.cc.
      
  | 
  inherited | 
Print header to output.
| out | output stream | 
Definition at line 99 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 153 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 175 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 197 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 237 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 219 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 260 of file Head.hh.
      
  | 
  inlinestaticinherited | 
Get internal description of the known lines in header.
Definition at line 312 of file Head.hh.
      
  | 
  inlineinherited | 
Get the number of generated events needed for computing event rates.
Definition at line 362 of file Head.hh.
      
  | 
  inlineinherited | 
Get the the live time provided by the DAQ sytstem (=number of processed timeslices * frametime).
Definition at line 372 of file Head.hh.
      
  | 
  inlineinherited | 
Get the Monte Carlo live time.
Definition at line 383 of file Head.hh.
      
  | 
  inlineinherited | 
Get coordinate translation.
Definition at line 405 of file Head.hh.
      
  | 
  protectedinherited | 
pointer to object
Definition at line 136 of file JPointer.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 | 
 1.8.5