LCOV - code coverage report
Current view: top level - MUON/MUONraw - AliMUONLocalStruct.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 23 85 27.1 %
Date: 2016-06-14 17:26:59 Functions: 6 12 50.0 %

          Line data    Source code
       1             : /**************************************************************************
       2             :  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             :  *                                                                        *
       4             :  * Author: The ALICE Off-line Project.                                    *
       5             :  * Contributors are mentioned in the code where appropriate.              *
       6             :  *                                                                        *
       7             :  * Permission to use, copy, modify and distribute this software and its   *
       8             :  * documentation strictly for non-commercial purposes is hereby granted   *
       9             :  * without fee, provided that the above copyright notice appears in all   *
      10             :  * copies and that both the copyright notice and this permission notice   *
      11             :  * appear in the supporting documentation. The authors make no claims     *
      12             :  * about the suitability of this software for any purpose. It is          *
      13             :  * provided "as is" without express or implied warranty.                  *
      14             :  **************************************************************************/
      15             : 
      16             : /* $Id$ */
      17             : 
      18             : #include "AliMUONLocalStruct.h"
      19             : 
      20             : //-----------------------------------------------------------------------------
      21             : /// \class AliMUONLocalStruct
      22             : /// Local structure for trigger raw data.
      23             : /// The structure includes the information
      24             : ///  about the x,y position of the 4 detection planes,
      25             : /// the trigger word (address, local decision, y trigger, y position, x deviation,
      26             : /// x position)
      27             : ///
      28             : /// \author Christian Finck
      29             : //-----------------------------------------------------------------------------
      30             : 
      31             : /// \cond CLASSIMP
      32          18 : ClassImp(AliMUONLocalStruct)
      33             : /// \endcond
      34             : 
      35             :  const Int_t  AliMUONLocalStruct::fgkLength = 5;
      36             :  const Int_t  AliMUONLocalStruct::fgkScalerLength = 45;
      37             :  const UInt_t AliMUONLocalStruct::fgkEndOfLocal   = 0xCAFEFADE;
      38             :  const UInt_t AliMUONLocalStruct::fgkDisableWord  = 0x10CADEAD;
      39             : //___________________________________________
      40             : AliMUONLocalStruct::AliMUONLocalStruct()
      41           1 :   :  TObject(),
      42           1 :      fL0(0),   
      43           1 :      fHold(0), 
      44           1 :      fClk(0),   
      45           1 :      fLPtNTrig(0), 
      46           1 :      fHPtNTrig(0), 
      47           1 :      fLPtRTrig(0), 
      48           1 :      fHPtRTrig(0), 
      49           1 :      fLPtLTrig(0), 
      50           1 :      fHPtLTrig(0), 
      51           1 :      fLPtSTrig(0), 
      52           1 :      fHPtSTrig(0), 
      53           1 :      fEOS(0),         
      54           1 :      fReset(0)       
      55           5 : {
      56             :   ///
      57             :   /// ctor
      58             :   ///
      59          12 :   for (Int_t i = 0; i < 5; i++)
      60           5 :     fData[i] = 0;
      61             : 
      62          66 :   for (Int_t i = 0; i < 8*4; i++)
      63          32 :     fScaler[i] = 0;
      64             : 
      65             : 
      66           2 : }
      67             : 
      68             : //___________________________________________
      69             : AliMUONLocalStruct::AliMUONLocalStruct(const AliMUONLocalStruct& event)
      70           0 :   :  TObject(event),
      71           0 :      fL0(event.fL0),
      72           0 :      fHold(event.fHold),
      73           0 :      fClk(event.fClk),
      74           0 :      fLPtNTrig(event.fLPtNTrig),
      75           0 :      fHPtNTrig(event.fHPtNTrig),
      76           0 :      fLPtRTrig(event.fLPtRTrig),
      77           0 :      fHPtRTrig(event.fHPtRTrig),
      78           0 :      fLPtLTrig(event.fLPtLTrig),
      79           0 :      fHPtLTrig(event.fHPtLTrig),
      80           0 :      fLPtSTrig(event.fLPtSTrig),
      81           0 :      fHPtSTrig(event.fHPtSTrig),
      82           0 :      fEOS(event.fEOS),
      83           0 :      fReset(event.fReset)
      84           0 : {
      85             :   ///
      86             :   /// copy ctor
      87             :   ///
      88           0 :   for (Int_t i = 0; i < 5; i++)
      89           0 :     fData[i] = event.fData[i];
      90             : 
      91           0 :   for (Int_t i = 0; i < 8*4; i++)
      92           0 :     fScaler[i] = event.fScaler[i];
      93             : 
      94             : 
      95           0 : }
      96             : 
      97             : //___________________________________________
      98             : AliMUONLocalStruct::~AliMUONLocalStruct()
      99           4 : {
     100             : /// Destructor
     101           4 : }
     102             : 
     103             : //___________________________________________
     104             : AliMUONLocalStruct& 
     105             : AliMUONLocalStruct::operator=(const AliMUONLocalStruct& event)
     106             : {
     107             :   /// 
     108             :   /// assignment operator
     109             :   ///
     110             : 
     111           0 :   if (this == &event) return *this;
     112             : 
     113           0 :   fL0       = event.fL0;
     114           0 :   fHold     = event.fHold;
     115           0 :   fClk      = event.fClk;
     116           0 :   fLPtNTrig = event.fLPtNTrig;
     117           0 :   fHPtNTrig = event.fHPtNTrig;
     118           0 :   fLPtRTrig = event.fLPtRTrig;
     119           0 :   fHPtRTrig = event.fHPtRTrig;
     120           0 :   fLPtLTrig = event.fLPtLTrig;
     121           0 :   fHPtLTrig = event.fHPtLTrig;
     122           0 :   fLPtSTrig = event.fLPtSTrig;
     123           0 :   fHPtSTrig = event.fHPtSTrig;
     124           0 :   fEOS      = event.fEOS;
     125           0 :   fReset    = event.fReset;
     126             : 
     127           0 :   for (Int_t i = 0; i < 5; i++)
     128           0 :     fData[i] = event.fData[i];
     129             : 
     130           0 :   for (Int_t i = 0; i < 8*4; i++)
     131           0 :     fScaler[i] = event.fScaler[i];
     132             : 
     133           0 :   return *this;
     134           0 : }
     135             : 
     136             : //___________________________________________
     137             : void AliMUONLocalStruct::GetXPattern(TArrayS& array) const
     138             : {
     139             :     /// return array of X pattern
     140           0 :   Short_t vec[4] = {static_cast<Short_t>(GetX1()), static_cast<Short_t>(GetX2()), static_cast<Short_t>(GetX3()), static_cast<Short_t>(GetX4())};
     141           0 :     array.Set(4, vec);
     142           0 : }
     143             : 
     144             : //___________________________________________
     145             : void AliMUONLocalStruct::GetYPattern(TArrayS& array) const
     146             : {
     147             :     /// return array of Y pattern
     148           0 :   Short_t vec[4] = {static_cast<Short_t>(GetY1()), static_cast<Short_t>(GetY2()), static_cast<Short_t>(GetY3()), static_cast<Short_t>(GetY4())};
     149           0 :     array.Set(4, vec);
     150           0 : }
     151             : 
     152             : //___________________________________________
     153             : void AliMUONLocalStruct::SetScalersNumbers()
     154             : {
     155             :   /// set numbers for scaler events for local structure
     156             :   /// crasy numbers for scaler words, while no beam is coming
     157             :   ///
     158             : 
     159           0 :   fL0       = 1000;   
     160           0 :   fHold     = 100; 
     161           0 :   fClk      = 10000;  
     162           0 :   fLPtNTrig = 1; 
     163           0 :   fHPtNTrig = 1; 
     164           0 :   fLPtRTrig = 2; 
     165           0 :   fHPtRTrig = 2; 
     166           0 :   fLPtLTrig = 3; 
     167           0 :   fHPtLTrig = 3; 
     168           0 :   fLPtSTrig = 4; 
     169           0 :   fHPtSTrig = 4; 
     170           0 :   fEOS      = 0x2AA;         
     171           0 :   fReset    = 10;     
     172             : 
     173           0 :   for (Int_t i = 0; i < 8*4; i++)
     174           0 :     fScaler[i] = i;
     175             : 
     176           0 : }

Generated by: LCOV version 1.11