AliTimeStamp datum and methods added
[u/mrichter/AliRoot.git] / STEER / AliTriggerRunScalers.h
CommitLineData
d7dd8a54 1#ifndef ALITRIGGERRUNSCALERS_H
2#define ALITRIGGERRUNSCALERS_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: AliTriggerRunScalers.h 22322 2007-11-22 11:43:14Z cvetan $ */
8
9///////////////////////////////////////////////////////////////////////////////
10//
11// Class to define a collection scalers per Run
12//
13//
14//
15//////////////////////////////////////////////////////////////////////////////
16class TObject;
d7dd8a54 17class AliTimeStamp;
18class AliTriggerScalersRecord;
19
20#include "TArrayC.h"
21
22class AliTriggerRunScalers : public TObject {
23
24public:
25 AliTriggerRunScalers();
7eaf72df 26 virtual ~AliTriggerRunScalers();
d7dd8a54 27 // Getters
28 Short_t GetVersion() const { return fVersion; }
29 ULong_t GetRunNumber() const { return fRunNumber; }
30 UChar_t GetNumClasses() const { return fnClasses; }
31 Char_t GetClass( Int_t i ) const { return fClassIndex[i]; }
033d0f8e 32 const TObjArray* GetScalersRecords() const { return &fScalersRecord; }
33 AliTriggerScalersRecord* GetScalersRecord( Int_t index ) const { return (AliTriggerScalersRecord*)fScalersRecord.At(index); }
34 Int_t FindNearestScalersRecord( const AliTimeStamp *stamp ) const;
47fde2cb 35 Int_t ConsistencyCheck(Bool_t* overflow) const;
d7dd8a54 36 // Setters
37 void SetVersion( Short_t ver ) { fVersion = ver; }
38 void SetRunNumber( ULong_t run ) { fRunNumber = run; }
39 void SetNumClasses( UChar_t nclass ) { fnClasses = nclass; fClassIndex.Set(nclass); }
40 void SetClass( UChar_t i, UChar_t index ) { fClassIndex[i]=index; }
41 void AddTriggerScalers( AliTriggerScalersRecord* scal );
42 virtual void Print( const Option_t* opt ="" ) const;
bf7443cc 43 AliTriggerRunScalers( const AliTriggerRunScalers &run );
44 AliTriggerRunScalers& operator=(const AliTriggerRunScalers& run);
d7dd8a54 45
e39e51f6 46static AliTriggerRunScalers* ReadScalers( TString & filename );
d7dd8a54 47
d7dd8a54 48private:
49 Short_t fVersion; // Version
50 ULong_t fRunNumber; // Run number
51 UChar_t fnClasses; // Number of trigger classes
52 TArrayC fClassIndex; // list of classes used in this partition
53 TObjArray fScalersRecord; // Array of records (AliTriggerScalersRecord)
bf7443cc 54 TObjArray fScalersRecordESD; // Array of records with 64bit scalers (AliTriggerScalersRecordESD)
55
d7dd8a54 56
d7dd8a54 57
bf7443cc 58 ClassDef( AliTriggerRunScalers, 2 ) // Define a Run Trigger Scalers (Scalers)
d7dd8a54 59};
60
61#endif