LCOV - code coverage report
Current view: top level - VZERO/VZERObase - AliVZEROTriggerSimulator.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 32 34 94.1 %
Date: 2016-06-14 17:26:59 Functions: 33 38 86.8 %

          Line data    Source code
       1             : #ifndef ALIVZEROTRIGGERSIMULATOR_H
       2             : #define ALIVZEROTRIGGERSIMULATOR_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
       4             :  * reserved. 
       5             :  *
       6             :  * See cxx source for full Copyright notice                               
       7             :  */
       8             : // 
       9             : // Class AliVZEROTriggerSimulator
      10             : // ------------------------------
      11             : //  Simulate the VZERO Trigger response
      12             : // Use FEE parameters stored in Database
      13             : // Can work on real data or in simulation
      14             : //
      15             : 
      16             : #include <TObject.h>
      17             : 
      18             : #include "AliVZEROTriggerData.h"
      19             : 
      20             : class AliVZEROLogicalSignal;
      21             : class TTree;
      22             : class TClonesArray;
      23             : 
      24             : class AliVZEROTriggerSimulator : public TObject {
      25             : public:
      26             :         AliVZEROTriggerSimulator();
      27             :         AliVZEROTriggerSimulator(TTree * digitsTree, TClonesArray* digits);
      28             :         ~AliVZEROTriggerSimulator();
      29             :         
      30           0 :         AliVZEROTriggerData * GetTriggerData() const {return fTriggerData;};
      31             :         
      32          16 :         Bool_t GetBBAandBBC() const             {return (fTriggerWord & 0x1);};
      33          16 :         Bool_t GetBBAorBBC() const              {return (fTriggerWord>>1 & 0x1);};
      34          16 :         Bool_t GetBGAandBBC() const             {return (fTriggerWord>>2 & 0x1);};
      35          24 :         Bool_t GetBGA() const                   {return (fTriggerWord>>3 & 0x1);};
      36           8 :         Bool_t GetBGCandBBA() const             {return (fTriggerWord>>4 & 0x1);};
      37          16 :         Bool_t GetBGC() const                   {return (fTriggerWord>>5 & 0x1);};
      38           8 :         Bool_t GetCTA1andCTC1() const   {return (fTriggerWord>>6 & 0x1);};
      39          16 :         Bool_t GetCTA1orCTC1() const    {return (fTriggerWord>>7 & 0x1);};
      40           8 :         Bool_t GetCTA2andCTC2() const   {return (fTriggerWord>>8 & 0x1);};
      41           0 :         Bool_t GetCTA2orCTC2() const    {return (fTriggerWord>>9 & 0x1);};
      42           8 :         Bool_t GetMTAandMTC() const             {return (fTriggerWord>>10 & 0x1);};
      43           8 :         Bool_t GetMTAorMTC() const              {return (fTriggerWord>>11 & 0x1);};
      44          24 :         Bool_t GetBBA() const                   {return (fTriggerWord>>12 & 0x1);};
      45          16 :         Bool_t GetBBC() const                   {return (fTriggerWord>>13 & 0x1);};
      46           8 :         Bool_t GetBGAorBGC() const              {return (fTriggerWord>>14 & 0x1);};
      47           8 :         Bool_t GetBeamGas() const               {return (fTriggerWord>>15 & 0x1);};
      48             :         
      49           8 :         void SetBBAandBBC()             { (fTriggerWord += 0x1);};
      50           8 :         void SetBBAorBBC()              { (fTriggerWord += 0x1<<1);};
      51           8 :         void SetBGAandBBC()             { (fTriggerWord += 0x1<<2);};
      52           8 :         void SetBGA()                   { (fTriggerWord += 0x1<<3);};
      53           8 :         void SetBGCandBBA()             { (fTriggerWord += 0x1<<4);};
      54           8 :         void SetBGC()                   { (fTriggerWord += 0x1<<5);};
      55           8 :         void SetCTA1andCTC1()   { (fTriggerWord += 0x1<<6);};
      56           8 :         void SetCTA1orCTC1()    { (fTriggerWord += 0x1<<7);};
      57           6 :         void SetCTA2andCTC2()   { (fTriggerWord += 0x1<<8);};
      58           8 :         void SetCTA2orCTC2()    { (fTriggerWord += 0x1<<9);};
      59           8 :         void SetMTAandMTC()             { (fTriggerWord += 0x1<<10);};
      60           8 :         void SetMTAorMTC()              { (fTriggerWord += 0x1<<11);};    
      61           8 :         void SetBBA()                   { (fTriggerWord += 0x1<<12);};
      62           8 :         void SetBBC()                   { (fTriggerWord += 0x1<<13);};
      63           8 :         void SetBGAorBGC()              { (fTriggerWord += 0x1<<14);};
      64           8 :         void SetBeamGas()               { (fTriggerWord += 0x1<<15);};
      65             :         
      66             :         void Run();
      67             :         virtual void Print(Option_t* /* opt */) const;
      68             :         
      69             : private:
      70             :         // Private methods
      71             :         AliVZEROTriggerSimulator(const AliVZEROTriggerSimulator &/*triggerSim*/);
      72             :         AliVZEROTriggerSimulator& operator= (const AliVZEROTriggerSimulator & /*triggerSim*/);
      73             :         AliVZEROTriggerData * LoadTriggerData() const ;
      74             :         void                  LoadClockOffset();
      75             :         void GenerateBBWindows();
      76             :         void GenerateBGWindows();
      77             :         Bool_t AreGatesOpen() const;
      78             :         
      79             :         // Members
      80             :         AliVZEROLogicalSignal * fBBGate[AliVZEROTriggerData::kNCIUBoards];  // BB Observation window
      81             :         AliVZEROLogicalSignal * fBBLatch[AliVZEROTriggerData::kNCIUBoards]; // BB Latch window
      82             :         AliVZEROLogicalSignal * fBBReset[AliVZEROTriggerData::kNCIUBoards]; // BB Reset Window
      83             :         
      84             :         AliVZEROLogicalSignal * fBGGate[AliVZEROTriggerData::kNCIUBoards];  // BG Observation window
      85             :         AliVZEROLogicalSignal * fBGLatch[AliVZEROTriggerData::kNCIUBoards]; // BG Latch Window
      86             :         AliVZEROLogicalSignal * fBGReset[AliVZEROTriggerData::kNCIUBoards]; // BG Reset Window
      87             : 
      88             :         AliVZEROTriggerData *fTriggerData; // Object holding the trigger configuration parameters
      89             :         Float_t fClockOffset[AliVZEROTriggerData::kNCIUBoards]; // TDC clock offset including roll-over, trig count and L0->L1 delay
      90             :         
      91             :         TTree* fDigitsTree; //Pointer to VZERO digit tree
      92             :         TClonesArray* fDigits; //Pointer to VZERO digit array
      93             :         
      94             :         Bool_t fBBFlags[64]; // Individual BB Flags
      95             :         Bool_t fBGFlags[64]; // Individual BG Flags
      96             :         Float_t  fCharges[64]; // Individual Charge
      97             :         
      98             :         UShort_t fTriggerWord; // Word holding the 16 triggers return by the FEE
      99             : 
     100             :         Bool_t fIsRun2; // Run1 or Run2 settings
     101             :                 
     102        1140 :         ClassDef( AliVZEROTriggerSimulator, 4 )  
     103             : 
     104             : };
     105             : 
     106             : 
     107             : #endif // ALIVZEROTRIGGERSIMULATOR_H
     108             : 
     109             : 

Generated by: LCOV version 1.11