Reverted back.
[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();
26 virtual ~AliTriggerRunScalers() { fScalersRecord.SetOwner(); fScalersRecord.Delete(); }
27
28 // Getters
29 Short_t GetVersion() const { return fVersion; }
30 ULong_t GetRunNumber() const { return fRunNumber; }
31 UChar_t GetNumClasses() const { return fnClasses; }
32 Char_t GetClass( Int_t i ) const { return fClassIndex[i]; }
33 TObjArray* GetScalersRecords() { return &fScalersRecord; }
34 AliTriggerScalersRecord* GetScalersRecord( Int_t index )
35 { return (AliTriggerScalersRecord*)fScalersRecord.At(index); }
36 Int_t FindNearestScalersRecord( AliTimeStamp * stamp );
e39e51f6 37 Bool_t ConsistencyCheck();
d7dd8a54 38 // Setters
39 void SetVersion( Short_t ver ) { fVersion = ver; }
40 void SetRunNumber( ULong_t run ) { fRunNumber = run; }
41 void SetNumClasses( UChar_t nclass ) { fnClasses = nclass; fClassIndex.Set(nclass); }
42 void SetClass( UChar_t i, UChar_t index ) { fClassIndex[i]=index; }
43 void AddTriggerScalers( AliTriggerScalersRecord* scal );
44 virtual void Print( const Option_t* opt ="" ) const;
45
46
e39e51f6 47static AliTriggerRunScalers* ReadScalers( TString & filename );
d7dd8a54 48
49
50private:
51 Short_t fVersion; // Version
52 ULong_t fRunNumber; // Run number
53 UChar_t fnClasses; // Number of trigger classes
54 TArrayC fClassIndex; // list of classes used in this partition
55 TObjArray fScalersRecord; // Array of records (AliTriggerScalersRecord)
56
57 // AliTriggerRunScalers( const AliTriggerRunScalers &run );
58 AliTriggerRunScalers& operator=(const AliTriggerRunScalers& run);
59
60 ClassDef( AliTriggerRunScalers, 1 ) // Define a Run Trigger Scalers (Scalers)
61};
62
63#endif