/[PAMELA software]/DarthVader/AnticounterLevel2/src/AcLevel2.cpp
ViewVC logotype

Diff of /DarthVader/AnticounterLevel2/src/AcLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by mocchiut, Mon Feb 12 08:17:21 2007 UTC revision 1.7 by pamela, Thu Mar 15 12:56:27 2007 UTC
# Line 1  Line 1 
1    /**
2     * \file src/AcLevel2.cpp
3     * \author Petter Hofverberg
4    **/
5  #include <TObject.h>  #include <TObject.h>
6  #include <AcLevel2.h>  #include <AcLevel2.h>
7    
8  ClassImp(AcLevel2);  ClassImp(AcLevel2);
9    
10    /**
11     * AcLevel2 constructor
12    **/
13  AcLevel2::AcLevel2() {  AcLevel2::AcLevel2() {
14    this->Clear();    this->Clear();
15  }  }
16    
17    /**
18     * Clear variables
19    **/
20  void AcLevel2::Clear(){  void AcLevel2::Clear(){
21    status[0]=0;    status[0]=0;
22    hitmap[0]=0;    hitmap[0]=0;
# Line 19  void AcLevel2::Clear(){ Line 29  void AcLevel2::Clear(){
29    unpackError=0;    unpackError=0;
30  }  }
31    
32    /**
33     * checks if detector what is hit
34    **/
35  bool AcLevel2::IsHit(TString what){  bool AcLevel2::IsHit(TString what){
36    
37      char* cabl[] = {"CARD4","CAT2","CAS1","ND","CARD2","CAT4","CAS4","ND",      char* cabl[] = {"CARD4","CAT2","CAS1","ND","CARD2","CAT4","CAS4","ND",
# Line 37  bool AcLevel2::IsHit(TString what){ Line 50  bool AcLevel2::IsHit(TString what){
50      return answer;      return answer;
51    
52  }  }
53    /**
54     * is CAS hit?
55    **/
56  bool AcLevel2::CAShit(TString card)  bool AcLevel2::CAShit(TString card)
57  {  {
58    if(card.Contains("main") || card.CompareTo("")==0 )    if(card.Contains("main") || card.CompareTo("")==0 )
# Line 57  bool AcLevel2::CAShit(TString card) Line 72  bool AcLevel2::CAShit(TString card)
72        
73    return false;    return false;
74  }  }
75    /**
76     * is CAT hit?
77    **/
78  bool AcLevel2::CAThit(TString card)  bool AcLevel2::CAThit(TString card)
79  {  {
80    if(card.Contains("main") || card.CompareTo("")==0 )    if(card.Contains("main") || card.CompareTo("")==0 )
# Line 77  bool AcLevel2::CAThit(TString card) Line 94  bool AcLevel2::CAThit(TString card)
94        
95    return false;    return false;
96  }  }
97    /**
98     * is CARD hit?
99    **/
100  bool AcLevel2::CARDhit(TString card)  bool AcLevel2::CARDhit(TString card)
101  {  {
102    if(card.Contains("main") || card.CompareTo("")==0 )    if(card.Contains("main") || card.CompareTo("")==0 )
# Line 97  bool AcLevel2::CARDhit(TString card) Line 116  bool AcLevel2::CARDhit(TString card)
116        
117    return false;    return false;
118  }  }
119    /**
120     * is AC hit?
121    **/
122  bool AcLevel2::AChit(TString card)  bool AcLevel2::AChit(TString card)
123  {  {
124    if(this->CAThit(card) || this->CARDhit(card) || this->CAShit(card)) return true;    if(this->CAThit(card) || this->CARDhit(card) || this->CAShit(card)) return true;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23