LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliGenEventHeader.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 10 60.0 %
Date: 2016-06-14 17:26:59 Functions: 9 17 52.9 %

          Line data    Source code
       1             : #ifndef ALIGENEVENTHEADER_H
       2             : #define ALIGENEVENTHEADER_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id$ */
       8             : 
       9             : //---------------------------------------------------------------------
      10             : // Event header base class for generator. 
      11             : // Stores generated event information
      12             : // Author: andreas.morsch@cern.ch
      13             : //---------------------------------------------------------------------
      14             : 
      15             : #include <map>
      16             : #include <string>
      17             : #include <TNamed.h>
      18             : #include <TArrayF.h>
      19             : 
      20           0 : class AliGenEventHeader : public TNamed
      21             : {
      22             :  public:
      23             : 
      24             :   AliGenEventHeader(const char* name);
      25             :   AliGenEventHeader();
      26        2864 :   virtual ~AliGenEventHeader() {}
      27             :   // Getters
      28          64 :   virtual Int_t           NProduced()       const  {return fNProduced;}
      29          32 :   virtual Float_t         InteractionTime() const  {return fInteractionTime;}
      30           0 :   virtual Float_t         EventWeight()     const  {return fEventWeight;}
      31             :   virtual void            PrimaryVertex(TArrayF &o) const;
      32             :   // Setters
      33          32 :   virtual void   SetNProduced(Int_t nprod)         {fNProduced = nprod;}
      34             :   virtual void   SetPrimaryVertex(const TArrayF &o);
      35          32 :   virtual void   SetInteractionTime(Float_t t)     {fInteractionTime = t;}
      36           0 :   virtual void   SetEventWeight(Float_t w)         {AddEventWeight(fEventWeightNameGenerator, w);}
      37             : 
      38             :   // named event weights
      39             :   virtual void    AddEventWeight(const TString &name, Float_t w);
      40             :   virtual Float_t GetEventWeight(const TString &name);
      41             :   virtual const std::map<std::string, Float_t>& GetEventWeights() const
      42           0 :     { return fEventWeights; }
      43             :           
      44             : protected:
      45             :   Int_t     fNProduced;                 // Number stable or undecayed particles
      46             :   TArrayF   fVertex;                    // Primary Vertex Position
      47             :   Float_t   fInteractionTime;           // Time of the interaction
      48             :   Float_t   fEventWeight;               // Event weight
      49             : 
      50             :   std::map<std::string, Float_t> fEventWeights; // named event weights
      51             :   const TString fEventWeightNameGenerator;      //! name for generator level weight
      52             : 
      53        1670 :   ClassDef(AliGenEventHeader, 5)        // Event header for primary event
      54             : };
      55             : 
      56             : #endif

Generated by: LCOV version 1.11