ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/TriggerName.h
Revision: 1.6
Committed: Tue Mar 24 16:10:15 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008
Changes since 1.5: +1 -42 lines
Log Message:
Have TriggerTable as a standalone file and cintable.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: TriggerName.h,v 1.5 2009/02/18 15:38:55 loizides Exp $
3 //
4 // TriggerName
5 //
6 // A class to hold a name and a number, ie the trigger name and trigger bit.
7 //
8 // Authors: C.Loizides
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_TRIGGERNAME_H
12 #define MITANA_DATATREE_TRIGGERNAME_H
13
14 #include <string>
15 #include <TObject.h>
16 #include <TString.h>
17 #include "MitAna/DataTree/interface/DataBase.h"
18
19 namespace mithep
20 {
21 class TriggerName : public DataBase
22 {
23 public:
24 TriggerName() : fId(0), fHash(0) {}
25 TriggerName(const char *name, UShort_t id) :
26 fName(name), fId(id), fHash(fName.Hash()) {}
27 TriggerName(const std::string &name, UShort_t id) :
28 fName(name), fId(id), fHash(fName.Hash()) {}
29 TriggerName(const TString &name, UShort_t id) :
30 fName(name), fId(id), fHash(fName.Hash()) {}
31
32 UShort_t Id() const { return fId; }
33 const char *GetName() const { return fName; }
34 ULong_t Hash() const { return fHash; }
35 const char *Name() const { return fName; }
36 EObjType ObjType() const { return kTriggerName; }
37 void Print(Option_t *opt="") const;
38
39 protected:
40 TString fName; //name
41 UShort_t fId; //id
42 UInt_t fHash; //hash
43
44 ClassDef(TriggerName, 1) // Trigger name class
45 };
46 }
47 #endif