Array of records with 64 bit scalers added, copy constructor,=operator
[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]; }
033d0f8e 33 const TObjArray* GetScalersRecords() const { return &fScalersRecord; }
34 AliTriggerScalersRecord* GetScalersRecord( Int_t index ) const { return (AliTriggerScalersRecord*)fScalersRecord.At(index); }
35 Int_t FindNearestScalersRecord( const AliTimeStamp *stamp ) const;
bf7443cc 36 Bool_t ConsistencyCheck() const;
d7dd8a54 37 // Setters
38 void SetVersion( Short_t ver ) { fVersion = ver; }
39 void SetRunNumber( ULong_t run ) { fRunNumber = run; }
40 void SetNumClasses( UChar_t nclass ) { fnClasses = nclass; fClassIndex.Set(nclass); }
41 void SetClass( UChar_t i, UChar_t index ) { fClassIndex[i]=index; }
42 void AddTriggerScalers( AliTriggerScalersRecord* scal );
43 virtual void Print( const Option_t* opt ="" ) const;
bf7443cc 44 AliTriggerRunScalers( const AliTriggerRunScalers &run );
45 AliTriggerRunScalers& operator=(const AliTriggerRunScalers& run);
d7dd8a54 46
e39e51f6 47static AliTriggerRunScalers* ReadScalers( TString & filename );
d7dd8a54 48
d7dd8a54 49private:
50 Short_t fVersion; // Version
51 ULong_t fRunNumber; // Run number
52 UChar_t fnClasses; // Number of trigger classes
53 TArrayC fClassIndex; // list of classes used in this partition
54 TObjArray fScalersRecord; // Array of records (AliTriggerScalersRecord)
bf7443cc 55 TObjArray fScalersRecordESD; // Array of records with 64bit scalers (AliTriggerScalersRecordESD)
56
d7dd8a54 57
d7dd8a54 58
bf7443cc 59 ClassDef( AliTriggerRunScalers, 2 ) // Define a Run Trigger Scalers (Scalers)
d7dd8a54 60};
61
62#endif