KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVDetectorEvent.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  kvdetectorevent.cpp - description
3  -------------------
4  begin : Sun May 19 2002
5  copyright : (C) 2002 by J.D. Frankland
6  email : frankland@ganil.fr
7 
8 $Id: KVDetectorEvent.cpp,v 1.14 2006/10/19 14:32:43 franklan Exp $
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 #include "Riostream.h"
20 #include "KVDetectorEvent.h"
21 
22 using namespace std;
23 
24 ClassImp(KVDetectorEvent);
25 
26 
28 
29 KVDetectorEvent::KVDetectorEvent()
30 {
31  init();
32 }
33 
34 
35 
38 
39 void KVDetectorEvent::init()
40 {
41  //Default initialisation
42  fHitGroups = new KVUniqueNameList;
43 }
44 
45 
46 
48 
49 KVDetectorEvent::~KVDetectorEvent()
50 {
51  delete fHitGroups;
52  fHitGroups = 0;
53 }
54 
55 
56 
62 
63 void KVDetectorEvent::Clear(Option_t* opt)
64 {
65  // Reset the list of hit groups, ready for analysis of a new event.
66  // Each 'hit' group is cleared (energy losses in detectors set to zero, etc.).
67  // unless option "NGR" (No Group Reset) is given
68  // Any other option is passed to KVGroup::Reset
69 
70  if (strncmp(opt, "NGR", 3)) {
71  fHitGroups->R__FOR_EACH(KVGroup, Reset)(opt);
72  }
73  fHitGroups->Clear();
74 }
75 
76 
77 
80 
81 void KVDetectorEvent::Print(Option_t*) const
82 {
83  //Print a listing of hit groups with fired detectors
84 
85  cout << "\nKVDetectorEvent" << endl;
86  cout << "--------------" << endl;
87  cout << "\nGroups hit: " << GetMult() << endl;
88  cout << "\n";
89  if (GetMult()) {
90  KVGroup* g;
91  for (UInt_t i = 0; i < GetMult(); i++) {
92  g = (KVGroup*) fHitGroups->At(i);
93  g->Print("fired");
94  }
95  }
96 }
97 
98 
unsigned int UInt_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const char Option_t
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
virtual void Clear(Option_t *option="")
Optimised list in which named objects can only be placed once.
const long double g
masses
Definition: KVUnits.h:72