]>
Commit | Line | Data |
---|---|---|
2ff24e4c | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | /************************************************************************** | |
4 | * This file is property of and copyright by the ALICE HLT Project * | |
5 | * ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> * | |
8 | * for The ALICE HLT Project. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
18 | ||
19 | /** @file AliHLTRunSummary.cxx | |
20 | @author Jochen Thaeder | |
21 | @date | |
22 | @brief Summary class for a run, merges all detectors | |
23 | */ | |
24 | ||
25 | // see header file for class documentation | |
26 | // or | |
27 | // refer to README to build package | |
28 | // or | |
29 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
30 | ||
31 | #if __GNUC__ >= 3 | |
32 | using namespace std; | |
33 | #endif | |
34 | ||
35 | #include "AliHLTRunSummary.h" | |
36 | ||
37 | ClassImp(AliHLTRunSummary) | |
38 | ||
39 | AliHLTRunSummary::AliHLTRunSummary() : | |
40 | fNEvents(0), | |
41 | fNEventsRejected(0), | |
42 | fRunNumber(0), | |
43 | fRunType(0), | |
44 | fTriggerClasses(), | |
45 | fDetectorArray(NULL) { | |
46 | // see header file for class documentation | |
47 | // or | |
48 | // refer to README to build package | |
49 | // or | |
50 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
51 | ||
52 | memset( fTriggerClasses, 0, (gkNCTPTriggerClasses * sizeof(ULong_t)) ); | |
53 | ||
54 | fDetectorArray = new TObjArray; | |
55 | fDetectorArray->SetOwner(); | |
56 | } | |
57 | ||
58 | AliHLTRunSummary::~AliHLTRunSummary() { | |
59 | // see header file for class documentation | |
60 | ||
61 | if ( fDetectorArray ) | |
62 | delete fDetectorArray; | |
63 | fDetectorArray = NULL; | |
64 | ||
65 | } | |
66 | ||
67 | Bool_t AliHLTRunSummary::AddTriggerClass( Int_t ndx ) { | |
68 | // see header file for class documentation | |
69 | ||
70 | Bool_t bResult = kTRUE; | |
71 | ||
72 | if ( ndx < gkNCTPTriggerClasses ) fTriggerClasses[ndx]++; | |
73 | else bResult = kFALSE; | |
74 | ||
75 | return bResult; | |
76 | } | |
77 | ||
78 | Bool_t AliHLTRunSummary::AddDetector( TObject * obj ) { | |
79 | // see header file for class documentation | |
80 | ||
81 | Bool_t bResult = kTRUE; | |
82 | ||
83 | if ( fDetectorArray ) fDetectorArray->Add( obj ); | |
84 | else bResult = kFALSE; | |
85 | ||
86 | return bResult; | |
87 | } |